[Serusers] PSTN gateway failover

Marian Dumitru marian.dumitru at voice-sistem.ro
Wed Nov 3 20:50:04 CET 2004


Hi Jiri,

thanks for you documentation overview. Yes indeed, there is a small 
typing error. All module functions takes the parameters as quoted 
string. AFAIK only couple of core function breaks this rule.
I will add the " as soon as possible and regenerate the documentation.
Again, thanks for the report.

Best regards,
Marian Dumitru


Jiri Kuthan wrote:
> Nice.
> 
> I'm wondering how the following line is supposed to be executed:
> 
>    if (!(avp_db_load($ruri/domain,"s:t_ips/ips")
> 
> I mean -- how is $uri/domain interpreted? Or is it just missing " 
> in the documented script version that confuses me?
> 
> Thanks,
> 
> -jiri
> 
> At 07:23 PM 11/2/2004, Marian Dumitru wrote:
> 
>>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
>>
>>_______________________________________________
>>Serusers mailing list
>>serusers at lists.iptel.org
>>http://lists.iptel.org/mailman/listinfo/serusers
> 
> 
> --
> Jiri Kuthan            http://iptel.org/~jiri/ 
> 
> 

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




More information about the sr-users mailing list