<div dir="ltr"><font face="courier new, monospace"><span style="font-size:13px">Hi everyone.</span><br style="font-size:13px"><br style="font-size:13px"><br style="font-size:13px"></font><div style="font-size:13px"><font face="courier new, monospace">I have this problem making outbound call. Maybe someone can help me with this.</font></div>
<div style="font-size:13px"><font face="courier new, monospace"><br><span style="background-color:rgba(255,255,255,0)">I'm have a service in C (TCP Server), where i receive all calls.<br><br><br>+--------+ +--------+</span></font></div>
<div style="font-size:13px"><span style="background-color:rgba(255,255,255,0)"><font face="courier new, monospace">| A 1001 |--> make call -> dialplan -> | socket |</font></span></div><div style="font-size:13px">
<span style="background-color:rgba(255,255,255,0)"><font face="courier new, monospace">+--------+ +--------+</font></span></div><div style><span style="font-size:13px;background-color:rgba(255,255,255,0)"><font face="courier new, monospace"><br>
</font></span><div style="font-size:13px"><span style="background-color:rgba(255,255,255,0)"><font face="courier new, monospace"><extension name="outcalls"></font></span></div><div style="font-size:13px"><span style="background-color:rgba(255,255,255,0)"><font face="courier new, monospace"> <condition></font></span></div>
<div style="font-size:13px"><span style="background-color:rgba(255,255,255,0)"><font face="courier new, monospace"> <action application="socket" data="<a href="http://127.0.0.1:8084/" target="_blank">127.0.0.1:8084</a> async full"/></font></span></div>
<div style="font-size:13px"><span style="background-color:rgba(255,255,255,0)"><font face="courier new, monospace"> <action application="hangup"/></font></span></div><div style="font-size:13px"><span style="background-color:rgba(255,255,255,0)"><font face="courier new, monospace"> </condition></font></span></div>
<div style="font-size:13px"><span style="background-color:rgba(255,255,255,0)"><font face="courier new, monospace"></extension></font></span></div><span style="font-size:13px;background-color:rgba(255,255,255,0)"><font face="courier new, monospace"><br>
</font></span><pre style="font-size:13px;color:rgb(0,0,0)"><font face="courier new, monospace">After i accept the connection on port 8084 i send a connect command,
and receive the CHANNEL_DATA event.</font></pre><span style="font-size:13px;background-color:rgba(255,255,255,0)"><font face="courier new, monospace"><br>In this service I do all the work of billing and control of active calls.<br>
<br>I have a internal structure, of my extensions (numbers in my FS)<br><br></font></span><div style="font-size:13px"><font face="courier new, monospace">IF EXTENSION HAVE MONEY i will send this commands to connection</font></div>
<span style="font-size:13px;background-color:rgba(255,255,255,0)"><font face="courier new, monospace"><div style><span style="font-size:13px;background-color:rgba(255,255,255,0)"><font face="courier new, monospace"><br>to make a bridge between A [1001] and B [1003]<br>
<br></font></span></div></font></span><span style="font-family:'courier new',monospace">****</span></div><div style><span style="background-color:rgba(255,255,255,0)"><font face="courier new, monospace"><br></font></span><div style="font-size:13px">
<font face="courier new, monospace"><span style="background-color:rgba(255,255,255,0)">sendmsg</span>\n<br>call-command: <span style="background-color:rgba(255,255,255,0)">execute\n</span></font></div><div style="font-size:13px">
<font face="courier new, monospace">execute-app-name<span style="background-color:rgba(255,255,255,0)">: set\n<br>execute-app-</span><span style="font-size:small">arg</span><span style="background-color:rgba(255,255,255,0)">: dialed_extension=1003\n\n<br>
<br></span></font></div><div style="font-size:13px"><font face="courier new, monospace"><span style="background-color:rgba(255,255,255,0)">sendmsg</span>\n</font></div><div style="font-size:13px"><font face="courier new, monospace">call-command: <span style="background-color:rgba(255,255,255,0)">execute\n<br>
</span>execute-app-name<span style="background-color:rgba(255,255,255,0)">: export\n<br>execute-app-</span><span style="font-size:small">arg</span><span style="background-color:rgba(255,255,255,0)">: dialed_extension=1003<br>
<br></span></font></div><div style="font-size:13px"><font face="courier new, monospace"><span style="background-color:rgba(255,255,255,0)">sendmsg</span>\n<br>call-command: <span style="background-color:rgba(255,255,255,0)">execute\n<br>
</span>execute-app-name<span style="background-color:rgba(255,255,255,0)">: set\n<br>execute-app-</span><span style="font-size:small">arg</span><span style="background-color:rgba(255,255,255,0)">: bypass_media=true\n\n<br>
<br></span></font></div><div style="font-size:13px"><font face="courier new, monospace"><span style="background-color:rgba(255,255,255,0)">sendmsg</span>\n</font></div><div style="font-size:13px"><font face="courier new, monospace">call-command: <span style="background-color:rgba(255,255,255,0)">execute\n<br>
</span>execute-app-name<span style="background-color:rgba(255,255,255,0)">: set\n<br>execute-app-</span><span style="font-size:small">arg</span><span style="background-color:rgba(255,255,255,0)">: call_timeout=30\n\n<br><br>
</span></font></div><div style="font-size:13px"><font face="courier new, monospace"><span style="background-color:rgba(255,255,255,0)">sendmsg</span>\n<br>call-command: <span style="background-color:rgba(255,255,255,0)">execute\n<br>
</span>execute-app-name<span style="background-color:rgba(255,255,255,0)">: set\n<br>execute-app-</span><span style="font-size:small">arg</span><span style="background-color:rgba(255,255,255,0)">: hangup_after_bridge=true\n\n<br>
<br></span></font></div><div style="font-size:13px"><font face="courier new, monospace"><span style="background-color:rgba(255,255,255,0)">sendmsg</span>\n</font></div><div style="font-size:13px"><font face="courier new, monospace">call-command:<span style="background-color:rgba(255,255,255,0)"> execute\n<br>
</span>execute-app-name<span style="background-color:rgba(255,255,255,0)">: set\n<br>execute-app-</span><span style="font-size:small">arg</span><span style="background-color:rgba(255,255,255,0)">: continue_on_fail=true\n\n<br>
<br></span></font></div><div style="font-size:13px"><font face="courier new, monospace"><span style="background-color:rgba(255,255,255,0)">sendmsg</span>\n</font></div><div style="font-size:13px"><font face="courier new, monospace">call-command:<span style="background-color:rgba(255,255,255,0)"> execute\n<br>
</span>execute-app-name<span style="background-color:rgba(255,255,255,0)">: bridge\n<br>execute-app-</span><span style="font-size:small">arg</span><span style="background-color:rgba(255,255,255,0)">: user/${dialed_extension}@${domain_name}\n\n</span></font></div>
<font face="courier new, monospace" style><span style="background-color:rgba(255,255,255,0)"><div style><font face="courier new, monospace" style><span style="background-color:rgba(255,255,255,0)"><br></span></font></div>
<div style><font face="courier new, monospace" style><span style="background-color:rgba(255,255,255,0)">****</span></font></div><br>- Call work fine, </span></font><span style="font-family:'courier new',monospace">WITHOUT </span><font face="courier new, monospace" style><span style="background-color:rgba(255,255,255,0)"><uuid>, WITH </span></font><span style="font-family:'courier new',monospace"><uuid> </span><font face="courier new, monospace" style><span style="background-color:rgba(255,255,255,0)">i receive this WARNING<br>
</span></font><font face="courier new, monospace" style><span style="background-color:rgba(255,255,255,0)">- [WARNING] mod_sofia.c:1281 Asynchronous PTIME not supported, changing our end from 30 to 20<br><br>The phone ring, and i answer the call, normal!<br>
<br><br></span></font></div><div style><font face="courier new, monospace" style><span style="background-color:rgba(255,255,255,0)">But now I stopped because I not know, how to CANCEL the bridge (UNBRIDGE) and do something with the A-leg.<br>
<br><br>"Something, like, HANGUP B-leg, and play a sound file to A-leg, then hangup the call." <br><br>I tried, but all commands i have sended like <br><br>sendmsg</span>\n</font></div><div style><font face="courier new, monospace">call-command:<span style="font-size:13px;background-color:rgba(255,255,255,0)"> execute\n<br>
</span>execute-app-name<span style="background-color:rgba(255,255,255,0)">: hangup\n<br>execute-app-arg: CHANNEL_UNACCEPTABLE\n\n<br><br>or <br><br>sendmsg</span>\n</font></div><div style="font-size:13px"><font face="courier new, monospace">call-command:<span style="background-color:rgba(255,255,255,0)"> execute\n<br>
</span><span style="font-size:small">execute-app-name</span><span style="background-color:rgba(255,255,255,0)">: break\n\n<br><br>Do nothing with the call<br><br></span></font><span style="font-family:'courier new',monospace">I tried with and without "event-lock: true"</span><font face="courier new, monospace"><span style="background-color:rgba(255,255,255,0)"><br>
<br>I receive only this in FS log<br><br>[DEBUG] switch_core_session.c:1151 Send signal sofia/internal/<a style="color:rgb(34,34,34)">1001@192.168.211.69</a>[BREAK]<br><br>I tried with and without "event-lock: true"<br>
<br>I need to do this such as: credit is over, I need to cancel the current bridge and play a sound to the user and hangup call<br><br>or to simple hangup a call</span></font></div><div style="font-size:13px"><font face="courier new, monospace"><br>
<span style="background-color:rgba(255,255,255,0)"></span></font><div><font style="background-color:rgba(255,255,255,0)" face="courier new, monospace">I receive this in FS console LOG after a-leg or bleg hangup a phone and call terminated<br>
<br><div>[DEBUG] switch_ivr.c:614 sofia/internal/<a style="color:rgb(34,34,34)">1001@192.168.211.69</a>Command Execute hangup()</div><div>[DEBUG] switch_core_session.c:2614 sofia/internal/<a style="color:rgb(34,34,34)">1001@192.168.211.69</a>Channel is hungup and application 'hangup' does not have the zombie_exec flag.</div>
<div>[DEBUG] switch_ivr.c:657 sofia/internal/<a style="color:rgb(34,34,34)">1001@192.168.211.69</a> skip receive message [AUDIO_SYNC] (channel is hungup already)</div><div><br></div><div><span style="background-color:rgba(255,255,255,0)">This is for each "sendmsg" i send after bridge was answered.</span><br>
</div></font></div></div><div><font face="courier new, monospace"><br><br>Sorry about my english...</font>
</div></div>