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