[SR-Users] event_route[tm:branch-failure] question

Juha Heinanen jh at tutpro.com
Mon Apr 14 08:29:40 CEST 2014


i did some more tests and got very puzzling result.  this time i tested
with 488 response, but response code does not matter.

sip proxy forwards invite based on location lookup to contact of
registered local user:

Apr 14 09:13:33 siika /usr/sbin/sip-proxy[8001]: INFO: INVITE <sip:test at test.tutpro.com> is to local user <test at test.tutpro.com>
Apr 14 09:13:33 siika /usr/sbin/sip-proxy[8001]: INFO: Routing INVITE <sip:test at 192.98.102.30:5054> to contact

in branch route these two statements  are executed:

        t_on_branch_failure("contact");
        xlog("L_INFO", "Routing $rm <$ru> to contact\n");        

uas replies with 488 which causes this branch-failure route to be
executed:

event_route [tm:branch-failure:contact] {

    if (t_check_status("488")) {
        xlog("L_INFO", "Got 488 response to <$ru>\n");
        append_branch();
        xlog("L_INFO", "Relaying to <$ru>\n");
        route(RELAY_TO_CONTACTS);
        exit;
    };
};

and i get to syslog:

Apr 14 09:13:33 siika /usr/sbin/sip-proxy[7952]: INFO: Got 488 response to <sip:test at test.tutpro.com>
Apr 14 09:13:33 siika /usr/sbin/sip-proxy[7952]: INFO: Relaying to <sip:test at test.tutpro.com>

note that in above $ru is aor, not contact uri, of the callee, which is
the same problem that i described in previous message.  for that reason,
route(RELAY_TO_CONTACTS) causes the request to be routed back to the
proxy itself:

Apr 14 09:13:33 siika /usr/sbin/sip-proxy[7952]: INFO: Routing INVITE to
contact <sip:test at test.tutpro.com> to proxy itself

proxy reports that it receives the request and is processes it exactly
the same way as previously, except that this time magic happens and $ru
in branch_failure route is not aor like it was before but it is the
contact uri like it should have been already during the first iteration:

Apr 14 09:13:33 siika /usr/sbin/sip-proxy[7953]: INFO: INVITE <sip:test at test.tutpro.com> by <sip:jh at test.tutpro.com> is from Proxy Itself
Apr 14 09:13:33 siika /usr/sbin/sip-proxy[7953]: INFO: INVITE <sip:test at test.tutpro.com> is to local user <test at test.tutpro.com>
Apr 14 09:13:33 siika /usr/sbin/sip-proxy[7953]: INFO: Routing INVITE <sip:test at 192.98.102.30:5054> to contact
Apr 14 09:13:33 siika /usr/sbin/sip-proxy[7951]: INFO: Got 488 response to <sip:test at 192.98.102.30:5054>
Apr 14 09:13:33 siika /usr/sbin/sip-proxy[7951]: INFO: Relaying to <sip:test at 192.98.102.30:5054>

can someone explain how/why behavior changes and why during the first
execution of branch_failure route, $ru is not what it should be?

-- juha



More information about the sr-users mailing list