Hello,
We have a main route where we try multiple destinations (SIP Providers) one by one in case of failure. We modify the $ru in branch routes.
I have to manipulate the $rU in the main route (adding 000 and strip 000) to create the second branch.
Otherwise I have an error in Kamailio , is it expected ??
Feb 16 10:29:13 proxy2 /usr/sbin/kamailio[3837]: NOTICE: RU => 0003280033800 (Branch 0)
* Adding 000 in main route Feb 16 10:29:13 proxy2 /usr/sbin/kamailio[3837]: NOTICE: RU => 3280033800 (Branch 0)
* Strip "000" in main route * Timeout of first provider (going to main route again with an other branch) Feb 16 10:29:15 proxy2 /usr/sbin/kamailio[3840]: NOTICE: RU => 0003280033800 (Branch 1) Feb 16 10:29:15 proxy2 /usr/sbin/kamailio[3840]: NOTICE: RU => 3280033800 (Branch 1)
* Call OK
I will now remove the prefix & strip command in main route
Feb 16 10:32:11 proxy2 /usr/sbin/kamailio[3951]: NOTICE: RU => 3280033800 (Branch 0) Feb 16 10:32:11 proxy2 /usr/sbin/kamailio[3951]: NOTICE: RU => 3280033800 (Branch 0) Feb 16 10:32:11 proxy2 /usr/sbin/kamailio[3951]: NOTICE: Branch to sip:3280033800@XXXXXXXXXXX
* Timeout
Feb 16 10:32:13 proxy2 /usr/sbin/kamailio[3955]: NOTICE: RU => 3280033800 (Branch 1) Feb 16 10:32:13 proxy2 /usr/sbin/kamailio[3955]: NOTICE: RU => 3280033800 (Branch 1) Feb 16 10:32:13 proxy2 /usr/sbin/kamailio[3955]: ERROR: tm [t_fwd.c:1728]: t_forward_nonack(): no branches for forwarding Feb 16 10:32:13 proxy2 /usr/sbin/kamailio[3955]: ERROR: tm [tm.c:1548]: _w_t_relay_to(): t_forward_noack failed Feb 16 10:32:13 proxy2 /usr/sbin/kamailio[3955]: ERROR: sl [sl_funcs.c:362]: sl_reply_error(): stateless error reply used: I'm terribly sorry, server error occurred (6/SL)
Any suggestions ?
Hello,
$ru=$ru; instead of add & strip solved the issue.
I suppose we have to "write" the Request URI to load or execute the routing branch.
De : Nicolas Breuer Envoyé : samedi 16 février 2019 10:33 À : 'Kamailio (SER) - Users Mailing List' sr-users@lists.kamailio.org Objet : Branches Routes
Hello,
We have a main route where we try multiple destinations (SIP Providers) one by one in case of failure. We modify the $ru in branch routes.
I have to manipulate the $rU in the main route (adding 000 and strip 000) to create the second branch.
Otherwise I have an error in Kamailio , is it expected ??
Feb 16 10:29:13 proxy2 /usr/sbin/kamailio[3837]: NOTICE: RU => 0003280033800 (Branch 0)
* Adding 000 in main route Feb 16 10:29:13 proxy2 /usr/sbin/kamailio[3837]: NOTICE: RU => 3280033800 (Branch 0)
* Strip "000" in main route * Timeout of first provider (going to main route again with an other branch) Feb 16 10:29:15 proxy2 /usr/sbin/kamailio[3840]: NOTICE: RU => 0003280033800 (Branch 1) Feb 16 10:29:15 proxy2 /usr/sbin/kamailio[3840]: NOTICE: RU => 3280033800 (Branch 1)
* Call OK
I will now remove the prefix & strip command in main route
Feb 16 10:32:11 proxy2 /usr/sbin/kamailio[3951]: NOTICE: RU => 3280033800 (Branch 0) Feb 16 10:32:11 proxy2 /usr/sbin/kamailio[3951]: NOTICE: RU => 3280033800 (Branch 0) Feb 16 10:32:11 proxy2 /usr/sbin/kamailio[3951]: NOTICE: Branch to sip:3280033800@XXXXXXXXXXX
* Timeout
Feb 16 10:32:13 proxy2 /usr/sbin/kamailio[3955]: NOTICE: RU => 3280033800 (Branch 1) Feb 16 10:32:13 proxy2 /usr/sbin/kamailio[3955]: NOTICE: RU => 3280033800 (Branch 1) Feb 16 10:32:13 proxy2 /usr/sbin/kamailio[3955]: ERROR: tm [t_fwd.c:1728]: t_forward_nonack(): no branches for forwarding Feb 16 10:32:13 proxy2 /usr/sbin/kamailio[3955]: ERROR: tm [tm.c:1548]: _w_t_relay_to(): t_forward_noack failed Feb 16 10:32:13 proxy2 /usr/sbin/kamailio[3955]: ERROR: sl [sl_funcs.c:362]: sl_reply_error(): stateless error reply used: I'm terribly sorry, server error occurred (6/SL)
Any suggestions ?
Hi Nicolas,
What is the version of Kamailio you are using ? Could you show us a piece of code to understand what are you doing ?
Kind regards. -- Ludovic Gasc Lemaire (GMLudo)
Le sam. 16 févr. 2019 à 23:17, Nicolas Breuer Nicolas.Breuer@belcenter.biz a écrit :
Hello,
$ru=$ru; instead of add & strip solved the issue.
I suppose we have to “write” the Request URI to load or execute the routing branch.
*De :* Nicolas Breuer *Envoyé :* samedi 16 février 2019 10:33 *À :* 'Kamailio (SER) - Users Mailing List' sr-users@lists.kamailio.org *Objet :* Branches Routes
Hello,
We have a main route where we try multiple destinations (SIP Providers) one by one in case of failure.
We modify the $ru in branch routes.
I have to manipulate the $rU in the main route (adding 000 and strip 000) to create the second branch.
Otherwise I have an error in Kamailio , is it expected ??
Feb 16 10:29:13 proxy2 /usr/sbin/kamailio[3837]: NOTICE: RU => 0003280033800 (Branch 0)
- Adding 000 in main route
Feb 16 10:29:13 proxy2 /usr/sbin/kamailio[3837]: NOTICE: RU => 3280033800 (Branch 0)
- Strip “000” in main route
- Timeout of first provider (going to main route again with an other
branch)
Feb 16 10:29:15 proxy2 /usr/sbin/kamailio[3840]: NOTICE: RU => 0003280033800 (Branch 1)
Feb 16 10:29:15 proxy2 /usr/sbin/kamailio[3840]: NOTICE: RU => 3280033800 (Branch 1)
- Call OK
I will now remove the prefix & strip command in main route
Feb 16 10:32:11 proxy2 /usr/sbin/kamailio[3951]: NOTICE: RU => 3280033800 (Branch 0)
Feb 16 10:32:11 proxy2 /usr/sbin/kamailio[3951]: NOTICE: RU => 3280033800 (Branch 0)
Feb 16 10:32:11 proxy2 /usr/sbin/kamailio[3951]: NOTICE: Branch to sip:3280033800@XXXXXXXXXXX
- Timeout
Feb 16 10:32:13 proxy2 /usr/sbin/kamailio[3955]: NOTICE: RU => 3280033800 (Branch 1)
Feb 16 10:32:13 proxy2 /usr/sbin/kamailio[3955]: NOTICE: RU => 3280033800 (Branch 1)
Feb 16 10:32:13 proxy2 /usr/sbin/kamailio[3955]: ERROR: tm [t_fwd.c:1728]: t_forward_nonack(): no branches for forwarding
Feb 16 10:32:13 proxy2 /usr/sbin/kamailio[3955]: ERROR: tm [tm.c:1548]: _w_t_relay_to(): t_forward_noack failed
Feb 16 10:32:13 proxy2 /usr/sbin/kamailio[3955]: ERROR: sl [sl_funcs.c:362]: sl_reply_error(): stateless error reply used: I'm terribly sorry, server error occurred (6/SL)
Any suggestions ?
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi Ludovic,
Version of Kamailio is 5.1.7 Maybe with these few lines it can help ?
route[Out] { ## If first time in this route, go to first destination.
$ru=$ru; route(RELAY);
}
failure_route[MANAGE_FAILURE] { if (t_branch_timeout () ){ # Failure with that ID -> ID+1; route(Out); } }
branch_route[MANAGE_BRANCH] {
###Get the IP-Address based on the ID of the next-hop and send the SIP message $ru = "sip:" + $rU + "@" + $var(IpAddress) + ":5060";
}
De : sr-users sr-users-bounces@lists.kamailio.org De la part de Ludovic Gasc Lemaire Envoyé : samedi 16 février 2019 23:35 À : Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Objet : Re: [SR-Users] Branches Routes
Hi Nicolas,
What is the version of Kamailio you are using ? Could you show us a piece of code to understand what are you doing ?
Kind regards. -- Ludovic Gasc Lemaire (GMLudo)
Hello Nicolas,
Why dont you use carrier route module to strip and add smth. you can choose your own routing logic depends on response code.
Best regards.
Yasin CANER
http://kamailio.org/docs/modules/5.2.x/modules/carrierroute.html
________________________________ From: sr-users sr-users-bounces@lists.kamailio.org on behalf of Nicolas Breuer Nicolas.Breuer@belcenter.biz Sent: Sunday, February 17, 2019 1:00 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Branches Routes
Hi Ludovic,
Version of Kamailio is 5.1.7
Maybe with these few lines it can help ?
route[Out] {
## If first time in this route, go to first destination.
$ru=$ru;
route(RELAY);
}
failure_route[MANAGE_FAILURE] {
if (t_branch_timeout () ){
# Failure with that ID -> ID+1;
route(Out);
}
}
branch_route[MANAGE_BRANCH] {
###Get the IP-Address based on the ID of the next-hop and send the SIP message
$ru = "sip:" + $rU + "@" + $var(IpAddress) + ":5060";
}
De : sr-users sr-users-bounces@lists.kamailio.org De la part de Ludovic Gasc Lemaire Envoyé : samedi 16 février 2019 23:35 À : Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Objet : Re: [SR-Users] Branches Routes
Hi Nicolas,
What is the version of Kamailio you are using ?
Could you show us a piece of code to understand what are you doing ?
Kind regards.
--
Ludovic Gasc Lemaire (GMLudo)