[Freeswitch-dev] Need help in Mod_SMS ChatPlan

thomasleets thomasleets at hotmail.com
Tue Aug 6 04:39:35 MSD 2013


Hi,

      Thank you for your reply. I have managed to get it working. Do you know if we can have group chat?


Sent from Samsung Mobile

-------- Original message --------
From: Mahdi Moradi <freeswitch.moradi at gmail.com> 
Date: 06/08/2013  02:53  (GMT+08:00) 
To: freeswitch-dev at lists.freeswitch.org 
Subject: Re: [Freeswitch-dev] Need help in Mod_SMS ChatPlan 
 
Hi

mod_sms helloworld script. mod_sms must be loaded or this will not work.

-------------------- chatplan

<extension name="sms_test">
      <condition field="destination_number" expression="^(.*)$">
        <action application="lua" data="lua/sms.lua"/>
      </condition>
</extension>


-------------------- sms.lua

freeswitch.consoleLog("info", "chat console\n")

from = 'sip:1002 at 192.168.1.2';
to = '1001 at 192.168.1.2';

-- change "to" programmatically

local event = freeswitch.Event("CUSTOM", "SMS::SEND_MESSAGE");
event:addHeader("proto", "sip");
event:addHeader("dest_proto", "sip");
event:addHeader("from", from);
event:addHeader("from_full", from);
event:addHeader("to", to);
event:addHeader("subject", "sip:1001 at 192.168.1.2");
event:addHeader("type", "text/html");
event:addHeader("hint", "the hint");
event:addHeader("replying", "true");
event:addBody("Hello World!");
event:fire();
--freeswitch.consoleLog("info",event:serialize()..'\n');

Moradi


On Mon, Jul 29, 2013 at 7:12 PM, Raymond Chandler <intralanman at freeswitch.org> wrote:
On 07/26/2013 12:24 PM, thomas lee wrote:
Hi,
 
      Has anyone manage to get chatplan working?
yes


I only manage to get echo back from server
and never succeed in sending the message across to other party. Does anyone has a sample working chatplan for me to           reference?

assuming that the sending party is sending to the user at domain that the receiving party is registered as... then you should only have to use "send" as the application name.

-Ray

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com




Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-dev mailing list
FreeSWITCH-dev at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20130806/403b3632/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list