[Freeswitch-users] failover based on initial INVITE timeout

Hristo Trendev dist.lists at gmail.com
Tue Aug 18 08:24:48 PDT 2009

I am trying to implement failover dialing plan as described in:

I figured out that originate_timeout must be passed as
{originate_timeout=<timeout>} in front of the dial string to have any
effect (setting it as channel variable as described in the example
above has no effect).

I have set the timeout to 1 second, so expected behavior is to try the
second gateway if no response is received from the first one in 1
second. The problem is that FS cancels the first request with
[NO_ANSWER] and tries to route the call via the second gateway even
though it receives response from the first during that 1 second.

The response received is "100 Trying" provisional response (checked
with sofia siptrace). I'm guessing that either 100 provisional
responses don't cancel the originate_timeout timer (bug?) or I am
doing it the wrong way.

I was also thinking of using the timer-T1 or timer-T1X64 parameter in
the sip profile, but I need this to be set per dial string, not per
profile, besides, it seems that these timers (T1, T1X64) affect both
invite and non-invite requests, so this is not really an option.
Also, I tried leg_timeout, but it doesn't really do what I need it to.

Anyone has any idea how to implement this?

More information about the FreeSWITCH-users mailing list