[asterisk-users] Connect to remote GW

Gareth Blades mailinglist+asterisk at dns99.co.uk
Wed Feb 5 03:10:37 CST 2014


On 04/02/14 18:56, Meadows Hoa wrote:
> If SIP channel driver needs to connect to a remote GW over a dedicated 
> SIP trunk BUT the remote GW has a 'standby' in case of failure, how 
> can the sip configuration file be configured for the remote GW when 
> there are actually two IP addresses. If the main remote GW fails 
> control automatically switches to the standby GW, so how could the SIP 
> configuration file hande this switch and support both host IP 
> addresses. There is no DNS so straight IP addressing is used.

Doing it in the dialplan is a bit of a bodge but perfectly possible. 
Just make sure you have qualify=yes so if a GW does down asterisk spots 
it and the Dial() command returns quickly. You might also wish to reduce 
the check interval down from the default of every minute.

The proper way is to make use of DVS SRV however Asterisk doesnt support 
it properly (doesnt fail over). Not sure if that has been fixed in 
version 12.

If there is just one active GW and one or more backups then the its 
normally fairly easy to create a virtual IP address on the GW so if one 
fails then another takes over. Only works if they are on the same 
network though.

Alternatively use something like opensips as a front end. Thats what we 
do and it load balances between multiple asterisk server and detects if 
one fails. You can make use of keepalived to provide a virtual IP 
address which moves between boxes if one dies or the opensips process 
stops running.



More information about the asterisk-users mailing list