[Serusers] PSTN gateway failover
Marian Dumitru
marian.dumitru at voice-sistem.ro
Thu Nov 4 17:17:31 CET 2004
Hi Jan,
Thank you for the advice. I am aware and totally agree with your suggestion.
The may reason for allowing $to as source for avp_db_load() was to make
its use possible for REGISTER requests also - if I'm not wrong, for
REGISTER reqs, the TO hdr is used since the RURI contains only domain name.
More liberty, means also more risks :-). But people should know what
they are doing.
Best regards,
Marian Dumitru
Jan Janak wrote:
> When you are updating the documentation, I would suggest to mention one
> more thing:
>
> Using $to for any AVP operations might be a security hole, because To header
> field it not used in message processing and might not be related to the the
> real callee whose SIP URI is in the Request-URI.
>
> For example in the following message:
>
> INVITE sip:george.w.bush at whitehouse.gov SIP/2.0
> To: sip:john.kerry at whitehouse.gov
>
> $to based avp_db_load would load AVPs for someone else than the message
> recipient.
>
> Jan.
>
> On 03-11 20:50, Marian Dumitru wrote:
>
>>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
>>
>>_______________________________________________
>>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