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"><<a href="mailto:ZAlex@webley.com">ZAlex@webley.com</a>></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'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'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>
<include><br>
<extension name="bridge_pre_exec"><br>
<condition field="destination_number" expression="^preexec$"><br>
<action application="log" data="INFO bridge_pre_exec request<br>
(${dtmfseq}) (${destination}) (${destip})"/><br>
<action application="answer"/><br>
<action application="set"<br>
data="bridge_pre_execute_bleg_app=send_dtmf"/><br>
<action application="set"<br>
data="bridge_pre_execute_bleg_data=w#w${dtmfseq}"/><br>
<action application="bridge"<br>
data="sofia/internal/${destination}@${destip}"/><br>
<action application="hangup"/><br>
</condition><br>
</extension><br>
</include><br>
----------------------------------------------------------------------<br>
<br>
Example 2.<br>
<br>
<include><br>
<extension name="lua_async"><br>
<condition field="destination_number" expression="^luaasync$"><br>
<action application="log" data="INFO luaasync request (${dtmfseq})<br>
(${destination}) (${destip})"/><br>
<action application="set" data="api_result=${bgapi(lua<br>
lua_async.lua ${dtmfseq} ${destination} ${destip} ${uuid}<br>
${caller_id_number})}"/><br>
<action application="answer"/><br>
<action application="park"/><br>
<action application="hangup"/><br>
</condition><br>
</extension><br>
</include><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 = ") and (";<br>
logline = "Lua called with (" .. dtmfseq .. ands .. phone .. ands ..<br>
destip .. ands .. leg1uuid .. ands .. cid .. ")\n";<br>
freeswitch.console_log("info", logline);<br>
<br>
api = freeswitch.API();<br>
<br>
sofia_destination = "[origination_caller_id_number=" .. cid ..<br>
"]sofia/internal/" .. phone .. "@" .. destip;<br>
new_session = freeswitch.Session(sofia_destination);<br>
dispo = "None";<br>
<br>
while (new_session:ready() and dispo ~= "ANSWER") do<br>
dispo = new_session:getVariable("endpoint_disposition")<br>
<br>
freeswitch.consoleLog("INFO", "disposition is '" .. dispo .. "'\n")<br>
os.execute("sleep 1")<br>
end -- while<br>
<br>
leg2uuid = new_session:get_uuid();<br>
logline = "Lua leg2uuid (" .. leg2uuid .. ")\n";<br>
freeswitch.console_log("info", logline);<br>
<br>
new_session:setAutoHangup(false);<br>
<br>
exestr_cmd = "uuid_send_dtmf " .. leg2uuid .. " w#w" .. dtmfseq;<br>
logline = "Lua calling api:executeString(" .. exestr_cmd .. ")\n";<br>
freeswitch.console_log("info", logline);<br>
api:executeString(exestr_cmd);<br>
freeswitch.console_log("info", "Lua after api:executeString(...)\n");<br>
<br>
exestr_cmd = "uuid_bridge " .. leg1uuid .. " " .. leg2uuid;<br>
logline = "Lua calling api:executeString(" .. exestr_cmd .. ")\n";<br>
freeswitch.console_log("info", logline);<br>
api:executeString(exestr_cmd);<br>
freeswitch.console_log("info", "Lua after api:executeString(...)\n");<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>