[Freeswitch-users] Inbound Event_Socket SendMsg problems

Anthony Minessale anthony.minessale at gmail.com
Fri Jul 18 10:51:53 PDT 2008


event socket proto never uses \r try omitting them all.


On Fri, Jul 18, 2008 at 12:41 PM, Anthony Knight <tntknight at 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 at 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 at 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 at 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 at 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 at 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 at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080718/0e1a8cd2/attachment-0002.html 


More information about the FreeSWITCH-users mailing list