[Kamailio-Devel] Why $du is set after "lookup(location)" ?
Daniel-Constantin Mierla
miconda at gmail.com
Thu Aug 21 12:57:50 CEST 2008
Hello,
On 08/21/08 13:05, Iñaki Baz Castillo wrote:
> Hi, I've realized that $du (the real destination address) is set after doing a
> lookup("location"). I wonder why, shouldn't be $du computed after the script?
>
$du is like next hop address. It is set by lookup(location) if the phone
is behind the nat (with the address of the nat router).
> I've a related problem since I do a "lookup(location)" and later I modify $ru
> to deliver the request to other place, but since $du is set the request is
> sent there.
>
You can reset the $du variable to be safe, but be aware that you may get
issues with users behind nat.
> Also the documentation of "lookup()" method doesn't tell it:
>
> http://www.kamailio.org/docs/modules/1.3.x/registrar.html#AEN342
> If there are such contacts, Request-URI will be overwritten with the
> contact...
> (nothing about $du).
>
> I'm upgrading the $du in the wiki, hops it's correct:
> http://www.kamailio.org/dokuwiki/doku.php/pseudovariables:devel#destination_uri
>
> PD: Could it be added to registrar documentation?
>
Please add an item on docs tracker. rr module readme should have a
similar note about setting $du (might be already there, though)
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com
More information about the Devel
mailing list