[Kamailio-Devel] Why $du is set after "lookup(location)" ?
Daniel-Constantin Mierla
miconda at gmail.com
Thu Aug 21 13:24:46 CEST 2008
On 08/21/08 14:14, Iñaki Baz Castillo wrote:
> El Thursday 21 August 2008 12:57:50 Daniel-Constantin Mierla escribió:
>
>> 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 didn't know it. So, do you mean that $du is just set by 'lookup' in case the
> user is behind NAT?
>
sure in case of nat, perhaps also if there is a Path vector. But if it
is simple registration from a not-natted address, then $du is empty
after lookup location.
>
>
>>> I'm upgrading the $du in the wiki, hops it's correct:
>>> http://www.kamailio.org/dokuwiki/doku.php/pseudovariables:devel#destinati
>>> on_uri
>>>
>
> So I'll must fix it if you confirm me the above question.
>
I added a completion note about NAT case. Path case needs to be
investigated.
Thanks,
Daniel
>
>
>>> 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)
>>
>
> Ok.
>
>
>
--
Daniel-Constantin Mierla
http://www.asipto.com
More information about the Devel
mailing list