[SR-Users] Dispatcher stops working

Sergio Charrua sergio.charrua at voip.pt
Wed Sep 16 12:38:18 CEST 2020


Hello,

Using Kamailio 5.1.6 for load balancing & failover,
I noticed that from time to time, and very rarely, the dispatcher module
stops dispatching to the Asterisk servers.
I have to execute a "kamcmd dispatcher reload" for it to (re)start working.

This is my dispatcher.list :
1 sip:10.19.XXX.YYY:5060 0 1 duid=sipgw01;maxload=100
1 sip:10.19.XXX.YYY:5060 0 2 duid=sipgw02;maxload=100
1 sip:10.19.XXX.YYY:5060 0 3 duid=sipgw03;maxload=100
1 sip:10.19.XXX.YYY:5060 0 4 duid=sipgw04;maxload=100

This is my dispatch routes:
# Dispatch requests
route[DISPATCH] {

        if(!ds_select_dst("1", "10","4"))
        {
                xlog("L_INFO","no destination selected from dispatcher
list!");
                send_reply("404", "No destination");
                exit;
        }

        xlog("L_INFO","going to <$ru> via <$du>\n");

        t_on_failure("RTF_DISPATCH");
        route(RELAY);

        exit;

}

# Sample failure route
failure_route[RTF_DISPATCH] {
        if (t_is_canceled()) {
                exit;
        }
        xlog("L_INFO", "Media server $du failed to answer, selecting other
one!");
        # next DST - only for 500 or local timeout
        if ( t_check_status("500") || (t_branch_timeout() &&
!t_branch_replied()) )
        {
                #mark the destination Inactive and Probing
                ds_mark_dst("ip");
                if(ds_next_dst())
                {
                        t_on_failure("RTF_DISPATCH");
                        route(RELAY);
                        exit;
                }
        }
}

I suspect that the ds_mark_dst("ip") command in RTF_DISPACTH is the cause.
Is there any think I can improve on this? Or any know bug with the
dispatcher in Kamailio 5.1.6 version?

Thanks in advance,

*Sérgio Charrua*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200916/d95fe8dd/attachment.htm>


More information about the sr-users mailing list