[Freeswitch-users] Freeswitch dynamic routing of all calls

Mateusz Bartczak netcentrica at gmail.com
Thu Jun 30 12:54:51 MSD 2011

Hi all

I'm new to FS and I would like to know is it possible to implement following

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
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

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110630/2a8e402e/attachment.html 

More information about the FreeSWITCH-users mailing list