<div dir="ltr"><div><div>Hi<br><br></div>mod_sms helloworld script. <b><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.7273px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:19.1903px;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);display:inline!important;float:none">mod_sms<span class=""> </span></span><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.7273px;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:19.1903px;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">must</span><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.7273px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:19.1903px;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);display:inline!important;float:none"><b><span class=""> </span></b>be loaded or this will not work.</span></b><br>
<br></div><div>-------------------- chatplan<br><br><extension name="sms_test"><br> <condition field="destination_number" expression="^(.*)$"><br> <action application="lua" data="lua/sms.lua"/><br>
</condition><br></extension><br></div><div><br><br></div>-------------------- sms.lua<br><br><div>freeswitch.consoleLog("info", "chat console\n")<br><br>from = '<a href="mailto:sip%3A1002@192.168.1.2">sip:1002@192.168.1.2</a>';<br>
to = '<a href="mailto:1001@192.168.1.2">1001@192.168.1.2</a>';<br><br></div><div>-- change <b>"to</b>" programmatically<br></div><div><br>local event = freeswitch.Event("CUSTOM", "SMS::SEND_MESSAGE");<br>
event:addHeader("proto", "sip");<br>event:addHeader("dest_proto", "sip");<br>event:addHeader("from", from);<br>event:addHeader("from_full", from);<br>event:addHeader("to", to);<br>
event:addHeader("subject", "<a href="mailto:sip%3A1001@192.168.1.2">sip:1001@192.168.1.2</a>");<br>event:addHeader("type", "text/html");<br>event:addHeader("hint", "the hint");<br>
event:addHeader("replying", "true");<br>event:addBody("Hello World!");<br>event:fire();<br>--freeswitch.consoleLog("info",event:serialize()..'\n');<br><br></div><div>Moradi<br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 29, 2013 at 7:12 PM, Raymond Chandler <span dir="ltr"><<a href="mailto:intralanman@freeswitch.org" target="_blank">intralanman@freeswitch.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div class="im">
<div>On 07/26/2013 12:24 PM, thomas lee
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi,</div>
<div> </div>
<div> Has anyone manage to get chatplan working? </div>
</div>
</blockquote></div>
yes<div class="im"><br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div>I only manage to get echo back from server</div>
<div>and never succeed in sending the message across to other
party. Does anyone has a sample working chatplan for me to
reference?</div>
<br>
</div>
</blockquote></div>
assuming that the sending party is sending to the user@domain that
the receiving party is registered as... then you should only have to
use "send" as the application name.<br>
<br>
-Ray<br>
</div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>