[Freeswitch-users] Gateways, Limits, & Routes

Kevin Green kevin at johnnyvoip.com
Mon Oct 5 08:13:20 PDT 2009


It seems many people are looking for ways to control gateways, resiliency of
termination, and limit on connections easily in FS. Here are some of the
thoughts I had, and I would like to hear what others think of this.

In tradition phone hardware you would define lines, put them into a group,
and then assign a route to go through that group. For resiliency you could
group multiple routes together into a route list, if the first route failed,
was all busy, or unavailable it would start to try the second route. If you
go out a secondary route you can also play a warning tone to indicate this
might be going out a more expensive connection. For example you may have an
IP link between two boxes, then fail back to TDM if the IP links go down,
the TDM would be more expensive so you would want to warn business users so
they don't spend hours on the phone.

Inbound and outbound calls could both go on the lines so when a call comes
in or goes out a route it takes up one slot.

My thought is, why don't we create something similar to this that will allow
us to handle a lot of these cases without complex dialplans. We could create
routes that are assigned to gateways and limit the number of incoming,
outgoing, and total connections that can be on that route. We could also
specify what cases we would consider as failure to move onto the next route
if we are in a route list. Route lists would then be similar to using
multiple limits, and failover, but in this case it would simply be a list.

The following is an example of how I think this could be prgrammed.

<routes>
   <route id="route1" gateway="provider1" max-inbound="5" max-outbound="5"
max-total="5"
countinue_on_fail="NORMAL_TEMPORARY_FAILURE,TIMEOUT,NO_ROUTE_DESTINATION"/>
   <route id="route2" gateway="provider2" max-inbound="0" max-outbound="5"
max-total="5" countinue_on_fail="NORMAL_TEMPORARY_FAILURE"/>
   <route id="route3" gateway="provider3" max-inbound="5" max-outbound="5"
max-total="10" countinue_on_fail="NO_ROUTE_DESTINATION"/>
</routes>
<route_lists>
   <route_list id="list1">
          <route id="route1"/>
          <route id="route2" warning_tone="expensive.wav"/>
          <route id="route3" warning_tone="really_expensive.wav"/>
   </route_list>
</route_litsts>

Then in your dialplan you would simply put:

<extension name="outbound_rout">
   <condition field="destination_number" expression="^(\d{10})$">
      <action application="bridge" data="route/route2/$1"/>
   </condition>
</extension>

OR

<extension name="outbound_route">
   <condition field="destination_number" expression="^(\d{10})$">
      <action application="bridge" data="route_list/list1/$1"/>
   </condition>
</extension>

   The module would need to track not only outbound calls, but also inbound
calls that come in through the specified gateways. This would help track
cases where you have say only two channels that can be used for both
incoming and outgoing calls.

   I'm not 100% sure if this is all feasable or if it would be that much of
an improvement compaired to what is already there so I put it out to all of
you for feedback.

Regards,
   Kevin Green

JohnnyVoIP
350 Legget Drive
Kanata, ON, Canada
K2K 2W7

Phone:   613 271 5993 Ext 1203
Fax:       613 271 9810
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20091005/806f1d68/attachment-0002.html 


More information about the FreeSWITCH-users mailing list