[SR-Users] access header variables in failure route

Alex Balashov abalashov at evaristesys.com
Sat Aug 13 22:39:35 CEST 2016


On 08/13/2016 04:30 PM, jaflong jaflong wrote:

> On an 302 message caught in failure_route Is it possible to get to
> access $hdr(xxx) of the 302. When I do this $hdr(xxx) it is null.

Yes; you will need to use $T_rpl($hdr(...)), e.g. $T_rpl($ct):

http://www.kamailio.org/wiki/cookbooks/4.4.x/pseudovariables#t_rpl_pv

Remember that a failure_route is a transaction failure event unrelated 
to any particular SIP reply per se, and may be triggered by things other 
than negative failure replies, such as timeouts. So, it's necessary to 
do some gymnastics to say that you want to access attributes of the 
negative reply on the winning branch.

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC
1447 Peachtree Street NE, Suite 700
Atlanta, GA 30309
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/



More information about the sr-users mailing list