?

halt

2

, GSM- FS (FreeSWITCH) dongle. , .

, mod_gsmopen Lua. , https://freeswitch.com/confluence/display/FREESWITCH/mod_gsmopen

chatplan ../freeswitch/conf/chatplan/default.xml

:

..
    <extension name="demo">
      <condition field="to" expression="^gsm(.*)$" break="on-true">
      <action application="lua" data="mail.lua"/>
      </condition>
    </extension>
..

, , Lua-, - Grounwire.

Lua-:

mail.lua
--
--      
local from = message:getHeader("from");
local to =   message:getHeader("to");
local body = message:getBody();
local time = message:getHeader("Event-Date-Local");
local ext = "1001"; --  extension    

--     
freeswitch.consoleLog("info", "chat console***********************************************************************\n") --   CLI
local event = freeswitch.Event("CUSTOM", "SMS::SEND_MESSAGE");
event:addHeader("proto", "sip");
event:addHeader("dest_proto", "sip");
event:addHeader("from", "sip:".. from .."@voip.ru");
event:addHeader("from_full", "sip:".. from .."@voip.ru:5063"); --       :)
event:addHeader("to", "".. ext .."@voip.ru");
event:addHeader("subject", "sip:".. to .."@voip.ru:5063");
event:addHeader("type", "text/html");
event:addHeader("hint", "the hint");
event:addHeader("replying", "true");
event:addBody('  '.. to ..'  '.. time ..',\n\n '.. body ..'');
event:fire();

. , dongle :

   dongle  FreeSWITCH   Grounwire

MySQL . . -, , , Lua-. , , , , /, -.

WEB :

 SMS  dongle  FreeSWITCH

?