[SR-Users] how to access reply headers

mjbemail2000-seti at yahoo.co.uk mjbemail2000-seti at yahoo.co.uk
Mon Sep 19 13:29:47 CEST 2016

I have a registered handset which replies to an INVITE message from Kamailio with a "302 Moved Temporarily" message. The reason for this is because the user has set their handset to forward the call to another telephone number. 
In a wireshark trace I can see the forwarded telephone number in the Contact header of the SIP message but I can't find a way to access this header via any variables. In the config file I have tried this:
# Manage incoming repliesonreply_route[MANAGE_REPLY] {    ...
    if(t_check_status("3[0-9][0-9]")) {
        xlog("L_INFO", "test1: $hdr(Contact)");
        xlog("L_INFO", "test2: $ct");
, but in both cases the value returned is the Contact header of the original INVITE message and not the Contact shown in the "302 Moved Temporarily" reply message.
How do I access the Contact header in the reply message?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160919/29897cef/attachment.html>

More information about the sr-users mailing list