<div dir="ltr">Ok, I will try this approach. Am I right, that in order to handle oubound calls similiar to inbound, I will have to spawn new thread for each call?<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/10/5 Guillermo Ruiz Camauer <span dir="ltr">&lt;<a href="mailto:grcamauer@gmail.com" target="_blank">grcamauer@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">I have a Dialer that uses ESL from C, but I make an inbound connection to Freeswitch.  It is a socket which I keep open permanently.<div>I recommend reading chapter 4 of the FreeSwitch Cookbook.</div><div><br>

</div><div>Guillermo</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Fri, Oct 4, 2013 at 5:09 AM, Marcin S <span dir="ltr">&lt;<a href="mailto:ms4esl@gmail.com" target="_blank">ms4esl@gmail.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div><div><div>Hello,<br><br></div>I&#39;m trying to switch 
from dialogic api to freeswitch/esl. Dealing with inbound calls is easy 
(using esl outbound socket), however i have some problems with outbound 
calls.<br>
</div>My application is written in C. I create a handle to esl (esl_connect), then issue &quot;bgapi originate ... &amp;socket(<a href="http://127.0.0.1:8084" target="_blank">127.0.0.1:8084</a> async full)&quot; in order to handle this connection just like inbound call. So far so good.<br>


</div>
Here come the problems:<br></div><br>1. esl creates new thread for my call - thats ok, it was expected - but I do not receive any events on this new handle... <br></div><br>2. esl_events fails - here is some strace output:<br>



<br>[pid 31588] send(5, &quot;filter unique-id a88f1268-2c28-11e3-befa-311d1641c437\n\n&quot;, 55, 0) = 55<br>[pid 31588] recv(5, &quot;Content-Type: command/reply\nReply-Text: +OK filter added. [unique-id]=[a88f1268-2c28-11e3-befa-311d1641c437]\n\n&quot;, 65535, 0) = 110<br>



[pid 31588] send(5, &quot;event plain ALL\n\n&quot;, 17, 0) = 17<br>[pid 31588] recv(5, &quot;Content-Type: command/reply\nReply-Text: -ERR command not found\n\n&quot;, 65535, 0) = 64<br>[pid 31588] send(5, &quot;linger&quot;, 6, 0)     = 6<br>



[pid 31588] send(5, &quot;\n\n&quot;, 2, 0)       = 2<br>[pid 31588] recv(5, &quot;Content-Type: command/reply\nReply-Text: -ERR command not found\n\n&quot;, 65535, 0) = 64<br><br></div>3. how can i distinguish, whether this call is successfull or not? <br>



<div><br></div>What am I doing wrong?</div>
<br></div></div>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">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" target="_blank">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><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Guillermo Ruiz Camauer<br>
</font></span></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>