<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 &lt;<a href="mailto:tntknight@gmail.com">tntknight@gmail.com</a>&gt; 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. &nbsp;When I get the<br>
CHANNEL_PARK event if I issue:<br>
<br>
 &nbsp;&quot;bgapi uuid_broadcast $uuid /usr/local/freeswitch/socketcode/test.wav\r\n\r\n&quot;<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>
&quot;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&quot;<br>
<br>
The reply back is<br>
<br>
 &nbsp; &nbsp;[Content-Type] =&gt; command/reply<br>
 &nbsp; &nbsp;[Reply-Text] =&gt; -ERR invalid session id<br>
[60152374-54ec-11dd-8b83-5bb61f67b40f<br>
 &nbsp; &nbsp;[call_comand] =&gt; execute<br>
 &nbsp; &nbsp;[execute-app-name] =&gt; playback<br>
 &nbsp; &nbsp;[execute-app-arg] =&gt; /usr/local/freeswitch/socketcode/test.wav]<br>
<br>
&gt;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>
&quot;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&quot;<br>
<br>
I get back<br>
 &nbsp; &nbsp;[Content-Type] =&gt; command/reply<br>
 &nbsp; &nbsp;[Reply-Text] =&gt; +OK<br>
<br>
and slightly later a PRIVATE_COMMAND event,<br>
<br>
 &nbsp; &nbsp;[Command] =&gt; SendMsg d4bb10c6-54ec-11dd-8b83-5bb61f67b40f<br>
 &nbsp; &nbsp;[Event-Name] =&gt; PRIVATE_COMMAND<br>
 &nbsp; &nbsp;[Core-UUID] =&gt; 8f70f40c-5480-11dd-8b83-5bb61f67b40f<br>
 &nbsp; &nbsp;[FreeSWITCH-Hostname] =&gt; <a href="http://standcanada.tknights.com" target="_blank">standcanada.tknights.com</a><br>
 &nbsp; &nbsp;[FreeSWITCH-IPv4] =&gt; <a href="http://72.249.85.158" target="_blank">72.249.85.158</a><br>
 &nbsp; &nbsp;[FreeSWITCH-IPv6] =&gt; <a href="http://127.0.0.1" target="_blank">127.0.0.1</a><br>
 &nbsp; &nbsp;[Event-Date-Local] =&gt; 2008-07-18 17:13:24<br>
 &nbsp; &nbsp;[Event-Date-GMT] =&gt; Fri, 18 Jul 2008 17:13:24 GMT<br>
 &nbsp; &nbsp;[Event-Date-timestamp] =&gt; 1216401204843801<br>
 &nbsp; &nbsp;[Event-Calling-File] =&gt; switch_ivr.c<br>
 &nbsp; &nbsp;[Event-Calling-Function] =&gt; switch_ivr_parse_next_event<br>
 &nbsp; &nbsp;[Event-Calling-Line-Number] =&gt; 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 &quot;execute&quot;<br>
<br>
any suggestions on what I&#39;m doing wrong?<br>
<br>
I&#39;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>