<div dir="ltr">Hi Donny,<div><br></div><div>Unfortunately I can't think of anything else.</div><div><br></div><div>It would be great if someone that has experience with mod_sms and the chatplan would help out or provide a link to a working lua script.</div>
<div>Unfortunately it seems no one knowledgeable has taken an interest in this thread..... at least not yet.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 10, 2014 at 11:17 AM, Donny Hardyanto <span dir="ltr"><<a href="mailto:hardyanto.donny@gmail.com" target="_blank">hardyanto.donny@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Peter,<div><br></div><div>I tried that and still no change. </div><span class="HOEnZb"><font color="#888888"><div>
<br></div><div><br></div>Donny<br><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Feb 8, 2014 at 7:03 PM, Peter Villeneuve <span dir="ltr"><<a>petervnv1@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Not sure what the problem is, perhaps you need to add event:addHeader("proto", "sip"); like in the example here? <a href="http://wiki.freeswitch.org/wiki/Mod_sms#Args" target="_blank">http://wiki.freeswitch.org/wiki/Mod_sms#Args</a><br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 6, 2014 at 3:45 PM, Donny Hardyanto <span dir="ltr"><<a>hardyanto.donny@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Privus,</div><div><br></div><div>This is the script for receiving SMS from gateway, and forward to clients (SIP profile 'clients'). The clients already registered in the FS and can make calls. I can confirm that this scripts is executed, but the last event.fire() is look like dont do anything. I checked on the siptrace on.</div>
<div><br></div><div> </div><div>var message_from_user=message.getHeader("from_user");</div><div>var message_to_user=message.getHeader("to_user");</div><div>var message_body=message.getBody();</div><div>
<br></div><div>console_log("INFO", "[receive_inbound_sms]\n");</div><div>console_log("INFO", message.serialize()+"\n");</div><div>console_log("INFO", "message.from_user:"+message_from_user+"\n");</div>
<div>console_log("INFO", "message.to_user:"+message_to_user+"\n");</div><div>console_log("INFO", "message.body:\n"+message_body+"\n");</div><div><br></div><div>
var event = new Event("CUSTOM", "SMS:SEND_MESSAGE");</div>
<div>event.addHeader("from", message.getHeader("from"));</div><div>event.addHeader("to", message_to_user);</div><div>event.addHeader("dest_proto","sip");</div><div>event.addHeader("sip_profile","clients");</div>
<div>event.addBody(message.getBody());</div><div>console_log("INFO", "Relay:\n"+event.serialize()+"\n");</div><div>event.fire();</div><div><br></div><div>Regards,</div><div><br></div><div>Donny</div>
<div><br></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 6, 2014 at 7:58 PM, Privus P <span dir="ltr"><<a>privus007@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Donny,<br><br></div>Perhaps you could share your javascript and lua script so that we could try to figure out together what isn't working.<br>
</div>Judging by the apparent lack of response to this thread, it seems to be the best way forward to try and resolve this.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 6, 2014 at 6:50 AM, Donny Hardyanto <span dir="ltr"><<a>hardyanto.donny@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi,</p>
<p dir="ltr">I have similar problem. I use gateway to GSM provider that support SIP simple . So far i can send sms from fs to gateway and receive sms in fs from gateway. But I was lost how to send the incoming sms from gateway to client. </p>
<p dir="ltr">Also my client support sip simple also. When the sms from client arrive at fs, i dont know how to forward them to gateway. </p>
<p dir="ltr">I use Javascript heavily and tried to produce the same thing as lua script in javascript but it always fail. The event fire command does not produce any thing. </p>
<p dir="ltr">Can any one show us or point us how to forward sms?</p>
<p dir="ltr">Dinny</p><div><div>
<div class="gmail_quote">On Feb 4, 2014 8:06 PM, "Peter Villeneuve" <<a>petervnv1@gmail.com</a>> wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi,<div><br></div><div>Thanks for helping out. Indeed I would love to try out a lua script to handle SMS.</div><div>Can anyone point to a sample script that I can study and play with?</div><div><br></div><div>
Any help is much appreciated. I'm still stuck with SMS hitting FS but not being forwarded to the peer....</div><div><br></div><div>Thanks,</div><div>Peter</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sun, Feb 2, 2014 at 5:46 PM, Privus P <span dir="ltr"><<a>privus007@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div>Hi Peter,<br><br></div>I'm not really sure why your SMS isn't being routed correctly.<br></div>I'm sure others in this list have a lot more experience and can help you out, but have you thought of using a lua script to handle SMS instead of relying on the send action?<br>
<br></div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Sat, Feb 1, 2014 at 2:00 PM, Peter Villeneuve <span dir="ltr"><<a>petervnv1@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div>Hi,</div><div><br></div><div>I'm experimenting with GSMopen and I'm having trouble doing something which is likely pretty simple.</div>
<div>I have enabled mod_sms and GSMopen in FS. I can send SIP simple messages between 2 registered peers OK.</div>
<div>I can see that incoming GSM SMS messages arrive in FS as expected, but I can't seem to get them converted into SIP SIMPLE format and routed to the peer (1000).</div><div>Once they arrive in FS, I can see in the log:</div>
<div><br></div><div>2014-01-30 20:00:54.840999 [INFO] mod_sms.c:336 Processing text message +4412398746->gsm01 in context default</div><div>Chatplan: gsm01 parsing [default->basic p2p] continue=true</div><div>Chatplan: gsm01 Regex (PASS) [basic p2p] to(gsm01) =~ /^(.*)$/ break=on-false</div>
<div>Chatplan: gsm01 Action send() </div><div><br></div><div><br></div><div>My chatplan has:</div><div><br></div><div><?xml version="1.0" encoding="utf-8"?></div><div><include></div><div> <context name="default"></div>
<div><br></div><div> <extension name="basic p2p" continue="true"></div><div> <condition field="to" expression="^(.*)$"></div><div><span style="white-space:pre-wrap">        </span><!--<span style="white-space:pre-wrap">        </span><action application="lua" data="test.lua"/> --></div>
<div><span style="white-space:pre-wrap">        </span> <action application="send"/></div><div> </condition></div><div> </extension></div><div><br></div><div> </context></div><div>
</include></div><div><br></div><div>And in my gsmopen.conf.xml:</div><div><br></div><div><configuration name="gsmopen.conf" description="GSMopen Configuration"></div><div> <global_settings></div>
<div> <param name="debug" value="8"/></div><div> <param name="dialplan" value="XML"/></div><div> <param name="context" value="default"/></div>
<div> <param name="hold-music" value="$${moh_uri}"/></div><div> <param name="destination" value="1000"/></div><div> </global_settings></div><div><br></div>
<div>
<br></div><div>I believe I'm doing something wrong in the chatplan. Is there any transfer action like in the regular XML dialplan?</div><div>I tried creating in the default dialplan the following, hoping that it would be similar to sofia calls and transfer the incoming SMS to peer 1000, but no dice.</div>
<div><br></div><div><include></div><div> <extension name="sms_inbound"></div><div> <condition field="destination_number" expression="^(gsm01)$"></div><div> <span style="white-space:pre-wrap">        </span><action application="transfer" data="1000 XML default"/></div>
<div> </condition></div><div> </extension></div><div></include></div><div><br></div><div>So, basically, how can I route the incoming SMS to peer 1000?</div><div><br></div><div>Thanks</div></div>
<br></div></div>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a>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-users mailing list<br>
<a>FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a>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-users mailing list<br>
<a>FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a>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-users mailing list<br>
<a>FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a>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-users mailing list<br>
<a>FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a>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-users mailing list<br>
<a>FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a>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-users mailing list<br>
<a>FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a>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-users mailing list<br>
<a>FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
</div></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-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>