uuid_bridge, uuid_broadcast is not working
Hi, I am creating a script in Lua to originate 2 calls, bridge them and then play a file using uuid_bridge and uuid_brodcast but unable to get the result and call hangup. my code is as follows: * cli = "1111";* * caller = "1000";* * dest = "1001";* * profile= "internal";* * param = "{ignore_early_media=flase,origination_caller_id_number="..cli.."}";* * * * api = freeswitch.API();* * domain = api:executeString("eval ${domain}");* * * * file = "/usr/local/freeswitch/sounds/test_unset.wav";* * * * session1 = freeswitch.Session(param.."sofia/"..profile.."/".. caller .."%"..domain);* * session2 = freeswitch.Session(param.."sofia/"..profile.."/".. dest .."%"..domain);* * * * uuid1 = tostring(session1:get_uuid());* * uuid2 = tostring(session2:get_uuid());* * * * api:executeString("uuid_bridge "..uuid1.." "..uuid2);* * api:executeString("uuid_broadcast "..uuid1.." "..file.." aleg");* and the fs_cli log is as : 2012-10-05 22:06:57.386448 [NOTICE] sofia.c:6318 Channel [sofia/internal/1001] has been answered 2012-10-05 22:06:57.406452 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/1001) Running State Change CS_SOFT_EXECUTE 2012-10-05 22:06:57.406452 [DEBUG] switch_core_state_machine.c:423 (sofia/internal/1001) State SOFT_EXECUTE 2012-10-05 22:06:57.406452 [DEBUG] mod_sofia.c:588 SOFIA SOFT_EXECUTE 2012-10-05 22:06:57.406452 [DEBUG] switch_core_state_machine.c:241 sofia/internal/1001 Standard SOFT_EXECUTE 2012-10-05 22:06:57.406452 [DEBUG] switch_core_state_machine.c:423 (sofia/internal/1001) State SOFT_EXECUTE going to sleep 2012-10-05 22:06:57.406452 [INFO] switch_channel.c:2711 sofia/internal/1001 Flipping CID from "" <1111> to "Outbound Call" <1001%192.168.0.19> 2012-10-05 22:06:57.406452 [INFO] switch_channel.c:2711 sofia/internal/1000 Flipping CID from "" <1111> to "Outbound Call" <1000%192.168.0.19> 2012-10-05 22:06:57.406452 [DEBUG] switch_ivr_bridge.c:1619 (sofia/internal/1000) State Change CS_SOFT_EXECUTE -> CS_HIBERNATE 2012-10-05 22:06:57.406452 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/1000) Running State Change CS_HIBERNATE 2012-10-05 22:06:57.426425 [DEBUG] switch_core_session.c:1205 Send signal sofia/internal/1000 [BREAK] 2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:432 (sofia/internal/1000) State HIBERNATE 2012-10-05 22:06:57.426425 [DEBUG] mod_sofia.c:222 sofia/internal/1000 SOFIA HIBERNATE 2012-10-05 22:06:57.426425 [DEBUG] switch_ivr_bridge.c:749 (sofia/internal/1000) State Change CS_HIBERNATE -> CS_RESET 2012-10-05 22:06:57.426425 [DEBUG] switch_core_session.c:1205 Send signal sofia/internal/1000 [BREAK] 2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:432 (sofia/internal/1000) State HIBERNATE going to sleep 2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/1000) Running State Change CS_RESET 2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:413 (sofia/internal/1000) State RESET 2012-10-05 22:06:57.426425 [DEBUG] mod_sofia.c:166 sofia/internal/1000 SOFIA RESET 2012-10-05 22:06:57.426425 [DEBUG] switch_ivr_bridge.c:734 sofia/internal/1000 CUSTOM RESET 2012-10-05 22:06:57.426425 [DEBUG] switch_ivr_bridge.c:741 (sofia/internal/1000) State Change CS_RESET -> CS_SOFT_EXECUTE 2012-10-05 22:06:57.426425 [DEBUG] switch_core_session.c:1205 Send signal sofia/internal/1000 [BREAK] 2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:413 (sofia/internal/1000) State RESET going to sleep 2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/1000) Running State Change CS_SOFT_EXECUTE 2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:423 (sofia/internal/1000) State SOFT_EXECUTE 2012-10-05 22:06:57.426425 [DEBUG] mod_sofia.c:588 SOFIA SOFT_EXECUTE 2012-10-05 22:06:57.426425 [DEBUG] switch_ivr_bridge.c:759 sofia/internal/1000 CUSTOM SOFT_EXECUTE 2012-10-05 22:06:57.426425 [DEBUG] switch_channel.c:2849 (sofia/internal/1001) Callstate Change ACTIVE -> HANGUP 2012-10-05 22:06:57.426425 [NOTICE] switch_ivr_originate.c:1056 Hangup sofia/internal/1001 [CS_SOFT_EXECUTE] [DESTINATION_OUT_OF_ORDER] 2012-10-05 22:06:57.426425 [DEBUG] switch_channel.c:2872 Send signal sofia/internal/1001 [KILL] 2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/1001) Running State Change CS_HANGUP 2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:602 (sofia/internal/1001) State HANGUP 2012-10-05 22:06:57.426425 [DEBUG] mod_sofia.c:469 Channel sofia/internal/1001 hanging up, cause: DESTINATION_OUT_OF_ORDER 2012-10-05 22:06:57.426425 [DEBUG] switch_core_session.c:1205 Send signal sofia/internal/1001 [BREAK] 2012-10-05 22:06:57.426425 [DEBUG] switch_channel.c:2849 (sofia/internal/1000) Callstate Change ACTIVE -> HANGUP 2012-10-05 22:06:57.426425 [NOTICE] switch_ivr_bridge.c:817 Hangup sofia/internal/1000 [CS_SOFT_EXECUTE] [ORIGINATOR_CANCEL] 2012-10-05 22:06:57.426425 [DEBUG] switch_channel.c:2872 Send signal sofia/internal/1000 [KILL] 2012-10-05 22:06:57.426425 [DEBUG] switch_core_session.c:1205 Send signal sofia/internal/1000 [BREAK] 2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:423 (sofia/internal/1000) State SOFT_EXECUTE going to sleep 2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/1000) Running State Change CS_HANGUP 2012-10-05 22:06:57.426425 [DEBUG] switch_core_session.c:816 Send signal sofia/internal/1001 [BREAK] 2012-10-05 22:06:57.426425 [DEBUG] switch_core_session.c:816 Send signal sofia/internal/1000 [BREAK] 2012-10-05 22:06:57.426425 [DEBUG] mod_sofia.c:517 Sending BYE to sofia/internal/1001 2012-10-05 22:06:57.446365 [DEBUG] switch_cpp.cpp:1007 sofia/internal/1001 destroy/unlink session from object 2012-10-05 22:06:57.446365 [DEBUG] switch_cpp.cpp:1007 sofia/internal/1000 destroy/unlink session from object 2012-10-05 22:06:57.446365 [DEBUG] switch_core_state_machine.c:602 (sofia/internal/1000) State HANGUP 2012-10-05 22:06:57.446365 [DEBUG] switch_core_state_machine.c:47 sofia/internal/1001 Standard HANGUP, cause: DESTINATION_OUT_OF_ORDER 2012-10-05 22:06:57.446365 [DEBUG] switch_core_state_machine.c:602 (sofia/internal/1001) State HANGUP going to sleep 2012-10-05 22:06:57.446365 [DEBUG] switch_core_state_machine.c:393 (sofia/internal/1001) State Change CS_HANGUP -> CS_REPORTING 2012-10-05 22:06:57.446365 [DEBUG] switch_core_session.c:1205 Send signal sofia/internal/1001 [BREAK] 2012-10-05 22:06:57.446365 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/1001) Running State Change CS_REPORTING and the complete fs_cli log is here : http://pastebin.freeswitch.org/19992 I AM USING CentOS 6.2, and FreeSWITCH Version 1.1.beta1 (git-65c4f76 2012-04-25 17-58-41 +0000) kindly help me and your response is highly appreciated. Regards Shahzad Bhatti.
Hi Peter Olsson, Thanks for the reply, now I update with version FreeSWITCH *Version 1.3.0*+git~20121004T132926Z~3d57cbda98 (git 3d57cbd 2012-10-04 13:29:26Z) but the problem is still there. Regards Shahzad Bhatti. On Fri, Oct 5, 2012 at 5:45 PM, < freeswitch-users-request@lists.freeswitch.org> wrote:
Send FreeSWITCH-users mailing list submissions to freeswitch-users@lists.freeswitch.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.freeswitch.org/mailman/listinfo/freeswitch-users or, via email, send a message with subject or body 'help' to freeswitch-users-request@lists.freeswitch.org
You can reach the person managing the list at freeswitch-users-owner@lists.freeswitch.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of FreeSWITCH-users digest..."
Today's Topics:
1. Re: uuid_bridge, uuid_broadcast is not working (Peter Olsson)
---------- Forwarded message ---------- From: Peter Olsson <peter.olsson@visionutveckling.se> To: "freeswitch-users@lists.freeswitch.org" < freeswitch-users@lists.freeswitch.org> Cc: Date: Fri, 5 Oct 2012 12:45:22 +0000 Subject: Re: [Freeswitch-users] uuid_bridge, uuid_broadcast is not working
Before anything else, update your version to a more current one.****
** **
/Peter****
** **
*Från:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *För *Shahzad Bhatti *Skickat:* den 5 oktober 2012 14:27 *Till:* freeswitch-users@lists.freeswitch.org *Ämne:* [Freeswitch-users] uuid_bridge, uuid_broadcast is not working****
** **
Hi,****
** **
I am creating a script in Lua to originate 2 calls, bridge them and then play a file using uuid_bridge and uuid_brodcast but unable to get the result and call hangup.****
my code is as follows:****
** **
* cli = "1111";*****
* caller = "1000";*****
* dest = "1001";*****
* profile= "internal";*****
* param = "{ignore_early_media=flase,origination_caller_id_number="..cli.."}";*****
** **
* api = freeswitch.API();*****
* domain = api:executeString("eval ${domain}");*****
** **
* file = "/usr/local/freeswitch/sounds/test_unset.wav";*****
** **
* session1 = freeswitch.Session(param.."sofia/"..profile.."/".. caller .."%"..domain);*****
* session2 = freeswitch.Session(param.."sofia/"..profile.."/".. dest .."%"..domain);*****
** **
* uuid1 = tostring(session1:get_uuid());*****
* uuid2 = tostring(session2:get_uuid());*****
** **
* api:executeString("uuid_bridge "..uuid1.." "..uuid2);*****
* api:executeString("uuid_broadcast "..uuid1.." "..file.." aleg");* ****
** **
and the fs_cli log is as :****
** **
2012-10-05 22:06:57.386448 [NOTICE] sofia.c:6318 Channel [sofia/internal/1001] has been answered****
2012-10-05 22:06:57.406452 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/1001) Running State Change CS_SOFT_EXECUTE****
2012-10-05 22:06:57.406452 [DEBUG] switch_core_state_machine.c:423 (sofia/internal/1001) State SOFT_EXECUTE****
2012-10-05 22:06:57.406452 [DEBUG] mod_sofia.c:588 SOFIA SOFT_EXECUTE****
2012-10-05 22:06:57.406452 [DEBUG] switch_core_state_machine.c:241 sofia/internal/1001 Standard SOFT_EXECUTE****
2012-10-05 22:06:57.406452 [DEBUG] switch_core_state_machine.c:423 (sofia/internal/1001) State SOFT_EXECUTE going to sleep****
2012-10-05 22:06:57.406452 [INFO] switch_channel.c:2711 sofia/internal/1001 Flipping CID from "" <1111> to "Outbound Call" <1001%192.168.0.19>****
2012-10-05 22:06:57.406452 [INFO] switch_channel.c:2711 sofia/internal/1000 Flipping CID from "" <1111> to "Outbound Call" <1000%192.168.0.19>****
2012-10-05 22:06:57.406452 [DEBUG] switch_ivr_bridge.c:1619 (sofia/internal/1000) State Change CS_SOFT_EXECUTE -> CS_HIBERNATE****
2012-10-05 22:06:57.406452 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/1000) Running State Change CS_HIBERNATE****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_session.c:1205 Send signal sofia/internal/1000 [BREAK]****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:432 (sofia/internal/1000) State HIBERNATE****
2012-10-05 22:06:57.426425 [DEBUG] mod_sofia.c:222 sofia/internal/1000 SOFIA HIBERNATE****
2012-10-05 22:06:57.426425 [DEBUG] switch_ivr_bridge.c:749 (sofia/internal/1000) State Change CS_HIBERNATE -> CS_RESET****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_session.c:1205 Send signal sofia/internal/1000 [BREAK]****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:432 (sofia/internal/1000) State HIBERNATE going to sleep****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/1000) Running State Change CS_RESET****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:413 (sofia/internal/1000) State RESET****
2012-10-05 22:06:57.426425 [DEBUG] mod_sofia.c:166 sofia/internal/1000 SOFIA RESET****
2012-10-05 22:06:57.426425 [DEBUG] switch_ivr_bridge.c:734 sofia/internal/1000 CUSTOM RESET****
2012-10-05 22:06:57.426425 [DEBUG] switch_ivr_bridge.c:741 (sofia/internal/1000) State Change CS_RESET -> CS_SOFT_EXECUTE****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_session.c:1205 Send signal sofia/internal/1000 [BREAK]****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:413 (sofia/internal/1000) State RESET going to sleep****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/1000) Running State Change CS_SOFT_EXECUTE****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:423 (sofia/internal/1000) State SOFT_EXECUTE****
2012-10-05 22:06:57.426425 [DEBUG] mod_sofia.c:588 SOFIA SOFT_EXECUTE****
2012-10-05 22:06:57.426425 [DEBUG] switch_ivr_bridge.c:759 sofia/internal/1000 CUSTOM SOFT_EXECUTE****
2012-10-05 22:06:57.426425 [DEBUG] switch_channel.c:2849 (sofia/internal/1001) Callstate Change ACTIVE -> HANGUP****
2012-10-05 22:06:57.426425 [NOTICE] switch_ivr_originate.c:1056 Hangup sofia/internal/1001 [CS_SOFT_EXECUTE] [DESTINATION_OUT_OF_ORDER]****
2012-10-05 22:06:57.426425 [DEBUG] switch_channel.c:2872 Send signal sofia/internal/1001 [KILL]****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/1001) Running State Change CS_HANGUP****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:602 (sofia/internal/1001) State HANGUP****
2012-10-05 22:06:57.426425 [DEBUG] mod_sofia.c:469 Channel sofia/internal/1001 hanging up, cause: DESTINATION_OUT_OF_ORDER****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_session.c:1205 Send signal sofia/internal/1001 [BREAK]****
2012-10-05 22:06:57.426425 [DEBUG] switch_channel.c:2849 (sofia/internal/1000) Callstate Change ACTIVE -> HANGUP****
2012-10-05 22:06:57.426425 [NOTICE] switch_ivr_bridge.c:817 Hangup sofia/internal/1000 [CS_SOFT_EXECUTE] [ORIGINATOR_CANCEL]****
2012-10-05 22:06:57.426425 [DEBUG] switch_channel.c:2872 Send signal sofia/internal/1000 [KILL]****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_session.c:1205 Send signal sofia/internal/1000 [BREAK]****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:423 (sofia/internal/1000) State SOFT_EXECUTE going to sleep****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/1000) Running State Change CS_HANGUP****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_session.c:816 Send signal sofia/internal/1001 [BREAK]****
2012-10-05 22:06:57.426425 [DEBUG] switch_core_session.c:816 Send signal sofia/internal/1000 [BREAK]****
2012-10-05 22:06:57.426425 [DEBUG] mod_sofia.c:517 Sending BYE to sofia/internal/1001****
2012-10-05 22:06:57.446365 [DEBUG] switch_cpp.cpp:1007 sofia/internal/1001 destroy/unlink session from object****
2012-10-05 22:06:57.446365 [DEBUG] switch_cpp.cpp:1007 sofia/internal/1000 destroy/unlink session from object****
2012-10-05 22:06:57.446365 [DEBUG] switch_core_state_machine.c:602 (sofia/internal/1000) State HANGUP****
2012-10-05 22:06:57.446365 [DEBUG] switch_core_state_machine.c:47 sofia/internal/1001 Standard HANGUP, cause: DESTINATION_OUT_OF_ORDER****
2012-10-05 22:06:57.446365 [DEBUG] switch_core_state_machine.c:602 (sofia/internal/1001) State HANGUP going to sleep****
2012-10-05 22:06:57.446365 [DEBUG] switch_core_state_machine.c:393 (sofia/internal/1001) State Change CS_HANGUP -> CS_REPORTING****
2012-10-05 22:06:57.446365 [DEBUG] switch_core_session.c:1205 Send signal sofia/internal/1001 [BREAK]****
2012-10-05 22:06:57.446365 [DEBUG] switch_core_state_machine.c:362 (sofia/internal/1001) Running State Change CS_REPORTING****
** **
and the complete fs_cli log is here : http://pastebin.freeswitch.org/19992 ****
** **
I AM USING CentOS 6.2, and FreeSWITCH Version 1.1.beta1 (git-65c4f76 2012-04-25 17-58-41 +0000)****
** **
kindly help me and your response is highly appreciated.****
** **
Regards****
** **
Shahzad Bhatti.****
!DSPAM:506ecf7032761330817986! ****
_______________________________________________ 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
On Fri, Oct 5, 2012 at 6:26 AM, Shahzad Bhatti <shahzad.bhatti@g-r-v.com> wrote:
I am creating a script in Lua to originate 2 calls, bridge them and then play a file using uuid_bridge and uuid_brodcast but unable to get the result and call hangup.
If you remove the broadcast, and just focus on the bridge, is it working? It doesn't look like it. If you start to channels and try to bridge them, they both have to be fully setup or the bridge will not work. Mess around with parking and then bridging until you get the order of things worked out. Good luck and let us know what you figure out. Gabe
On Fri, Oct 5, 2012 at 7:01 PM, Gabriel Gunderson <gabe@gundy.org> wrote:
On Fri, Oct 5, 2012 at 6:26 AM, Shahzad Bhatti <shahzad.bhatti@g-r-v.com> wrote:
I am creating a script in Lua to originate 2 calls, bridge them and then play a file using uuid_bridge and uuid_brodcast but unable to get the result and call hangup.
If you remove the broadcast, and just focus on the bridge, is it working? It doesn't look like it. If you start to channels and try to bridge them, they both have to be fully setup or the bridge will not work. Mess around with parking and then bridging until you get the order of things worked out.
Good luck and let us know what you figure out.
To add to Gabe's input, it's always best to try these things at the CLI to make sure you get the hang of it. If you can't get it to work at the fs_cli then you'll never get it working in a script. It's also easier to experiment when using fs_cli. Let us know what you discover. If there's time we can even talk about this on the Wednesday conference call if others are interested in what uuid_bridge and uuid_broadcast do.
Thanks, MC
participants (3)
-
Gabriel Gunderson
-
Michael Collins
-
Shahzad Bhatti