Hi everyone. I have this problem making outbound call. Maybe someone can help me with this. I'm have a service in C (TCP Server), where i receive all calls. +--------+ +--------+ | A 1001 |--> make call -> dialplan -> | socket | +--------+ +--------+ <extension name="outcalls"> <condition> <action application="socket" data="127.0.0.1:8084 async full"/> <action application="hangup"/> </condition> </extension> After i accept the connection on port 8084 i send a connect command, and receive the CHANNEL_DATA event. In this service I do all the work of billing and control of active calls. I have a internal structure, of my extensions (numbers in my FS) IF EXTENSION HAVE MONEY i will send this commands to connection to make a bridge between A [1001] and B [1003] **** sendmsg\n call-command: execute\n execute-app-name: set\n execute-app-arg: dialed_extension=1003\n\n sendmsg\n call-command: execute\n execute-app-name: export\n execute-app-arg: dialed_extension=1003 sendmsg\n call-command: execute\n execute-app-name: set\n execute-app-arg: bypass_media=true\n\n sendmsg\n call-command: execute\n execute-app-name: set\n execute-app-arg: call_timeout=30\n\n sendmsg\n call-command: execute\n execute-app-name: set\n execute-app-arg: hangup_after_bridge=true\n\n sendmsg\n call-command: execute\n execute-app-name: set\n execute-app-arg: continue_on_fail=true\n\n sendmsg\n call-command: execute\n execute-app-name: bridge\n execute-app-arg: user/${dialed_extension}@${domain_name}\n\n **** - Call work fine, WITHOUT <uuid>, WITH <uuid> i receive this WARNING - [WARNING] mod_sofia.c:1281 Asynchronous PTIME not supported, changing our end from 30 to 20 The phone ring, and i answer the call, normal! But now I stopped because I not know, how to CANCEL the bridge (UNBRIDGE) and do something with the A-leg. "Something, like, HANGUP B-leg, and play a sound file to A-leg, then hangup the call." I tried, but all commands i have sended like sendmsg\n call-command: execute\n execute-app-name: hangup\n execute-app-arg: CHANNEL_UNACCEPTABLE\n\n or sendmsg\n call-command: execute\n execute-app-name: break\n\n Do nothing with the call I tried with and without "event-lock: true" I receive only this in FS log [DEBUG] switch_core_session.c:1151 Send signal sofia/internal/ 1001@192.168.211.69[BREAK] I tried with and without "event-lock: true" 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 or to simple hangup a call I receive this in FS console LOG after a-leg or bleg hangup a phone and call terminated [DEBUG] switch_ivr.c:614 sofia/internal/1001@192.168.211.69Command Execute hangup() [DEBUG] switch_core_session.c:2614 sofia/internal/1001@192.168.211.69Channel is hungup and application 'hangup' does not have the zombie_exec flag. [DEBUG] switch_ivr.c:657 sofia/internal/1001@192.168.211.69 skip receive message [AUDIO_SYNC] (channel is hungup already) This is for each "sendmsg" i send after bridge was answered. Sorry about my english...
Hi Luiz, Try the following to control the a-leg and b-leg after a successful bridge, using ESL. 1. Create an extension in your dialplan for the b-leg; this may simply hangup, or play a message then hangup If you use: sendmsg call-command: hangup hangup-cause: CHANNEL_UNACCEPTABLE\n\n then both sides will drop. Try sending this on the socket instead (you will need the uuid from the CHANNEL_DATA event for this one): api uuid_transfer <uuid> -bleg <B_LEG_EXT> xml default (this should get rid of bleg and keep a-leg.for further processing) Hope this helps, Ian. On Tue, May 6, 2014 at 12:24 AM, Luiz Fernando Softov < fernando@softov.com.br> wrote:
Hi everyone.
I have this problem making outbound call. Maybe someone can help me with this.
I'm have a service in C (TCP Server), where i receive all calls.
+--------+ +--------+ | A 1001 |--> make call -> dialplan -> | socket | +--------+ +--------+
<extension name="outcalls"> <condition> <action application="socket" data="127.0.0.1:8084 async full"/> <action application="hangup"/> </condition> </extension>
After i accept the connection on port 8084 i send a connect command, and receive the CHANNEL_DATA event.
In this service I do all the work of billing and control of active calls.
I have a internal structure, of my extensions (numbers in my FS)
IF EXTENSION HAVE MONEY i will send this commands to connection
to make a bridge between A [1001] and B [1003]
****
sendmsg\n call-command: execute\n execute-app-name: set\n execute-app-arg: dialed_extension=1003\n\n
sendmsg\n call-command: execute\n execute-app-name: export\n execute-app-arg: dialed_extension=1003
sendmsg\n call-command: execute\n execute-app-name: set\n execute-app-arg: bypass_media=true\n\n
sendmsg\n call-command: execute\n execute-app-name: set\n execute-app-arg: call_timeout=30\n\n
sendmsg\n call-command: execute\n execute-app-name: set\n execute-app-arg: hangup_after_bridge=true\n\n
sendmsg\n call-command: execute\n execute-app-name: set\n execute-app-arg: continue_on_fail=true\n\n
sendmsg\n call-command: execute\n execute-app-name: bridge\n execute-app-arg: user/${dialed_extension}@${domain_name}\n\n
****
- Call work fine, WITHOUT <uuid>, WITH <uuid> i receive this WARNING - [WARNING] mod_sofia.c:1281 Asynchronous PTIME not supported, changing our end from 30 to 20
The phone ring, and i answer the call, normal!
But now I stopped because I not know, how to CANCEL the bridge (UNBRIDGE) and do something with the A-leg.
"Something, like, HANGUP B-leg, and play a sound file to A-leg, then hangup the call."
I tried, but all commands i have sended like
sendmsg\n call-command: execute\n execute-app-name: hangup\n execute-app-arg: CHANNEL_UNACCEPTABLE\n\n
or
sendmsg\n call-command: execute\n execute-app-name: break\n\n
Do nothing with the call
I tried with and without "event-lock: true"
I receive only this in FS log
[DEBUG] switch_core_session.c:1151 Send signal sofia/internal/ 1001@192.168.211.69[BREAK]
I tried with and without "event-lock: true"
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
or to simple hangup a call
I receive this in FS console LOG after a-leg or bleg hangup a phone and call terminated
[DEBUG] switch_ivr.c:614 sofia/internal/1001@192.168.211.69Command Execute hangup() [DEBUG] switch_core_session.c:2614 sofia/internal/1001@192.168.211.69Channel is hungup and application 'hangup' does not have the zombie_exec flag. [DEBUG] switch_ivr.c:657 sofia/internal/1001@192.168.211.69 skip receive message [AUDIO_SYNC] (channel is hungup already)
This is for each "sendmsg" i send after bridge was answered.
Sorry about my english...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (2)
-
Ian McMaster
-
Luiz Fernando Softov