[Freeswitch-users] Freeswitch dynamic routing of all calls

Nazim Aghabayov nazim.aghabayov at gmail.com
Fri Jul 8 00:27:39 MSD 2011


Hello Mateusz,

I'm finding  ESL powerful yet complicated and using mod_xml_curl for 
dynamic routing.
mod_xml_curl with  with bindings = "dialplan" handles routing just fine.
http://wiki.freeswitch.org/wiki/Mod_xml_curl

Another approach is to a the Lua scripts for setting the variables 
"inside" the dialplan.
FreeSWITH is a flexible system, so there are a lot of ways to achieve 
the same result.

Best Regards,
Nazim


On 07/01/2011 05:55 PM, Mateusz Bartczak wrote:
> 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
>>>




More information about the FreeSWITCH-users mailing list