[Serusers] rewriting to a dns domain

Miklos Tirpak miklos at iptel.org
Tue Apr 22 10:37:58 CEST 2008


I think load-balancing was introduced in version 2.0, so there is no way 
to configure it in 0.9.x.

In 2.x, you need to enable it explicitly:
dns_srv_lb=1

Regards,
Miklos

On 04/18/2008 06:06 PM, Rolf Unger wrote:
> Hello list users,
> 
> i want to use ser as a load balancing proxy for some PSTN
> gateways that I have in use.
> My idea is to use the rewritehost() core function and DNS SRV
> entries to accomplish this. But it seems that ser is doing a 
> A record lookup if I simply replace the host with my domain
> "mynet.interx":
> 
>   if ( ... ) {
>      rewritehost("mynet.interx");
>      t_relay();
>   }
> 
> Ser is running on the same host (89.49.16.54) as the authorative
> nameserver for the mynet.interx domain.
> 
> dig shows that the DNS files are configured in the right way for
> load balancing, but I just can't find a way to make ser as a dns client
> work like dig.
> 
> If I use "_sip._udp.mynet.interx" it will complain about a bad name.
> Well he is partly right, underscores are not allowed in domain names.
> 
> And if I use only the domain in the rewrite command it will contact
> the IP of the nameserver of this domain. Or in other words it will send
> the messages to itself.
> 
> Using directly rewritehost("sip1.mynet.interx") doesn't help me,
> because it wouldn't do load balancing.
> 
> How can I convince ser (version 0.9.6) to use the correct lookup
> method for the DNS?
> 
> Any hints are appreciated ...
> 
> Thanks, Rolf.
> 
> ----------------------------------------------------------------
> 
> ; <<>> DiG 9.2.4 <<>> -t SRV _sip._udp.mynet.interx
> 
> ;; QUESTION SECTION:
> ;_sip._udp.mynet.interx.      IN      SRV
> 
> ;; ANSWER SECTION:
> _sip._udp.mynet.interx. 21600 IN      SRV     0 50 5060 sip3.mynet.interx.
> _sip._udp.mynet.interx. 21600 IN      SRV     0 50 5060 sip1.mynet.interx.
> 
> ;; AUTHORITY SECTION:
> mynet.interx.         21600   IN      NS      mynet.interx.
> 
> ;; ADDITIONAL SECTION:
> sip1.mynet.interx.    21600   IN      A       89.49.16.50
> sip3.mynet.interx.    21600   IN      A       89.49.16.51
> mynet.interx.         21600   IN      A       89.49.16.54
> 
> _______________________________________________
> Serusers mailing list
> Serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers



More information about the sr-users mailing list