<div dir="ltr"><div>You could set the "execute_on_answer" variable on the b-leg dialstring to execute the lua script. In the lua script, you'd use session:getVariable("switch_r_sdp") and then some pattern matching to figure out if "telephone-event" is in the SDP. If not, then do session:execute("start_dtmf", "")<br><br></div>Chris<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 17, 2015 at 3:05 PM, Phillip Jones <span dir="ltr"><<a href="mailto:pjintheusa@gmail.com" target="_blank">pjintheusa@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><span style="font-size:12.8000001907349px">Hi All,</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">The following dial plan detects RFC 2833 and if it is not present, runs the "</span><span style="font-size:12.8000001907349px">start_dtmf" application.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><condition field="${switch_r_sdp}" expression="a=rtpmap:(\d+)\stelephone-event/8000" break="never"> </span></div><div><span style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">        </span><action application="set" data="rtp_payload_number=$1"/> </span></div><div><span style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">        </span><anti-action application="start_dtmf"/> </span></div><div><span style="font-size:12.8000001907349px"></condition></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I need to do this on the outbound leg - using Lua. Can anyone point me to some code example that would achieve this or get me started?</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Any help appreciated.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Thanks</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Phil</span></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>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.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></blockquote></div><br></div>