Brekeke SIP Server Wiki

How to make Failover in the Dial Plan

With the Failover plug-in for the Advanced Edition, you can make a failover based on SIP response or timeout.

Syntax in Deploy Patterns
-------------------------------------------------------------------------
[Deploy Patterns]
$session = failover SIP-URI/transport [SIP-URI/transport...] 
&failover.timer.inviting = Timer default:10sec 
&failover.timer.provisional = Timer default:20sec 
&failover.pattern.response = Default value: .+ 
&failover.redirection = Support 3xx redirection (default:true)
-------------------------------------------------------------------------
Examples

Example-1: Basic usage 
If sip:100@192.168.0.100 doesn’t respond or it returns a SIP error response, the SIP Server sends the INVITE to sip:101@192.168.0.101 over UDP.

------------------------------------------------------------------------- 
[Deploy Patterns] 
To = sip:100@192.168.0.100 
$session = failover sip:101@192.168.0.101 sip:102@192.168.0.102 
-------------------------------------------------------------------------

 

Example-2: Specify the transport 
If sip:100@192.168.0.100 doesn’t respond or it returns a SIP error response, the SIP Server sends the INVITE to sip:101@192.168.0.101 over TCP.

-------------------------------------------------------------------------
[Deploy Patterns] 
To = sip:100@192.168.0.100 
$transport = TCP 
$session = failover sip:101@192.168.0.101/TCP sip:102@192.168.0.102/TCP 
-------------------------------------------------------------------------

Note: The “UDP Failover” should be “on” at the [Configuration] > [SIP] page even if you don’t use UDP.

 

Example-3: Specify the inviting timeout.
If sip:100@192.168.0.100 doesn’t respond for 30 seconds, the SIP Server sends the INVITE to sip:101@192.168.0.101.

------------------------------------------------------------------------- 
[Deploy Patterns] 
To = sip:100@192.168.0.100 
$session = failover sip:101@192.168.0.101 sip:102@192.168.0.102 
&failover.timer.inviting = 30 
-------------------------------------------------------------------------

 

Example-4: Specify the response code 
If sip:100@192.168.0.100 responds with error code 4xx, the SIP Server sends the INVITE to sip:101@192.168.0.101.

------------------------------------------------------------------------- 
[Deploy Patterns] 
To = sip:100@192.168.0.100 
$session = failover sip:101@192.168.0.101 
&failover.pattern.response = 4.. 
-------------------------------------------------------------------------

 

Example-5: Handle 30x redirect response
If sip:100@192.168.0.100 responds with error code 30x, the SIP Server sends a new INVITE to the contact address indicated in the 30x response

------------------------------------------------------------------------- 
[Deploy Patterns] 
To = sip:100@192.168.0.100 
$session = failover
&failover.pattern.response = 30. 
----------------------------------------------------------------------
Yes No
Suggest Edit