<div dir="ltr"><span style="font-size:12.8000001907349px">session:execute("bridge", "user/".. did .. "@" .. domain)</span><br><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">will block, if you need to execute actions upon DTMF pressing you can use <a href="https://freeswitch.org/confluence/display/FREESWITCH/bind_meta_app">https://freeswitch.org/confluence/display/FREESWITCH/bind_meta_app</a> and execute an application or call another lua script that does what you want.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">If you don't want to block you can create a new session, like:</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">new_session = freeswitch.Session("sofia/user" .. did .. "@" .. domain)</span><br></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">execute more commands and then:</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">freeswitch.bridge(session, new_session)</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">instead of using session:execute("bridge" ...</span></div><div><span style="font-size:12.8000001907349px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 18, 2015 at 6:21 AM, Jurijs Ivolga <span dir="ltr"><<a href="mailto:jurij.ivo@gmail.com" target="_blank">jurij.ivo@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><div><div><div><div>Hi,<br><br></div>I have quite simple task:<br><br></div>I need to call from ext 1000 to ext 1001, after ext 1001 pick-up phone, I need to be able to listen for DTMF and based on DTMF I need to fire some commands in LUA.<br><br></div>I tried following code in LUA:<br><br>api = freeswitch.API()<br><br>did = session:getVariable("destination_number")<br>domain = session:getVariable("domain_name")<br><br>session:execute("bridge", "user/".. did .. "@" .. domain)<br><br>freeswitch.consoleLog("INFO","Called Number " .. did .. "\n")<br><br></div>But I can do anything with a call only when destination hang-up. For example Called number will be displayed only after destination ext will hang-up.<br><br></div>Is there any possibility to achieve this with LUA script?<br><br></div>With kind regards,<br><br></div>Jurijs<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" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Ítalo Rossi<br></div></div>
</div>