Update kamailio.cfg

Fixed To file replacement for relaying INVITEs
This commit is contained in:
2024-10-18 16:12:50 +02:00
parent b0e2998bb1
commit 93b681b8ed

View File

@@ -29,7 +29,7 @@ log_prefix="{$mt $hdr(CSeq) $ci} "
# RTPProxy settings
modparam("rtpengine", "rtpengine_sock", "udp:127.0.0.1:2223")
# Dispatcher settings
modparam("dispatcher", "db_url", "mysql://kamailio:kamailiow@localhost/kamailio")
modparam("dispatcher", "db_url", "mysql://kamy:kamy@localhost/kamailio")
modparam("dispatcher", "ds_ping_interval", 3)
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_probing_threshold", 2)
@@ -42,7 +42,7 @@ modparam("dispatcher", "ds_probing_mode", 1) #Keeps pinging gateways
modparam("ctl", "binrpc", "/var/run/kamailio/kamailio_ctl")
# UAC settings
modparam("uac","reg_contact_addr", "10.0.5.6:5060")
modparam("uac","reg_db_url", "mysql://kamailio:kamailiow@localhost/kamailio")
modparam("uac","reg_db_url", "mysql://kamy:kamy@localhost/kamailio")
modparam("uac","auth_username_avp","$avp(auser)")
modparam("uac","auth_password_avp","$avp(apass)")
modparam("uac","auth_realm_avp","$avp(arealm)")
@@ -58,7 +58,7 @@ modparam("dialog", "dlg_flag", DLG_FLAG)
# ACC
# -- cdr accounting to database
modparam("acc", "db_url", "mysql://kamailio:kamailiow@localhost/kamailio")
modparam("acc", "db_url", "mysql://kamy:kamy@localhost/kamailio")
modparam("acc", "cdrs_table", "acc_cdrs")
modparam("acc", "cdr_enable", 1)
modparam("acc", "cdr_skip", "nocdr")
@@ -152,7 +152,13 @@ route[RELAY] {
$avp(direction)="inbound";
} else {
$avp(direction)="outbound";
# Change To header
ds_select_dst("1","9");
if (is_method("INVITE")) {
uac_replace_to("sip:" + $rU + "@" + $nh(d) + ":" + $nh(p));
}
}
# If auth is required perform it
t_on_failure("TRUNKAUTH");