OK but how can I respond for received events?<br><br>I subscribe to receive events using following event socket command:<br><br>event plain CHANNEL_CREATE<br><br>then I got all events of that type and that&#39;s great but the question is how can I handle those events, what&#39;s the syntax and where to put it?<br>
<br>I will simply explain what I&#39;m trying to achieve:<br><br>1. User dialed number<br>2. CHANNEL_CREATE event is created<br>3. I got this event using socket<br>4. What to do now? How to respond for that event? For example I would like to respond with dialstring to use, user called number 123, I would like to return something like sofia/gateway123/00123<br>
<br><br><br><div class="gmail_quote">2011/6/30 Steven Ayre <span dir="ltr">&lt;<a href="mailto:steveayre@gmail.com">steveayre@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Yes it&#39;s possible and I suggest you look at esl<br>
<br>
Steve on iPhone<br>
<div><div></div><div class="h5"><br>
On 30 Jun 2011, at 09:54, Mateusz Bartczak &lt;<a href="mailto:netcentrica@gmail.com">netcentrica@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi all<br>
&gt;<br>
&gt; I&#39;m new to FS and I would like to know is it possible to implement following scenario:<br>
&gt;<br>
&gt; 1. User dials number<br>
&gt; 2. Routing script detects outgoing call event. Every call needs to be handled by routing script.<br>
&gt; 3. Routing script takes in input: user name, domain, dialed number. Than it query database to find best SIP trunk to route the call, it also checks destination price per minute and calculates maximum call time for prepaid user.<br>

&gt; 4. Routing script output is: SIP trunk to use, SIP call parameters (ie. callerid), maximum call duration<br>
&gt; 5. FS read output from routing script and make call using returned parameters<br>
&gt;<br>
&gt; Preferred routing implementation technology: background running unix deamon written in Java or PHP. Connection with FS via socket.<br>
&gt;<br>
&gt; Event routing script will be multi-threaded, must be able to deal with a lot of calls in parallel and processing of one call should not block processing of other calls (I have this problem with Yate voip server, and that&#39;s really big problem)<br>

&gt;<br>
&gt; Is it possible to do this using FS?<br>
&gt; Any advices where to search for additional info? I know that there is event handler but can it return &quot;dialstring&quot; for outgoing call events?<br>
&gt; Some code examples?<br>
&gt;<br>
&gt; I will really appreciate your help<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Join us at ClueCon 2011, Aug 9-11, Chicago<br>
&gt; <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
&gt;<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
_______________________________________________<br>
Join us at ClueCon 2011, Aug 9-11, Chicago<br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<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>