[Kamailio-Users] How to get the destination IP

Klaus Darilion klaus.mailinglists at pernau.at
Mon Jul 27 19:13:11 CEST 2009


IMO fix_nated_register() should be used always, and then DURI is always 
populated after lookup()

@catalina: use $du in branch_route to the get the destination of all 
branches


regards
klaus

Daniel-Constantin Mierla schrieb:
> 
> 
> On 27.07.2009 15:44 Uhr, catalina oancea wrote:
>> Thanks a lot! That works. I had seen it earlier but I ignored it cause
>> sometimes it is null and I needed a pv to work for all cases. So I am
>> now making an if, like this:
>>
>>             if ($du!=null) $var(destIP)=$(du{s.select,1,:});
>>             else $var(destIP)=$rd;
>>
>>                         ...then I use $var(destIP)
>>   
> probably a new PV to hold next destination uri would be good, to hide 
> above coding in the config. IIRC, some discussion about have been in the 
> past, but no actions.
> 
> Cheers,
> Daniel
> 
>>
>>
>> 2009/7/27 Daniel-Constantin Mierla <miconda at gmail.com>:
>>  
>>> Hello,
>>>
>>> On 27.07.2009 15:14 Uhr, catalina oancea wrote:
>>>    
>>>> Hello
>>>>
>>>> Is there a way to find the IP address that the request will be sent to
>>>> using kamailio.cfg ? For example if extension is behind NAT, after
>>>> lookup() I have in $rd the IP in the contact column of location table,
>>>> not the actual IP in the received column. I couldn't find a pseudovar
>>>> for this.
>>>>
>>>>       
>>> check dst uri: $du
>>>
>>> Next version using the sip router core provides more info about 
>>> destination
>>> via send route.
>>>
>>> Cheers,
>>> Daniel
>>>
>>> -- 
>>> Daniel-Constantin Mierla
>>> * SIP Router Bootcamp
>>> * Kamailio (OpenSER) and Asterisk Training
>>> * Berlin, Germany, Sep 1-4, 2009
>>> * http://www.asipto.com/index.php/sip-router-bootcamp/
>>>
>>>
>>>     
>>
>> _______________________________________________
>> Kamailio (OpenSER) - Users mailing list
>> Users at lists.kamailio.org
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>
>>   
> 



More information about the Users mailing list