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's great but the question is how can I handle those events, what's the syntax and where to put it?<br>
<br>I will simply explain what I'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"><<a href="mailto:steveayre@gmail.com">steveayre@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Yes it'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 <<a href="mailto:netcentrica@gmail.com">netcentrica@gmail.com</a>> wrote:<br>
<br>
> Hi all<br>
><br>
> I'm new to FS and I would like to know is it possible to implement following scenario:<br>
><br>
> 1. User dials number<br>
> 2. Routing script detects outgoing call event. Every call needs to be handled by routing script.<br>
> 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>
> 4. Routing script output is: SIP trunk to use, SIP call parameters (ie. callerid), maximum call duration<br>
> 5. FS read output from routing script and make call using returned parameters<br>
><br>
> Preferred routing implementation technology: background running unix deamon written in Java or PHP. Connection with FS via socket.<br>
><br>
> 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's really big problem)<br>
><br>
> Is it possible to do this using FS?<br>
> Any advices where to search for additional info? I know that there is event handler but can it return "dialstring" for outgoing call events?<br>
> Some code examples?<br>
><br>
> I will really appreciate your help<br>
><br>
><br>
><br>
><br>
</div></div>> _______________________________________________<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>
<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>