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

Daniel-Constantin Mierla miconda at gmail.com
Mon Apr 14 10:08:15 CEST 2014


I guess the event route is executed with the incoming request. I would 
expect to have there the branch attributes, but I haven't developed the 
feature.

Perhaps you should look inside tm module at execution of branch 
route/failure route to see how they take the branch attributes and 
compare, to be sure is what I guessed or not.

Cheers,
Daniel

On 14/04/14 08:29, Juha Heinanen wrote:
> 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
>
> _______________________________________________
> 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 - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda




More information about the sr-users mailing list