[SR-Users] Carrierroute failover domain not working

JR Richardson jmr.richardson at gmail.com
Thu May 27 00:48:29 CEST 2010


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
-- 
JR Richardson
Engineering for the Masses



More information about the sr-users mailing list