Hi I am having problems using a PHP client (hack using intralanman fs_sock.php) Using the dialplan I send the call to PARK. When I get the CHANNEL_PARK event if I issue: "bgapi uuid_broadcast $uuid /usr/local/freeswitch/socketcode/test.wav\r\n\r\n" (where I grab uuid from unique-id in CHANNEL_PARK event) I get the prompt to play back to me. HOWEVER the following scenarios with SendMsg do not work. If I send "SendMsg 60152374-54ec-11dd-8b83-5bb61f67b40f call_comand: execute execute-app-name: playback execute-app-arg: /usr/local/freeswitch/socketcode/test.wav\r\n\r\n" The reply back is [Content-Type] => command/reply [Reply-Text] => -ERR invalid session id [60152374-54ec-11dd-8b83-5bb61f67b40f [call_comand] => execute [execute-app-name] => playback [execute-app-arg] => /usr/local/freeswitch/socketcode/test.wav]
From the code, this looks like the uuid is not being seperated from the rest of the message when it is being read uuid is within the []?
If I add explicit newlines at the end of each line "SendMsg 60152374-54ec-11dd-8b83-5bb61f67b40f\n call_comand: execute\n execute-app-name: playback\n execute-app-arg: /usr/local/freeswitch/socketcode/test.wav\r\n\r\n" I get back [Content-Type] => command/reply [Reply-Text] => +OK and slightly later a PRIVATE_COMMAND event, [Command] => SendMsg d4bb10c6-54ec-11dd-8b83-5bb61f67b40f [Event-Name] => PRIVATE_COMMAND [Core-UUID] => 8f70f40c-5480-11dd-8b83-5bb61f67b40f [FreeSWITCH-Hostname] => standcanada.tknights.com [FreeSWITCH-IPv4] => 72.249.85.158 [FreeSWITCH-IPv6] => 127.0.0.1 [Event-Date-Local] => 2008-07-18 17:13:24 [Event-Date-GMT] => Fri, 18 Jul 2008 17:13:24 GMT [Event-Date-timestamp] => 1216401204843801 [Event-Calling-File] => switch_ivr.c [Event-Calling-Function] => switch_ivr_parse_next_event [Event-Calling-Line-Number] => 460 and in freeswitch.log I see 2008-07-18 17:13:24 [DEBUG] switch_core_state_machine.c:140 switch_core_standard_on_execute() sofia/default/1008@freeswitch.tknights.com Execute park() 2008-07-18 17:13:24 [DEBUG] switch_core_session.c:611 switch_core_session_queue_private_event() Kill sofia/default/1008@freeswitch.tknights.com [BREAK] 2008-07-18 17:13:24 [ERR] switch_ivr.c:309 switch_ivr_parse_event() Invalid Command! 2008-07-18 17:13:24 [DEBUG] sofia.c:2048 sofia_handle_sip_i_state() Channel sofia/default/1008@freeswitch.tknights.com entering state [ready] 2008-07-18 17:13:35 [DEBUG] sofia.c:2048 sofia_handle_sip_i_state() Channel sofia/default/1008@freeswitch.tknights.com entering state [terminated] which I think means it is not parsing out the "execute" any suggestions on what I'm doing wrong? I'm on Debian Etch, trunk 9072 Thanks Tony
event socket proto never uses \r try omitting them all. On Fri, Jul 18, 2008 at 12:41 PM, Anthony Knight <tntknight@gmail.com> wrote:
Hi
I am having problems using a PHP client (hack using intralanman fs_sock.php) Using the dialplan I send the call to PARK. When I get the CHANNEL_PARK event if I issue:
"bgapi uuid_broadcast $uuid /usr/local/freeswitch/socketcode/test.wav\r\n\r\n"
(where I grab uuid from unique-id in CHANNEL_PARK event) I get the prompt to play back to me.
HOWEVER the following scenarios with SendMsg do not work.
If I send
"SendMsg 60152374-54ec-11dd-8b83-5bb61f67b40f call_comand: execute execute-app-name: playback execute-app-arg: /usr/local/freeswitch/socketcode/test.wav\r\n\r\n"
The reply back is
[Content-Type] => command/reply [Reply-Text] => -ERR invalid session id [60152374-54ec-11dd-8b83-5bb61f67b40f [call_comand] => execute [execute-app-name] => playback [execute-app-arg] => /usr/local/freeswitch/socketcode/test.wav]
From the code, this looks like the uuid is not being seperated from the rest of the message when it is being read uuid is within the []?
If I add explicit newlines at the end of each line
"SendMsg 60152374-54ec-11dd-8b83-5bb61f67b40f\n call_comand: execute\n execute-app-name: playback\n execute-app-arg: /usr/local/freeswitch/socketcode/test.wav\r\n\r\n"
I get back [Content-Type] => command/reply [Reply-Text] => +OK
and slightly later a PRIVATE_COMMAND event,
[Command] => SendMsg d4bb10c6-54ec-11dd-8b83-5bb61f67b40f [Event-Name] => PRIVATE_COMMAND [Core-UUID] => 8f70f40c-5480-11dd-8b83-5bb61f67b40f [FreeSWITCH-Hostname] => standcanada.tknights.com [FreeSWITCH-IPv4] => 72.249.85.158 [FreeSWITCH-IPv6] => 127.0.0.1 [Event-Date-Local] => 2008-07-18 17:13:24 [Event-Date-GMT] => Fri, 18 Jul 2008 17:13:24 GMT [Event-Date-timestamp] => 1216401204843801 [Event-Calling-File] => switch_ivr.c [Event-Calling-Function] => switch_ivr_parse_next_event [Event-Calling-Line-Number] => 460
and in freeswitch.log I see
2008-07-18 17:13:24 [DEBUG] switch_core_state_machine.c:140 switch_core_standard_on_execute() sofia/default/1008@freeswitch.tknights.com Execute park() 2008-07-18 17:13:24 [DEBUG] switch_core_session.c:611 switch_core_session_queue_private_event() Kill sofia/default/1008@freeswitch.tknights.com [BREAK] 2008-07-18 17:13:24 [ERR] switch_ivr.c:309 switch_ivr_parse_event() Invalid Command! 2008-07-18 17:13:24 [DEBUG] sofia.c:2048 sofia_handle_sip_i_state() Channel sofia/default/1008@freeswitch.tknights.com entering state [ready] 2008-07-18 17:13:35 [DEBUG] sofia.c:2048 sofia_handle_sip_i_state() Channel sofia/default/1008@freeswitch.tknights.com entering state [terminated]
which I think means it is not parsing out the "execute"
any suggestions on what I'm doing wrong?
I'm on Debian Etch, trunk 9072
Thanks
Tony
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
too much coffee, not enough sleep.. worked through mod_event_socket.c, switch_ivr.c switch_core_session.c printed out debugging crap and eventually figured out I had coded call_comand not call-command in my sendmsg! Now it works and I'm going to bed... TK On Fri, Jul 18, 2008 at 1:51 PM, Anthony Minessale <anthony.minessale@gmail.com> wrote:
event socket proto never uses \r try omitting them all.
On Fri, Jul 18, 2008 at 12:41 PM, Anthony Knight <tntknight@gmail.com> wrote:
Hi
I am having problems using a PHP client (hack using intralanman fs_sock.php) Using the dialplan I send the call to PARK. When I get the CHANNEL_PARK event if I issue:
"bgapi uuid_broadcast $uuid /usr/local/freeswitch/socketcode/test.wav\r\n\r\n"
(where I grab uuid from unique-id in CHANNEL_PARK event) I get the prompt to play back to me.
HOWEVER the following scenarios with SendMsg do not work.
If I send
"SendMsg 60152374-54ec-11dd-8b83-5bb61f67b40f call_comand: execute execute-app-name: playback execute-app-arg: /usr/local/freeswitch/socketcode/test.wav\r\n\r\n"
The reply back is
[Content-Type] => command/reply [Reply-Text] => -ERR invalid session id [60152374-54ec-11dd-8b83-5bb61f67b40f [call_comand] => execute [execute-app-name] => playback [execute-app-arg] => /usr/local/freeswitch/socketcode/test.wav]
From the code, this looks like the uuid is not being seperated from the rest of the message when it is being read uuid is within the []?
If I add explicit newlines at the end of each line
"SendMsg 60152374-54ec-11dd-8b83-5bb61f67b40f\n call_comand: execute\n execute-app-name: playback\n execute-app-arg: /usr/local/freeswitch/socketcode/test.wav\r\n\r\n"
I get back [Content-Type] => command/reply [Reply-Text] => +OK
and slightly later a PRIVATE_COMMAND event,
[Command] => SendMsg d4bb10c6-54ec-11dd-8b83-5bb61f67b40f [Event-Name] => PRIVATE_COMMAND [Core-UUID] => 8f70f40c-5480-11dd-8b83-5bb61f67b40f [FreeSWITCH-Hostname] => standcanada.tknights.com [FreeSWITCH-IPv4] => 72.249.85.158 [FreeSWITCH-IPv6] => 127.0.0.1 [Event-Date-Local] => 2008-07-18 17:13:24 [Event-Date-GMT] => Fri, 18 Jul 2008 17:13:24 GMT [Event-Date-timestamp] => 1216401204843801 [Event-Calling-File] => switch_ivr.c [Event-Calling-Function] => switch_ivr_parse_next_event [Event-Calling-Line-Number] => 460
and in freeswitch.log I see
2008-07-18 17:13:24 [DEBUG] switch_core_state_machine.c:140 switch_core_standard_on_execute() sofia/default/1008@freeswitch.tknights.com Execute park() 2008-07-18 17:13:24 [DEBUG] switch_core_session.c:611 switch_core_session_queue_private_event() Kill sofia/default/1008@freeswitch.tknights.com [BREAK] 2008-07-18 17:13:24 [ERR] switch_ivr.c:309 switch_ivr_parse_event() Invalid Command! 2008-07-18 17:13:24 [DEBUG] sofia.c:2048 sofia_handle_sip_i_state() Channel sofia/default/1008@freeswitch.tknights.com entering state [ready] 2008-07-18 17:13:35 [DEBUG] sofia.c:2048 sofia_handle_sip_i_state() Channel sofia/default/1008@freeswitch.tknights.com entering state [terminated]
which I think means it is not parsing out the "execute"
any suggestions on what I'm doing wrong?
I'm on Debian Etch, trunk 9072
Thanks
Tony
_______________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400 _______________________________________________ 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)
-
Anthony Knight
-
Anthony Minessale