Did you post debug logs of the call? <br>-MC<br><br><div class="gmail_quote">On Fri, Mar 16, 2012 at 3:57 PM, Alex Zarubin <span dir="ltr">&lt;<a href="mailto:ZAlex@webley.com">ZAlex@webley.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
Here are two dialplan examples of the simple thing I&#39;m failing to do -<br>
bridge inbound (external profile) and outbound (internal profile) sip<br>
calls after sending some dtmf sequence to the outbound leg. In both<br>
cases (and several more I&#39;ve tried) calls are bridged right after<br>
outbound leg picks up and dtmf are sent after the bridge. I would<br>
greatly appreciate your help/hints.<br>
<br>
Thank you.<br>
<br>
Alex<br>
<br>
----------------------------------------------------------------------<br>
Example 1.<br>
<br>
&lt;include&gt;<br>
  &lt;extension name=&quot;bridge_pre_exec&quot;&gt;<br>
    &lt;condition field=&quot;destination_number&quot; expression=&quot;^preexec$&quot;&gt;<br>
      &lt;action application=&quot;log&quot; data=&quot;INFO bridge_pre_exec request<br>
(${dtmfseq}) (${destination}) (${destip})&quot;/&gt;<br>
      &lt;action application=&quot;answer&quot;/&gt;<br>
      &lt;action application=&quot;set&quot;<br>
data=&quot;bridge_pre_execute_bleg_app=send_dtmf&quot;/&gt;<br>
      &lt;action application=&quot;set&quot;<br>
data=&quot;bridge_pre_execute_bleg_data=w#w${dtmfseq}&quot;/&gt;<br>
      &lt;action application=&quot;bridge&quot;<br>
data=&quot;sofia/internal/${destination}@${destip}&quot;/&gt;<br>
      &lt;action application=&quot;hangup&quot;/&gt;<br>
    &lt;/condition&gt;<br>
  &lt;/extension&gt;<br>
&lt;/include&gt;<br>
----------------------------------------------------------------------<br>
<br>
Example 2.<br>
<br>
&lt;include&gt;<br>
  &lt;extension name=&quot;lua_async&quot;&gt;<br>
    &lt;condition field=&quot;destination_number&quot; expression=&quot;^luaasync$&quot;&gt;<br>
      &lt;action application=&quot;log&quot; data=&quot;INFO luaasync request (${dtmfseq})<br>
(${destination}) (${destip})&quot;/&gt;<br>
      &lt;action application=&quot;set&quot; data=&quot;api_result=${bgapi(lua<br>
lua_async.lua ${dtmfseq} ${destination} ${destip} ${uuid}<br>
${caller_id_number})}&quot;/&gt;<br>
      &lt;action application=&quot;answer&quot;/&gt;<br>
      &lt;action application=&quot;park&quot;/&gt;<br>
      &lt;action application=&quot;hangup&quot;/&gt;<br>
    &lt;/condition&gt;<br>
  &lt;/extension&gt;<br>
&lt;/include&gt;<br>
<br>
Script lua_async.lua :<br>
<br>
dtmfseq = argv[1];<br>
phone = argv[2];<br>
destip = argv[3];<br>
leg1uuid = argv[4];<br>
cid = argv[5];<br>
<br>
ands = &quot;) and (&quot;;<br>
logline = &quot;Lua called with (&quot; .. dtmfseq .. ands .. phone .. ands ..<br>
destip .. ands .. leg1uuid .. ands .. cid .. &quot;)\n&quot;;<br>
freeswitch.console_log(&quot;info&quot;, logline);<br>
<br>
api = freeswitch.API();<br>
<br>
sofia_destination = &quot;[origination_caller_id_number=&quot; .. cid ..<br>
&quot;]sofia/internal/&quot; .. phone .. &quot;@&quot; .. destip;<br>
new_session = freeswitch.Session(sofia_destination);<br>
dispo = &quot;None&quot;;<br>
<br>
while (new_session:ready() and dispo ~= &quot;ANSWER&quot;) do<br>
 dispo = new_session:getVariable(&quot;endpoint_disposition&quot;)<br>
<br>
 freeswitch.consoleLog(&quot;INFO&quot;, &quot;disposition is &#39;&quot; .. dispo .. &quot;&#39;\n&quot;)<br>
 os.execute(&quot;sleep 1&quot;)<br>
end -- while<br>
<br>
leg2uuid = new_session:get_uuid();<br>
logline = &quot;Lua leg2uuid (&quot; .. leg2uuid .. &quot;)\n&quot;;<br>
freeswitch.console_log(&quot;info&quot;, logline);<br>
<br>
new_session:setAutoHangup(false);<br>
<br>
exestr_cmd = &quot;uuid_send_dtmf &quot; .. leg2uuid .. &quot; w#w&quot; .. dtmfseq;<br>
logline = &quot;Lua calling api:executeString(&quot; .. exestr_cmd .. &quot;)\n&quot;;<br>
freeswitch.console_log(&quot;info&quot;, logline);<br>
api:executeString(exestr_cmd);<br>
freeswitch.console_log(&quot;info&quot;, &quot;Lua after api:executeString(...)\n&quot;);<br>
<br>
exestr_cmd = &quot;uuid_bridge &quot; .. leg1uuid .. &quot; &quot; .. leg2uuid;<br>
logline = &quot;Lua calling api:executeString(&quot; .. exestr_cmd .. &quot;)\n&quot;;<br>
freeswitch.console_log(&quot;info&quot;, logline);<br>
api:executeString(exestr_cmd);<br>
freeswitch.console_log(&quot;info&quot;, &quot;Lua after api:executeString(...)\n&quot;);<br>
<br>
<br>
This message and any attachments to it are intended only for the addressee(s) identified above and may contain CONFIDENTIAL information. It is not intended for transmission to, or receipt by, any unauthorized persons.  If you are not an intended recipient or an agent responsible for delivering it to an intended recipient, you have received this e-mail in error and any dissemination, distribution, or copying of this message or any attachment to it is strictly prohibited. If you have received this email in error, please (i) do not read it, (ii) reply to the sender that you received the message in error, and (iii) erase or destroy the message from your system.<br>

<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>
</blockquote></div><br>