i call drop() in branch route and it is the only branch left. the branch gets correctly dropped, i.e., the request is not send out, but the reply to UAC is strange:
U 2010/04/14 21:03:43.750712 192.98.102.10:5060 -> 192.98.103.2:5074 SIP/2.0 477 Unfortunately error on sending to next hop occurred (477/TM). Via: SIP/2.0/UDP 192.98.103.2:5074;rport=5074;branch=z9hG4bKaoxzewgj. To: sip:0407058055@192.98.102.10;tag=c02670ad1171fe45d9ff9a27d6c2cb82-e03b. From: sip:+35816234567@foo.bar;tag=bclsw. Call-ID: doibilvynrtqxpk@localhost. CSeq: 134 INVITE. Server: SIP Proxy (3.0.99-dev1 (i386/linux)). Content-Length: 0.
why this kind of reply, because the proxy didn't even try to send the request to next ho?
is it possible to somehow choose in the script, which reply to send? in this example, i'm using lcr to choose gws and none of them was suitable, so something like '503 service not available' would be more appropriate.
-- juha
2010/4/14 Juha Heinanen jh@tutpro.com:
i call drop() in branch route and it is the only branch left. the branch gets correctly dropped, i.e., the request is not send out, but the reply to UAC is strange:
U 2010/04/14 21:03:43.750712 192.98.102.10:5060 -> 192.98.103.2:5074 SIP/2.0 477 Unfortunately error on sending to next hop occurred (477/TM). Via: SIP/2.0/UDP 192.98.103.2:5074;rport=5074;branch=z9hG4bKaoxzewgj. To: sip:0407058055@192.98.102.10;tag=c02670ad1171fe45d9ff9a27d6c2cb82-e03b. From: sip:+35816234567@foo.bar;tag=bclsw. Call-ID: doibilvynrtqxpk@localhost. CSeq: 134 INVITE. Server: SIP Proxy (3.0.99-dev1 (i386/linux)). Content-Length: 0.
why this kind of reply, because the proxy didn't even try to send the request to next ho?
is it possible to somehow choose in the script, which reply to send? in this example, i'm using lcr to choose gws and none of them was suitable, so something like '503 service not available' would be more appropriate.
What about checking in failure_route if the final response is locally generated (and also the winning status so you get the 477 and can act according)?
Iñaki Baz Castillo writes:
What about checking in failure_route if the final response is locally generated (and also the winning status so you get the 477 and can act according)?
inaki,
the problem is that after drop() in branch route, failure route is not entered every time. it seems to be totally unpredictable, if failure route is entered or not entered, when i run the exactly same test! i verified this by placing a log statement in the beginning of failure route.
-- uha
Juha Heinanen writes:
the problem is that after drop() in branch route, failure route is not entered every time. it seems to be totally unpredictable, if failure route is entered or not entered, when i run the exactly same test! i verified this by placing a log statement in the beginning of failure route.
i added a log statement also after failing t_relay() in route block:
if (!t_relay()) { xlog("t_relay failed\n");
and it turned out that failure route is not called if t_relay() fails. the mystery is, why some times after calling drop() in branch route t_relay() fails and failure route is not called and some other times t_relay() succeeds and failure route is called?
-- juha
Juha Heinanen writes:
and it turned out that failure route is not called if t_relay() fails. the mystery is, why some times after calling drop() in branch route t_relay() fails and failure route is not called and some other times t_relay() succeeds and failure route is called?
here is a few test calls that show the unpredictability. six calls, two enter failure route after drop and four don't because of t_relay failure. the first one after proxy restart seems always enter failure route.
-- juha
Apr 15 09:07:14 localhost /usr/sbin/sip-proxy[16889]: INFO: Routing initial INVITE sip:0407058055@gw1.test.fi to sip:192.98.100.2:5060 Apr 15 09:07:14 localhost /usr/sbin/sip-proxy[16889]: NOTICE: Dropping request in branch route Apr 15 09:07:17 localhost /usr/sbin/sip-proxy[16928]: ERROR: entering failure route Apr 15 09:07:24 localhost /usr/sbin/sip-proxy[16886]: INFO: Routing initial INVITE sip:0407058055@gw1.test.fi to sip:192.98.100.2:5060 Apr 15 09:07:24 localhost /usr/sbin/sip-proxy[16886]: NOTICE: Dropping request in branch route Apr 15 09:07:24 localhost /usr/sbin/sip-proxy[16886]: ERROR: t_relay failed Apr 15 09:07:35 localhost /usr/sbin/sip-proxy[16889]: INFO: Routing initial INVITE sip:0407058055@gw1.test.fi to sip:192.98.100.2:5060 Apr 15 09:07:35 localhost /usr/sbin/sip-proxy[16889]: NOTICE: Dropping request in branch route Apr 15 09:07:35 localhost /usr/sbin/sip-proxy[16889]: ERROR: t_relay failed Apr 15 09:07:53 localhost /usr/sbin/sip-proxy[16888]: INFO: Routing initial INVITE sip:0407058055@gw1.test.fi to sip:192.98.100.2:5060 Apr 15 09:07:53 localhost /usr/sbin/sip-proxy[16888]: NOTICE: Dropping request in branch route Apr 15 09:07:53 localhost /usr/sbin/sip-proxy[16888]: ERROR: t_relay failed Apr 15 09:08:04 localhost /usr/sbin/sip-proxy[16887]: INFO: Routing initial INVITE sip:0407058055@gw1.test.fi to sip:192.98.100.2:5060 Apr 15 09:08:04 localhost /usr/sbin/sip-proxy[16887]: NOTICE: Dropping request in branch route Apr 15 09:08:04 localhost /usr/sbin/sip-proxy[16887]: ERROR: t_relay failed Apr 15 09:08:18 localhost /usr/sbin/sip-proxy[16886]: INFO: Routing initial INVITE sip:0407058055@gw1.test.fi to sip:192.98.100.2:5060 Apr 15 09:08:18 localhost /usr/sbin/sip-proxy[16886]: NOTICE: Dropping request in branch route Apr 15 09:08:21 localhost /usr/sbin/sip-proxy[16928]: ERROR: entering failure route
Hi Juha,
drop in branch_route was missing, as Andreas Granig reported few days ago. I just committed the patch, can you test again?
Since it was not there, tm actually tried to forward even if you called drop in branch route.
Cheers, Daniel
On 4/15/10 8:11 AM, Juha Heinanen wrote:
Juha Heinanen writes:
and it turned out that failure route is not called if t_relay() fails. the mystery is, why some times after calling drop() in branch route t_relay() fails and failure route is not called and some other times t_relay() succeeds and failure route is called?
here is a few test calls that show the unpredictability. six calls, two enter failure route after drop and four don't because of t_relay failure. the first one after proxy restart seems always enter failure route.
-- juha
Apr 15 09:07:14 localhost /usr/sbin/sip-proxy[16889]: INFO: Routing initial INVITEsip:0407058055@gw1.test.fi tosip:192.98.100.2:5060 Apr 15 09:07:14 localhost /usr/sbin/sip-proxy[16889]: NOTICE: Dropping request in branch route Apr 15 09:07:17 localhost /usr/sbin/sip-proxy[16928]: ERROR: entering failure route Apr 15 09:07:24 localhost /usr/sbin/sip-proxy[16886]: INFO: Routing initial INVITEsip:0407058055@gw1.test.fi tosip:192.98.100.2:5060 Apr 15 09:07:24 localhost /usr/sbin/sip-proxy[16886]: NOTICE: Dropping request in branch route Apr 15 09:07:24 localhost /usr/sbin/sip-proxy[16886]: ERROR: t_relay failed Apr 15 09:07:35 localhost /usr/sbin/sip-proxy[16889]: INFO: Routing initial INVITEsip:0407058055@gw1.test.fi tosip:192.98.100.2:5060 Apr 15 09:07:35 localhost /usr/sbin/sip-proxy[16889]: NOTICE: Dropping request in branch route Apr 15 09:07:35 localhost /usr/sbin/sip-proxy[16889]: ERROR: t_relay failed Apr 15 09:07:53 localhost /usr/sbin/sip-proxy[16888]: INFO: Routing initial INVITEsip:0407058055@gw1.test.fi tosip:192.98.100.2:5060 Apr 15 09:07:53 localhost /usr/sbin/sip-proxy[16888]: NOTICE: Dropping request in branch route Apr 15 09:07:53 localhost /usr/sbin/sip-proxy[16888]: ERROR: t_relay failed Apr 15 09:08:04 localhost /usr/sbin/sip-proxy[16887]: INFO: Routing initial INVITEsip:0407058055@gw1.test.fi tosip:192.98.100.2:5060 Apr 15 09:08:04 localhost /usr/sbin/sip-proxy[16887]: NOTICE: Dropping request in branch route Apr 15 09:08:04 localhost /usr/sbin/sip-proxy[16887]: ERROR: t_relay failed Apr 15 09:08:18 localhost /usr/sbin/sip-proxy[16886]: INFO: Routing initial INVITEsip:0407058055@gw1.test.fi tosip:192.98.100.2:5060 Apr 15 09:08:18 localhost /usr/sbin/sip-proxy[16886]: NOTICE: Dropping request in branch route Apr 15 09:08:21 localhost /usr/sbin/sip-proxy[16928]: ERROR: entering failure route
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Daniel-Constantin Mierla writes:
drop in branch_route was missing, as Andreas Granig reported few days ago. I just committed the patch, can you test again?
daniel,
ok, i'll try. if failure route is set when i call drop(), will it be executed and if so with which reply code?
-- juha
Hi Juha,
On 4/15/10 11:31 AM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
drop in branch_route was missing, as Andreas Granig reported few days ago. I just committed the patch, can you test again?
daniel,
ok, i'll try. if failure route is set when i call drop(), will it be executed and if so with which reply code?
no failure route is triggered by branch route actions, since there can be many branches, and branch route works only on one. failure_route is executed in the context of the transaction.
Cheers, Daniel
Daniel-Constantin Mierla writes:
no failure route is triggered by branch route actions, since there can be many branches, and branch route works only on one. failure_route is executed in the context of the transaction.
i tested with one branch that gets dropped and i get to syslog from t_relay:
Apr 15 12:54:23 localhost /usr/sbin/sip-proxy[26812]: ERROR: tm [t_fwd.c:1388]: ERROR: t_forward_nonack: failure to add branches
i don't think that i try to add any new branches after this single one.
-- juha
Daniel-Constantin Mierla writes:
drop in branch_route was missing, as Andreas Granig reported few days ago. I just committed the patch, can you test again?
daniel,
any explanation to the error message that i get when i call drop() in branch route? or is it something that andrei needs to figure out?
-- juha
-----------------------------------------------------------------------
i tested with one branch that gets dropped and i get to syslog from t_relay:
Apr 15 12:54:23 localhost /usr/sbin/sip-proxy[26812]: ERROR: tm [t_fwd.c:1388]: ERROR: t_forward_nonack: failure to add branches
Hi Juha,
On 4/17/10 8:49 AM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
drop in branch_route was missing, as Andreas Granig reported few days ago. I just committed the patch, can you test again?
daniel,
any explanation to the error message that i get when i call drop() in branch route? or is it something that andrei needs to figure out?
i had it in mind by was busy yesterday. it needed a way to filter this case apart of adding branches errors. Can you give it a try? I committed on master brnach, if is ok, i will cherry pick to kamailio 3.0.
Thanks, Daniel
i tested with one branch that gets dropped and i get to syslog from t_relay:
Apr 15 12:54:23 localhost /usr/sbin/sip-proxy[26812]: ERROR: tm [t_fwd.c:1388]: ERROR: t_forward_nonack: failure to add branches
Daniel-Constantin Mierla writes:
i had it in mind by was busy yesterday. it needed a way to filter this case apart of adding branches errors. Can you give it a try? I committed on master brnach, if is ok, i will cherry pick to kamailio 3.0.
daniel,
now the error message is gone. when i call drop() in branch route, t_relay() fails with result code -6:
Apr 17 12:50:47 localhost /usr/sbin/sip-proxy[25815]: INFO: Routing initial INVITE sip:0407058055@gw1.test.fi to sip:192.98.100.2:5060 Apr 17 12:50:47 localhost /usr/sbin/sip-proxy[25815]: INFO: dropping Apr 17 12:50:47 localhost /usr/sbin/sip-proxy[25815]: INFO: t_relay failed with result -6
as inaki asked, do you know if these k 1.5 result codes are still valid in sr?
-1 - generic internal error -2 - bad message (parsing errors) -3 - no destination available (no branches were added or request already cancelled) -4 - bad destination (unresolvable address) -5 - destination filtered (black listed) -6 - generic send failed
-- juha
Hello,
On 4/17/10 11:51 AM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
i had it in mind by was busy yesterday. it needed a way to filter this case apart of adding branches errors. Can you give it a try? I committed on master brnach, if is ok, i will cherry pick to kamailio 3.0.
daniel,
now the error message is gone. when i call drop() in branch route, t_relay() fails with result code -6:
Apr 17 12:50:47 localhost /usr/sbin/sip-proxy[25815]: INFO: Routing initial INVITEsip:0407058055@gw1.test.fi tosip:192.98.100.2:5060 Apr 17 12:50:47 localhost /usr/sbin/sip-proxy[25815]: INFO: dropping Apr 17 12:50:47 localhost /usr/sbin/sip-proxy[25815]: INFO: t_relay failed with result -6
as inaki asked, do you know if these k 1.5 result codes are still valid in sr?
-1 - generic internal error -2 - bad message (parsing errors) -3 - no destination available (no branches were added or request already cancelled) -4 - bad destination (unresolvable address) -5 - destination filtered (black listed) -6 - generic send failed
I think the codes are taken from error.h now, at least for this particular case is E_CFG, which is -6 -- on the idea that error code was triggered by cfg action. Andrei should confirm whether is error.h driving the codes or not with the new tm. However, k 1.5 codes don't apply.
Cheers, Daniel
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Daniel-Constantin Mierla writes:
I think the codes are taken from error.h now, at least for this particular case is E_CFG, which is -6 -- on the idea that error code was triggered by cfg action. Andrei should confirm whether is error.h driving the codes or not with the new tm. However, k 1.5 codes don't apply.
then it would be good to document the current list in t_relay() README. i'll add this request to the tracker.
-- juha