[SR-Users] Source IP address in Failure_route

Daniel-Constantin Mierla miconda at gmail.com
Fri Dec 24 11:04:13 CET 2010



On 12/22/10 4:00 PM, Ricardo Martinez wrote:
> Hello.
> Thanks for your answer.
> It was my mistake (as usual :) ).  I wanted to match two IP's in the reply
> message, but I was having a problem with the logic sentence.
> I had : ( ($T_rpl($si) != "10.0.0.4") || ($T_rpl($si) != "10.0.0.3")  ) {
>
> And I wanted : ( ($T_rpl($si) != "10.0.0.4")&&  ($T_rpl($si) !=
> "10.0.0.3")  ) {
>
> Now is working like a charm.
Thanks for reporting back, helps us to know everything is fine there.

Cheers,
Daniel

> Thanks again,
>
> Regards,
> Ricardo.-
>
>
> -----Mensaje original-----
> De: Daniel-Constantin Mierla [mailto:miconda at gmail.com]
> Enviado el: martes, 21 de diciembre de 2010 6:43
> Para: Klaus Darilion
> CC: Ricardo Martinez; sr-users at lists.sip-router.org
> Asunto: Re: [SR-Users] Source IP address in Failure_route
>
>
>
> On 12/21/10 10:26 AM, Klaus Darilion wrote:
>>
>> Am 17.12.2010 14:19, schrieb Ricardo Martinez:
>>> Hello.
>>>
>>> I'm trying to obtain the source IP address from a reply message.
>> AFAIK the failure_route is executed in the context of the request. If
>> you want to analyze a reply you have to do it in a reply_route.
> tmx module exports some pseudo-variables that allows you to access the
> request from reply route and reply from failure route. Mainly you can
> get any pv strictly related to the sip message itself (being it request
> or reply, when processing the other type of message in a transaction).
> http://www.kamailio.org/dokuwiki/doku.php/pseudovariables:3.1.x#tmx_module
> _pseudo-variables
>
> Cheers,
> Daniel
>
>> regards
>> Klaus
>>
>>> This is part of the configuration file :
>>>
>>> failure_route[1] {
>>>
>>>           if (t_was_cancelled()) {
>>>
>>>                   xlog("L_INFO", "[$ci] $rm:$ru t_was_cancelled in
>>> failure_route\n");
>>>
>>>                   exit;
>>>
>>>           }
>>>
>>> if ( ($T_rpl($si) != "10.0.0.4") || ($T_rpl($si) != "10.0.0.3")  ) {
>>>
>>>                   if ( t_check_status("48[0-9]") ) {
>>>
>>>                           xlog("L_INFO","[$ci] 48X Received\n");
>>>
>>>                           exit;
>>>
>>>                   }
>>>
>>>           }
>>>
>>> .
>>>
>>> But it seems not to be working.
>>>
>>> Is there a way to do what I want?
>>>
>>> Thanks in advance,
>>>
>>> Regards,
>>>
>>> Ricardo.-
>>>
>>> **
>>>
>>>
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Jan 24-26, 2011, Irvine, CA, USA
http://www.asipto.com




More information about the sr-users mailing list