Hi All,
I'm testing carrierroute modue in kamailio 1.5.4-notls (i386/linux). I have things working like this:
sipp><kamailio carrierroute>< 2 asterisk servers A & B even distribution of calls
So A & B are in carrier1 domain1, I have failureroute setup with 2 more asterisk servers C& D in carrier1 domain2.
While I'm processing calls from sipp and sending to A & B, I can fail A and then all calls go to B as expected. But if I fail both A & B, the calls fail, so I'm guessing I don't have the faliure_route configured correctly. Here is my current config:
route {
if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); exit; }
if ($rU==NULL) { # request with no Username in RURI sl_send_reply("484","Address Incomplete"); exit; }
if (msg:len >= 2048 ) { sl_send_reply("513", "Message too big"); exit; };
if (!allow_trusted()) { sl_send_reply("403", "Forbidden"); exit; };
if (is_method("CANCEL")) { if (t_check_trans()) t_relay(); exit; }
t_check_trans();
route(2); }
route[1] {
if (!t_relay()) { sl_reply_error(); } exit; }
route[2] { if(!cr_route("1", "1", "$rU", "$rU", "call_id")){ sl_send_reply("403", "Not allowed"); } else { t_on_failure("2"); route(1); } }
failure_route[2] { if (t_check_status("408|5[0-9][0-9]")) { if(!cr_route("1", "2", "$rU", "$rU", "call_id")){ t_reply("403", "Not allowed"); } else { t_relay(); } } }
I think the database entries are setup ok, I used the example in the module doc, but I can share that if needed. Any guidance will be appriciated.
Thanks.
JR
I think the database entries are setup ok, I used the example in the module doc, but I can share that if needed. Any guidance will be appriciated.
Thanks.
JR
Hello JR
Can you provide more info regarding the problem. Any special logging info in the debug log?
You can increase the debug level to 3 (higher means more verbose) by using the command `kamctl fifo debug 3`
Also what reply do you get from A and B boxes? Failure_route is only executed if reply code is > 300 on all branches... I will check your other mail because this might be the problem.
Also a trace of the call will help. ngrep is very usefull (ngrep -W byline -d any sip port 5060 does the trick in most cases)
Hope I was not that redundant and the info helps.
Cheers Marius
On Thu, May 27, 2010 at 2:39 AM, marius zbihlei marius.zbihlei@1and1.ro wrote:
I think the database entries are setup ok, I used the example in the module doc, but I can share that if needed. Any guidance will be appriciated.
Thanks.
JR
Hello JR
Can you provide more info regarding the problem. Any special logging info in the debug log?
You can increase the debug level to 3 (higher means more verbose) by using the command `kamctl fifo debug 3`
Debug loggin is set to 9. The simulation is when a gateway is totally off-line, so there is no response at all. Here is a trace with a call from sipp to kamailio, the call is sent to the first gateway in carrier 1, domain 1. The gateway is off-line, no response.
The pastebin has my kamailio.cfg, the kamailio debug trace and the error received by sipp and the ngrep capture.
Also what reply do you get from A and B boxes? Failure_route is only executed if reply code is > 300 on all branches... I will check your other mail because this might be the problem.
Also a trace of the call will help. ngrep is very usefull (ngrep -W byline -d any sip port 5060 does the trick in most cases)
Hope I was not that redundant and the info helps.
Cheers Marius
Thanks for having a look.
JR
JR Richardson wrote:
On Thu, May 27, 2010 at 2:39 AM, marius zbihlei marius.zbihlei@1and1.ro wrote:
I think the database entries are setup ok, I used the example in the module doc, but I can share that if needed. Any guidance will be appriciated.
Thanks.
JR
Hello JR
Can you provide more info regarding the problem. Any special logging info in the debug log?
You can increase the debug level to 3 (higher means more verbose) by using the command `kamctl fifo debug 3`
Debug loggin is set to 9. The simulation is when a gateway is totally off-line, so there is no response at all. Here is a trace with a call from sipp to kamailio, the call is sent to the first gateway in carrier 1, domain 1. The gateway is off-line, no response.
The pastebin has my kamailio.cfg, the kamailio debug trace and the error received by sipp and the ngrep capture.
Hello
As I see from the info you gave, carrierroute is not configured correctly regarding your setup
May 27 09:07:00 [25598] INFO:carrierroute:rewrite_uri_recursor: URI or prefix tree nodes empty, empty rule list May 27 09:07:00 [25598] INFO:carrierroute:cr_do_route: rewrite_uri_recursor doesn't complete, uri 65, carrier 1, domain 2
This logic is enabled by the code:
failure_route[2] { if (t_check_status("408|5[0-9][0-9]")) { if(!cr_route("1", "2", "$rU", "$rU", "call_id")){ t_reply("403", "Not allowed"); } else { t_relay(); } } }
So your relaying to C and D asterisk boxes fails because it can't find a a prefix match for uri 65. Hence the 403 in the sipp scenario. Please check the routing table configured for the carrierroute module to contain a valid entry for carrier 1 domain 2 that might match the prefix 65.
Cheers Marius
On Thu, May 27, 2010 at 9:57 AM, marius zbihlei marius.zbihlei@1and1.ro wrote:
JR Richardson wrote:
On Thu, May 27, 2010 at 2:39 AM, marius zbihlei marius.zbihlei@1and1.ro wrote:
I think the database entries are setup ok, I used the example in the module doc, but I can share that if needed. Any guidance will be appriciated.
Thanks.
JR
Hello JR
Can you provide more info regarding the problem. Any special logging info in the debug log?
You can increase the debug level to 3 (higher means more verbose) by using the command `kamctl fifo debug 3`
Debug loggin is set to 9. The simulation is when a gateway is totally off-line, so there is no response at all. Here is a trace with a call from sipp to kamailio, the call is sent to the first gateway in carrier 1, domain 1. The gateway is off-line, no response.
The pastebin has my kamailio.cfg, the kamailio debug trace and the error received by sipp and the ngrep capture.
Hello
As I see from the info you gave, carrierroute is not configured correctly regarding your setup
May 27 09:07:00 [25598] INFO:carrierroute:rewrite_uri_recursor: URI or prefix tree nodes empty, empty rule list May 27 09:07:00 [25598] INFO:carrierroute:cr_do_route: rewrite_uri_recursor doesn't complete, uri 65, carrier 1, domain 2
This logic is enabled by the code:
failure_route[2] { if (t_check_status("408|5[0-9][0-9]")) { if(!cr_route("1", "2", "$rU", "$rU", "call_id")){ t_reply("403", "Not allowed"); } else { t_relay(); } } }
So your relaying to C and D asterisk boxes fails because it can't find a a prefix match for uri 65. Hence the 403 in the sipp scenario. Please check the routing table configured for the carrierroute module to contain a valid entry for carrier 1 domain 2 that might match the prefix 65.
Cheers Marius
Thanks Marius, We are douple posting, I appologize, Henning is also directing me in the same method, he noticed that as well. I did have a database issue, but now I'm stuck on the branch route issue. Please reveiw current post "continue processing route script if no response from gateway" response.
Thanks.
JR