Re: Failover-Failback without any Load-Balancing
Kama User via sr-users <[email protected]> Mon, 06 Apr 2026 12:52:08 -0000
| Newsgroups | gmane.comp.voip.ser |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the answer.
I made the changes but unfortunately the result is the same.
/etc/kamailio/dispatcher.list:
1 sip:10.0.0.65:5060 0 2
1 sip:10.0.0.75:5060 0 1
/etc/kamailio/kamailio.cfg:
# --- Global Parameter ---
debug=2
log_stderror=no
log_facility=LOG_LOCAL0
fork=yes
children=4
# IP Addresses of Kamailio Server
listen=udp:10.0.0.203:5060
listen=tcp:10.0.0.203:5060
# Module Loading
mpath="/usr/lib/x86_64-linux-gnu/kamailio/modules/"
# --- Load Modules ---
loadmodule "tm.so"
loadmodule "sl.so"
loadmodule "rr.so"
loadmodule "pv.so"
loadmodule "textops.so"
loadmodule "dispatcher.so"
loadmodule "maxfwd.so"
loadmodule "corex.so"
loadmodule "xlog.so"
loadmodule "ctl.so"
# --- Module Parameters ---
modparam("tm", "fr_timer", 5000)
modparam("tm", "fr_inv_timer", 30000)
modparam("dispatcher", "list_file", "/etc/kamailio/dispatcher.list")
modparam("dispatcher", "force_dst", 1)
modparam("dispatcher", "flags", 2)
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_ping_interval", 10)
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_probing_threshold", 2)
modparam("dispatcher", "ds_inactive_threshold", 4)
request_route {
if (is_method("INVITE|REGISTER")) {
if (!ds_select_dst("1", "4")) {
sl_send_reply("503", "No servers available");
exit;
}
xlog*("Selected Reg Trunk $rd/$du \n");
t_on_failure("FAILOVER");
t_relay();
exit;
}
}
failure_route[FAILOVER] {
if (t_check_status("503|408") or t_branch_timeout() or !t_branch_replied()) {
xlog("Failed Trunk $rd/$du Detected \n");
if (ds_next_dst()) {
t_on_failure("FAILOVER");
t_relay();
exit;
}
}
}
Can I do failover-failback with this construction?
rewritehostport("10.0.0.65:5060");
forward();
Thanks in advance.
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!