Jim Singh
2005-Mar-24 20:38 UTC
[Asterisk-Users] Dynamically limiting the number of outbound calls
In our setup, outbound call volume frequently exceeds the line capacity of the DSL line. We do not want to move to another codec to better utilize the line, but instead wish to automatically divert overflow to the Long Distance T1 when the DSL is "full". Ideally the system would also be able to adjust automatically to network conditions such as network outage, high latency, jitter and/or packet loss. If the LD T1 was also full or if there was no other path, Dial would return busy/congestion instead of connecting a call of low quality. I realize that one solution is to manage variables using macros in the dialplan and keep a count of VOIP calls. I believe that this a) difficult to maintain b) can be difficult to dynamically adjust based on parameters from the jitter buffer, round trip time, and/or packet loss c) couldn't be "the best way to do it". Before I go slinging code, does anyone know of a clean solution? Do other people need / desire this functionality? Our Setup: Software: Suse 9.2 + Asterisk 1.0.7 (built from CVS) Network: DSL measured to be 2 mbps up / 430 kbps down Termination: IAX2 / G711 / nufone and voipjet Zaptel: 2 digium 100 cards one connected to a Siemens PBX and the other to a (long distance) provider,signaling is E&M Wink __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/
Marty Mastera
2005-Mar-24 21:35 UTC
[Asterisk-Users] Dynamically limiting the number of outbound calls
> In our setup, outbound call volume frequently exceeds the > line capacity of the DSL line. We do not want to move to > another codec to better utilize the line, but instead wish to > automatically divert overflow to the Long Distance T1 when > the DSL is "full". Ideally the system would also be able to > adjust automatically to network conditions such as network > outage, high latency, jitter and/or packet loss. If the LD T1 > was also full or if there was no other path, Dial would > return busy/congestion instead of connecting a call of low quality. > > I realize that one solution is to manage variables using > macros in the dialplan and keep a count of VOIP calls. I > believe that this a) difficult to maintain b) can be > difficult to dynamically adjust based on parameters from the > jitter buffer, round trip time, and/or packet loss c) > couldn't be "the best way to do it". > > Before I go slinging code, does anyone know of a clean > solution? Do other people need / desire this functionality? > > Our Setup: > Software: Suse 9.2 + Asterisk 1.0.7 (built from CVS) > Network: DSL measured to be 2 mbps up / 430 kbps down > Termination: IAX2 / G711 / nufone and voipjet > Zaptel: 2 digium 100 cards one connected to a Siemens > PBX and the other to a (long distance) provider,signaling is E&M Wink >Jim: I am doing something very similar using SetGroup and CheckGroup. Take a look at those commands on the wiki, and especially to the n + 101 priority to accomplish a failover in the case that your "trunk limit" is reached. Marty
tim panton
2005-Mar-25 03:07 UTC
[Asterisk-Users] Dynamically limiting the number of outbound calls
Jim Singh wrote:>In our setup, outbound call volume frequently exceeds >the line capacity of the DSL line. We do not want to >move to another codec to better utilize the line, but >instead wish to automatically divert overflow to the >Long Distance T1 when the DSL is "full". Ideally the >system would also be able to adjust automatically to >network conditions such as network outage, high >latency, jitter and/or packet loss. If the LD T1 was >also full or if there was no other path, Dial would >return busy/congestion instead of connecting a call of >low quality. > >I realize that one solution is to manage variables >using macros in the dialplan and keep a count of VOIP >calls. I believe that this a) difficult to maintain b) >can be difficult to dynamically adjust based on >parameters from the jitter buffer, round trip time, >and/or packet loss c) couldn't be "the best way to do >it". > >Before I go slinging code, does anyone know of a clean >solution? Do other people need / desire this >functionality? > >Our Setup: > Software: Suse 9.2 + Asterisk 1.0.7 (built from CVS) > Network: DSL measured to be 2 mbps up / 430 kbps down > Termination: IAX2 / G711 / nufone and voipjet > Zaptel: 2 digium 100 cards one connected to a Siemens >PBX and the other to a (long distance) >provider,signaling is E&M Wink >I'm from an SNMP background, so thats the way I'd be looking. Something like: Enable SNMP on your DSL router Select your scripting language with SNMP support (scotty, shell with net-snmp, python,perl whatever) Write a script that queries the router, checking 1) outbound queue lenght, 2) outbound packets/sec 3) interface status 4) dropped udp packets also perhaps the ping your VOIP provider check to see if all of the above are within acceptable limits (tweaking required) Get the script to set a value in the asterisk db based on the result of the check. get cron to call the script every 60 secs (or whatever) In your dialplan check the value of the variable and dial outbound calls accordingly. Tim.