[SR-Users] Failover with Dispatcher Module
Daniel-Constantin Mierla
miconda at gmail.com
Fri Feb 5 10:59:45 CET 2021
Hello,
read the dispatcher module docs related to ds_inactive_threshold,
ds_ping_interval as well as tm module docs related to retransmission
timers .. by tuning their values, you can get faster detection of
inactive gateways.
Cheers,
Daniel
On 04.02.21 19:54, alirsm wrote:
> Hi
>
> I have setup dispatcher failover on Kamailio 5.1 as below. If
> destination X.X.X.X is down, traffic should be routed to Y.Y.Y.Y.
> The failover is working but every time after 30 sec Timeout. Is there
> a way to setup health check properly so the failed destination can be
> ignored while it is down?
>
> Your help is greatly appreciated,
> AL
>
> # dispatcher.list
> 1 sip:X.X.X.X:5060 0 0
> 1 sip:Y.Y.Y.Y:5060 0 0
>
> # ----- dispatcher params -----
> modparam("dispatcher", "list_file",
> "/usr/local/etc/kamailio/dispatcher.list")
> modparam("dispatcher", "flags", 2)
> modparam("dispatcher", "ds_ping_interval", 10)
> modparam("dispatcher", "dst_avp", "$avp(AVP_DST)")
> modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)")
> modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)")
> modparam("dispatcher", "sock_avp", "$avp(AVP_SOCK)")
> modparam("dispatcher", "ds_probing_mode", 1)
> modparam("dispatcher", "ds_inactive_threshold", 4)
> modparam("dispatcher", "ds_ping_latency_stats", 1)
> modparam("dispatcher", "ds_probing_threshold", 1)
>
>
> # Dispatch requests
> route[DISPATCH] {
> if(!ds_select_dst("1", "4")) {
> send_reply("503", "No destination");
> exit;
> }
> t_on_failure("DISPATCH_FAILOVER");
> route(RELAY);
> exit;
> }
>
> # Failure Route
> failure_route[DISPATCH_FAILOVER]{
> if (t_is_canceled()) exit;
> if(!ds_next_dst()) {
> send_reply("503", "Out of gateways");
> exit;
> }
> t_on_failure("DISPATCHER_FAILOVER");
> t_relay();
> }
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210205/5b4d3b8e/attachment.htm>
More information about the sr-users
mailing list