[SR-Users] check if the sent reply was local

Vitaliy Aleksandrov vitalik.voip at gmail.com
Tue Nov 13 09:47:44 CET 2012


||I thought t_any_replied() can be used for that purpose.

For example in failure route I used:
if (t_any_replied() && t_check_status("408") ) {
     xlog("L_DBG", "408 reply received\n");
}

or

if ( !(t_any_replied()) && t_check_status("408")) {
     xlog("L_DBG", "Local timeout\n");
}

But I carefully read tm docs and found "If called from a failure or 
onreply route, the __"current"__ reply is not taken into account."
According to t_any_replied() description my examples should not work, 
but they do (at production system for about one year).



>
> On 11/11/12 1:54 PM, Uri Shacked wrote:
>> Hi,
>> what is the command to check if the reply was recieved or localy 
>> generated?
> I assume you need that in failure_route, test the $T(reply_type), it 
> should be 1 for local generated replies:
>
> http://www.kamailio.org/wiki/cookbooks/3.3.x/pseudovariables#t_name
>
> Cheers,
> Daniel
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20121113/efd8fd4c/attachment.htm>


More information about the sr-users mailing list