[SR-Users] Gateway failover on slow call setup

Spencer Thomason spencer at 5ninesolutions.com
Fri Nov 2 18:06:47 CET 2012

I'm trying to address a problem where sometimes our upstream providers have slow call setup times.  We use drouting with multiple providers for each route to handle failover in the event of an outage but in this case, we get a 100 Trying but sometimes a 18[03] response takes 4-5 seconds or we never get it because the caller cancels the request.  What would be a "safe" amount of time to allow a PSTN gateway to reply with a 180/183?  What I'm trying to avoid is a scenario where the PSTN legitimately takes a long time to setup (i.e. an international call to some cell phone providers) and we needlessly failover which will actually increase the post dial delay for the user.

My thought is this for example:

route[PSTN] {
    t_set_fr(1000);   # set fr timer to 1 second so we failover quickly if no provisional response

   # Routing logic

onreply_route[PSTN_REPLY] {
    if (status=~"1[0-9][0-9]") {
         t_set_fr(4000);    # set fr timer to 4 seconds

    if (status=~"18[03]") {
         t_reset_fr();    # reset timer if we get a 180 or 183


Also, if we failover because of slow call setup for a particular route, I'd like to temporarily avoid that gateway for that route (but only that route).

I'm curious if anyone has any pointers or how they solved this.


More information about the sr-users mailing list