<div dir="ltr"><div><div>Hi,<br><br></div>Actually it made a trick for me, my code:<br><br>api = freeswitch.API()<br><br>did = session:getVariable(&quot;destination_number&quot;)<br>domain = session:getVariable(&quot;domain_name&quot;)<br>masteruuid = session:getVariable(&quot;uuid&quot;)<br>caller_id_number = session:getVariable(&quot;caller_id_number&quot;)<br><br>freeswitch.consoleLog(&quot;INFO&quot;,&quot;UUID &quot; .. masteruuid .. &quot;\n&quot;)<br><br>new_session = freeswitch.Session(&quot;{origination_caller_id_number=&quot; .. caller_id_number .. &quot;}sofia/internal/&quot; .. did .. &quot;%&quot; .. domain)<br><br>masteruuid_bleg = new_session:getVariable(&quot;uuid&quot;)<br><br>freeswitch.consoleLog(&quot;INFO&quot;,&quot;UUID &quot; .. masteruuid_bleg .. &quot;\n&quot;)<br><br></div>-- some additional stuff<br><div>-- some additional stuff<br></div><div><br>freeswitch.bridge(session, new_session)<br><br></div><div>But now I do not hear ring-tone and  when I cancel a call, it still rings on remote ext.<br><br></div><div>Any hints?<br><br></div><div>With kind regards,<br><br></div><div>Jurijs<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-18 16:29 GMT+03:00 Michael T Mowatt <span dir="ltr">&lt;<a href="mailto:mmowatt@nexxphase.com" target="_blank">mmowatt@nexxphase.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Have you tried using execute_on_answer variable?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Mike<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>]
<b>On Behalf Of </b>Jurijs Ivolga<br>
<b>Sent:</b> Tuesday, August 18, 2015 9:15 AM<br>
<b>To:</b> FreeSWITCH Users Help &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
<b>Subject:</b> Re: [Freeswitch-users] How to manipulate a call after bridge<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Thank you for an idea, but with your proposal I can run some additional commands only before bridge.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">In my case I need to execute some additional commands after bridge, after both call legs are connected and call is happening.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Do you know how I can achieve this?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">With kind regards,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Jurijs<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">2015-08-18 15:28 GMT+03:00 Ítalo Rossi &lt;<a href="mailto:italorossib@gmail.com" target="_blank">italorossib@gmail.com</a>&gt;:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">session:execute(&quot;bridge&quot;, &quot;user/&quot;.. did .. &quot;@&quot; .. domain)</span><u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">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" target="_blank">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><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">If you don&#39;t want to block you can create a new session, like:</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">new_session = freeswitch.Session(&quot;sofia/user&quot; .. did .. &quot;@&quot; .. domain)</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">execute more commands and then:</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">freeswitch.bridge(session, new_session)</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">instead of using session:execute(&quot;bridge&quot; ...</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Tue, Aug 18, 2015 at 6:21 AM, Jurijs Ivolga &lt;<a href="mailto:jurij.ivo@gmail.com" target="_blank">jurij.ivo@gmail.com</a>&gt; wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I have quite simple task:<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">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.<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I tried following code in LUA:<br>
<br>
api = freeswitch.API()<br>
<br>
did = session:getVariable(&quot;destination_number&quot;)<br>
domain = session:getVariable(&quot;domain_name&quot;)<br>
<br>
session:execute(&quot;bridge&quot;, &quot;user/&quot;.. did .. &quot;@&quot; .. domain)<br>
<br>
freeswitch.consoleLog(&quot;INFO&quot;,&quot;Called Number &quot; .. did .. &quot;\n&quot;)<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">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.<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Is there any possibility to achieve this with LUA script?<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">With kind regards,<u></u><u></u></p>
</div>
<p class="MsoNormal">Jurijs<u></u><u></u></p>
</div>
<p class="MsoNormal"><br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">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" target="_blank">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><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><span style="color:#888888"><br>
<br clear="all">
<span><u></u><u></u></span></span></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal"><span><span style="color:#888888">-- </span><u></u><u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span style="color:#888888">Ítalo Rossi</span><u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">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" target="_blank">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><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</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" 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></div>