[Freeswitch-users] Freeswitch dynamic routing of all calls
Mateusz Bartczak
netcentrica at gmail.com
Fri Jul 1 16:55:49 MSD 2011
OK but how can I respond for received events?
I subscribe to receive events using following event socket command:
event plain CHANNEL_CREATE
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?
I will simply explain what I'm trying to achieve:
1. User dialed number
2. CHANNEL_CREATE event is created
3. I got this event using socket
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
2011/6/30 Steven Ayre <steveayre at gmail.com>
> Yes it's possible and I suggest you look at esl
>
> Steve on iPhone
>
> On 30 Jun 2011, at 09:54, Mateusz Bartczak <netcentrica at gmail.com> wrote:
>
> > Hi all
> >
> > I'm new to FS and I would like to know is it possible to implement
> following scenario:
> >
> > 1. User dials number
> > 2. Routing script detects outgoing call event. Every call needs to be
> handled by routing script.
> > 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.
> > 4. Routing script output is: SIP trunk to use, SIP call parameters (ie.
> callerid), maximum call duration
> > 5. FS read output from routing script and make call using returned
> parameters
> >
> > Preferred routing implementation technology: background running unix
> deamon written in Java or PHP. Connection with FS via socket.
> >
> > 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)
> >
> > Is it possible to do this using FS?
> > Any advices where to search for additional info? I know that there is
> event handler but can it return "dialstring" for outgoing call events?
> > Some code examples?
> >
> > I will really appreciate your help
> >
> >
> >
> >
> > _______________________________________________
> > Join us at ClueCon 2011, Aug 9-11, Chicago
> > http://www.cluecon.com 877-7-4ACLUE
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110701/ec679880/attachment.html
More information about the FreeSWITCH-users
mailing list