<div dir="ltr"><div>You could set the &quot;execute_on_answer&quot; variable on the b-leg dialstring to execute the lua script.  In the lua script, you&#39;d use session:getVariable(&quot;switch_r_sdp&quot;) and then some pattern matching to figure out if &quot;telephone-event&quot; is in the SDP.  If not, then do session:execute(&quot;start_dtmf&quot;, &quot;&quot;)<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">&lt;<a href="mailto:pjintheusa@gmail.com" target="_blank">pjintheusa@gmail.com</a>&gt;</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 &quot;</span><span style="font-size:12.8000001907349px">start_dtmf&quot; application.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">&lt;condition field=&quot;${switch_r_sdp}&quot; expression=&quot;a=rtpmap:(\d+)\stelephone-event/8000&quot; break=&quot;never&quot;&gt; </span></div><div><span style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">        </span>&lt;action application=&quot;set&quot; data=&quot;rtp_payload_number=$1&quot;/&gt; </span></div><div><span style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">        </span>&lt;anti-action application=&quot;start_dtmf&quot;/&gt; </span></div><div><span style="font-size:12.8000001907349px">&lt;/condition&gt;</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>