<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">You are using inbound sockets so you need to tell the system the UUID of the call you wish to execute the application on.</span></div>

<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">See:</span></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br>

</span></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">[pid 32635] recv(6, &quot;Content-Type: command/reply\nReply-Text: -ERR invalid session id []\n\n&quot;, 65535, 0) = 68</span><br>

</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">You are missing a parameter.</span></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">Message should be:</span></div>

<div class="gmail_default"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">SendMsg </span><font face="arial, sans-serif">2b06b28a-3018-11e3-959e-8b8d1e220731</font></div><div class="gmail_default">

<font face="arial, sans-serif">call-command: execute</font></div><div class="gmail_default"><font face="arial, sans-serif">execute-app-name: playback</font></div><div class="gmail_default"><font face="arial, sans-serif">execute-app-arg: e.wav</font></div>

<div class="gmail_default"><font face="arial, sans-serif">event-lock: true</font></div><div class="gmail_default"><font face="arial, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, sans-serif">Does that help?</font></div>

<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(51,51,153)"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br></span></div></div><div class="gmail_extra">

<br clear="all"><div><pre style="word-wrap:break-word;white-space:pre-wrap"><font face="verdana, sans-serif" color="#333399">______________________________</font><font size="1" face="verdana, sans-serif" color="#333399">

Callum Guy
Developer

X-on
Framlingham Technology Centre
Station Road, Framlingham,
Suffolk, IP13 9EZ

T       0333 332 0116
E       <a href="mailto:callum.guy@x-on.co.uk" target="_blank">callum.guy@x-on.co.uk</a>


<img src="http://www.x-ondata.com/images/footerv2.jpg">
<br></font></pre><pre style="word-wrap:break-word;white-space:pre-wrap"><font size="1" face="verdana, sans-serif" color="#333399">X-on is a trading name of Storacall Technology Ltd a limited company registered in England and Wales
Registered Office : Avaland House, 110 London Road, Apsley, Hemel Hempstead, Herts, HP3 9SD  
Company Registration No. 2578478 

This email has been sent from X-on.The contents and attachments are confidential to the sender and the intended addressees.If the message
is received by anyone other than the addressee please return the message to the sender by replying to it and then delete the message from 
your computer without copying or disclosing the contents to anyone.Opinions, conclusions and statements of intent in this email are those of
the sender and do not bind X-on unless confirmed by authorised representatives independently of this message.While best endeavours have 
been taken to avoid transmission of viruses, it is the responsibility of the recipient to scan for these.Please note emails sent to and from X-on 
are routinely monitored for record keeping and quality control, to ensure regulatory compliance and prevent unauthorised use of our systems.

</font><font size="1" face="verdana, sans-serif" color="#006600">Please consider the environment before printing this email.</font></pre></div>
<br><br><div class="gmail_quote">On 8 October 2013 14:06, Marcin S <span dir="ltr">&lt;<a href="mailto:ms4esl@gmail.com" target="_blank">ms4esl@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div><div>Some more info, output from strace:<br></div><br>create_uid/filter/myevents/event - all OK<br><br>[pid 32639] recv(6, &quot;Content-Type: auth/request\n\n&quot;, 65535, 0) = 28<br>[pid 32639] send(6, &quot;auth ClueCon\n\n&quot;, 14, 0) = 14<br>


[pid 32639] recv(6, &quot;Content-Type: command/reply\nReply-Text: +OK accepted\n\n&quot;, 65535, 0) = 54<br>[pid 32639] send(6, &quot;api create_uuid&quot;, 15, 0) = 15<br>[pid 32639] send(6, &quot;\n\n&quot;, 2, 0)       = 2<br>


[pid 32639] recv(6, &quot;Content-Type: api/response\nContent-Length: 36\n\n&quot;, 65535, 0) = 47<br>[pid 32639] recv(6, &quot;67b9c26c-3018-11e3-87c1-311d1641c437&quot;, 65535, 0) = 36<br>[pid 32639] send(6, &quot;filter unique-id 67b9c26c-3018-11e3-87c1-311d1641c437\n\n&quot;, 55, 0) = 55<br>


[pid 32639] recv(6, &quot;Content-Type: command/reply\nReply-Text: +OK filter added. [unique-id]=[67b9c26c-3018-11e3-87c1-311d1641c437]\n\n&quot;, 65535, 0) = 110<br>[pid 32639] send(6, &quot;myevents 67b9c26c-3018-11e3-87c1-311d1641c437&quot;, 45, 0) = 45<br>


[pid 32639] send(6, &quot;\n\n&quot;, 2, 0)       = 2<br>[pid 32639] recv(6, &quot;Content-Type: command/reply\nReply-Text: +OK Events Enabled\n\n&quot;, 65535, 0) = 60<br>[pid 32639] send(6, &quot;event plain ALL\n\n&quot;, 17, 0) = 17<br>


[pid 32639] recv(6, &quot;Content-Type: command/reply\nReply-Text: +OK event listener enabled plain\n\n&quot;, 65535, 0) = 74<br><br><br>linger fails:<br>[pid 32639] send(6, &quot;linger&quot;, 6, 0)     = 6<br>[pid 32639] send(6, &quot;\n\n&quot;, 2, 0)       = 2<br>


