Request URI in INVITE when using proxy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 22, 2008 at 3:00 PM, Lucas Rosa Gal?go <lrgalego at gmail.com>wrote:

>
> Benny,
>
> I have one question about this.
> I have an host named proxy.azzu.com.br that points to 2 openser 1.3.2
> servers
> when I use the name proxy.azzu.com.br the api dont pass in the challange
> every
> time because it sends the first package to the openser 1 and the second to
> the openser 2
> many times, but when it sends the package two times to the same openser it
> register,
> its clear that the package have to be sendo to the same openser two times.
> So to solve this problem in my application I first resolved the name (with
> return one of the two
> ips for me) and then set the ip as the proxy of the account.
> I also set lr and UDP
>
> "sip:proxy.azzu.com.br;lr;transport=UDP" -> a string like this didnt work
> because of the two ips returning: Maximum number of stale retries exceeded
> (PJSIP_EAUTHSTALECOUNT) [status=171111]
> "sip:201.48.113.131;lr;transport=UDP" -> works since a resolved and got
> one ip as the ip that account will register
>
> the other data about account:
> sipId: sip:1201****@azzu
> registrar sip:azzu
> realm azzu or *
> username 1201****
> passoword <password>
>
> Did I made anything wrong for the hostname didn't work? or the api isn't
> deal with this yet?
>
>
This is quite an interesting setup actually. It seems that you have a
round-robin DNS, which will return different server IP to proxy.azzu every
time a DNS A or SRV is performed. The round robin seems to be done at DNS A
entry rather than with DNS SRV entry.

Whether this would work with pjsip depends on several things:
 - you probably need to configure record-route in the proxies, and the
record-route URI must use IP address rather than hostname, so that requests
on the same dialog goes to the same server
 - if you don't enable/configure DNS SRV (via --nameserver option) in pjsua,
then it should work as long as the client uses a caching nameserver (either
in the OS or in the caching nameserver), so that the client doesn't send to
different IP everytime it sends a new request.
 - it should also work if you enable/configure DNS SRV, since the resolver
will cache the result.

Having said that, I haven't tried this myself, so your mileage may vary.
There may also be cases when the second request retry is still sent to
different server (e.g. when the second retry is done exactly when the DNS A
entry expires).

Cheers
 Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080922/19ec1bd5/attachment.html 


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux