[Serusers] PSTN gateway failover

Marian Dumitru marian.dumitru at voice-sistem.ro
Tue Nov 2 19:23:18 CET 2004


Hi Andreas,

you can implement GW failover by doing serial fork using AVPOPS module. 
Pleas take a look at example number 4 - Serial forking:
http://www.voice-system.ro/docs/avpops/
You can store all GW IPs in database and load them via avp_db_load().
If you don't want to hardcode even your first GW IP and to rely only on 
the IP list from AVPs, be sure to push the fist AVP value into RURI in 
main route before first sending to GW.
Unfortunately, this approach doesn't offer load-balancing

Best regards,
Marian Dumitru

Andreas Granig wrote:
> Hi all,
> 
> Since SER does not provide DNS SRV failover capability, how do you 
> perform failover for your PSTN gateways?
> 
> I currently think about some sort of load balancing with exec_dset() 
> which looks up a gateway in a mysql db and give it 10 tries to find a 
> gateway (SER is running on my.domain:5060)
> 
> route
> {
>   if (!mf_process_maxfwd_header("10"))
>   {
>     sl_send_reply("483", "Too many hops");
>     break;
>   }
> <snip>
>   exec_dset("/my/sipgw-balancing-script"); # returns a random GW
>   t_on_failure("1");
>   t_relay();
> <snip>
> }
> 
> failure_route[1]
> {
>   if(t_check_status("503")
>   {
>     rewritehostport("my.domain:5060"); # peform loop
>     append_branch();
>     t_relay();
>   }
> }
> 
> Is this good practice? Any other ideas/optimizations?
> 
> 
> Cheers,
> Andy
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
> 

-- 
Voice Sistem
http://www.voice-sistem.ro




More information about the sr-users mailing list