[pid 32639] recv(6, &quot;Content-Type: command/reply\nReply-Text: -ERR not controlling a session\n\n&quot;, 65535, 0) = 72<br><br><br>originate - OK<br>[pid 32635] send(6, &quot;api originate {origination_uuid=67b9c26c-3018-11e3-87c1-311d1641c437}sofia/gateway/aster/473 &amp;park&quot;, 98, 0) = 98<br>


[pid 32635] send(6, &quot;\n\n&quot;, 2, 0)       = 2<br>[pid 32635] recv(6, &quot;Content-Type: api/response\nContent-Length: 41\n\n&quot;, 65535, 0) = 47<br>[pid 32635] recv(6, &quot;+OK 67b9c26c-3018-11e3-87c1-311d1641c437\n&quot;, 65535, 0) = 41<br>


<br><br></div>After CHANNEL_ANSWER there is a call to &quot;playback&quot;<br><br>[pid 32635] send(6, &quot;sendmsg\ncall-command: execute\nexecute-app-name: playback\nexecute-app-arg: /usrCC/CC/scenariusze/ScenTest-test/play/POLSKI/EWA//menu.wav\n\n&quot;, 137, 0) = 137<br>


[pid 32635] recv(6, &quot;Content-Type: command/reply\nReply-Text: -ERR invalid session id []\n\n&quot;, 65535, 0) = 68<br>[pid 32639] recv(6, &quot;Content-Length: 1925\nContent-Type: text/event-plain\n\n&quot;, 65535, 0) = 53<br>


[pid 32639] recv(6, &quot;Event-Name: CHANNEL_CALLSTATE\nCore-UUID: 00fda624-2a7d-11e3-b4b2-311d1641c437\nFreeSWITCH-Hostname: fs-devel.altar\nFreeSWITCH-Switchname: fs-devel.altar\nFreeSWITCH-IPv4: 192.168.2.44\nFreeSWITCH-IPv6: %3A%3A1\nEvent-Date-Local: 2013-10-08%2014%3A52%3A53\nEvent-Date-GMT: Tue,%2008%20Oct%202013%2012%3A52%3A53%20GMT\nEvent-Date-Timestamp: 1381236773305888\nEvent-Calling-File: switch_channel.c\nEvent-Calling-Function: switch_channel_perform_set_callstate\nEvent-Calling-Line-Number: 242\nEvent-Sequence: 274033\nOriginal-Channel-Call-State: ACTIVE\nChannel-Call-State-Number: 6\nChannel-State: CS_EXECUTE\nChannel-Call-State: HANGUP\nChannel-State-Number: 10\nChannel-Name: sofia/external/473\nUnique-ID: 67b9c26c-3018-11e3-87c1-311d1641c437\nCall-Direction: outbound\nPresence-Call-Direction: outbound\nChannel-HIT-Dialplan: true\nChannel-Call-UUID: 67b9c26c-3018-11e3-87c1-311d1641c437\nAnswer-State: hangup\nChannel-Read-Codec-Name: PCMA\nChannel-Read-Codec-Rate: 8000\nChannel-Read-Codec-Bit-Rate: 64000\nChannel-Write-Codec-Name: PCMA\nChannel-Write-Codec-Rate: 8000\nChannel-Write-Codec-Bit-Rate: 64000\nCaller-Direction: outbound\nCaller-Caller-ID-Name: Outbound%20Call\nCaller-Caller-ID-Number: 473\nCaller-Network-Addr: 192.168.2.97\nCaller-Destination-Number: 473\nCaller-Unique-ID: 67b9c26c-3018-11e3-87c1-311d1641c437\nCaller-Source: src/switch_ivr_originate.c\nCaller-Context: default\nCaller-Channel-Name: sofia/external/473\nCaller-Profile-Index: 1\nCaller-Profile-Created-Time: 1381236712904967\nCaller-Channel-Created-Time: 1381236712904967\nCaller-Channel-Answered-Time: 1381236723045094\nCaller-Channel-Progress-Time: 1381236712904967\nCaller-Channel-Progress-Media-Time: 0\nCaller-Channel-Hangup-Time: 0\nCaller-Channel-Transfer-Time: 0\nCaller-Channel-Resurrect-Time: 0\nCaller-Channel-Bridged-Time: 0\nCaller-Channel-Last-Hold: 0\nCaller-Channel-Hold-Accum: 0\nCaller-Screen-Bit: true\nCaller-Privacy-Hide-Name: false\nCaller-Privacy-Hide-Number: false\n\n&quot;, 65535, 0) = 1925<br>


<br><div>How can I control the session in the same way as with socket outbound?<br></div><div><br><br><br><br><br><br><br><br><br><br><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/8 Marcin S <span dir="ltr">&lt;<a href="mailto:ms4esl@gmail.com" target="_blank">ms4esl@gmail.com</a>&gt;</span><br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hello,<br><br></div>I wrote simple C application, wich opens connection to esl - freeswitch and makes call (originate ... &amp;park). So far so good. I get ESL_EVENT_CHANNEL_ORIGINATE, ESL_EVENT_CHANNEL_ANSWER and ESL_EVENT_CHANNEL_PARK. Then I wan&#39;t to play wav file - but playback command returns &quot;-ERR invalid session id []&quot;. What is wrong?<br>



<br></div>Specifying &quot;originate ... &amp;playback&quot; is out of question.<br><div><div><br></div></div></div>
</blockquote></div><br></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><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>
<br></blockquote></div><br></div>