From antonio, 6 Years ago, written in Plain Text.
- view diff
Embed
  1. freeswitch.consoleLog("info", "chat console\n")
  2.    
  3.    local event = freeswitch.Event("CUSTOM", "SMS::SEND_MESSAGE");
  4.    event:addHeader("proto", "sip");
  5.    event:addHeader("dest_proto", "sip");
  6.    event:addHeader("from", "sip:bio@192.168.1.108");
  7.    event:addHeader("from_full", "sip:bio@192.168.1.108");
  8.    event:addHeader("to", "1000@192.168.1.108");
  9. --   event:addHeader("subject", "sip:1001@192.168.1.101");
  10.    event:addHeader("type", "text/plain");
  11.    event:addHeader("hint", "the hint");
  12.    event:addHeader("replying", "true");
  13.    event:addBody("Hello from Seven Du! Have fun!");
  14.    
  15.    -- freeswitch.consoleLog("info", event:serialize());
  16.    event:fire();