Browse Source

indentation & remove rr in handle_in_dialog, settings for rr

update-rsyslog-config
lazedo 7 years ago
parent
commit
a883c27591
2 changed files with 54 additions and 46 deletions
  1. +50
    -46
      kamailio/default.cfg
  2. +4
    -0
      kamailio/defs.cfg

+ 50
- 46
kamailio/default.cfg View File

@ -132,8 +132,9 @@ loadmodule "sl.so"
######## Record-Route and Route module ########
loadmodule "rr.so"
modparam("rr", "enable_full_lr", 1)
modparam("rr", "enable_double_rr", 1)
modparam("rr", "enable_full_lr", RR_FULL_LR)
modparam("rr", "enable_double_rr", RR_DOUBLE_RR)
modparam("rr", "force_send_socket", RR_FORCE_SOCKET)
######## Max-Forward processor module ########
loadmodule "maxfwd.so"
@ -172,6 +173,9 @@ loadmodule "xlog.so"
######## UAC ########
loadmodule "uac.so"
modparam("uac","restore_mode","manual")
modparam("uac","restore_from_avp","$avp(original_uri_from)")
modparam("uac","restore_to_avp","$avp(original_uri_to)")
######## AVP's ########
loadmodule "avp.so"
@ -456,8 +460,7 @@ route[HANDLE_OPTIONS]
route[HANDLE_NOTIFY]
{
if (has_totag())
return;
if (has_totag()) return;
if (is_method("NOTIFY")) {
if (isflagset(FLAG_INTERNALLY_SOURCED)) {
@ -545,51 +548,52 @@ route[HANDLE_MESSAGE]
route[HANDLE_IN_DIALOG_REQUESTS]
{
if (has_totag()) {
if (is_method("INVITE")) {
setflag(FLAG_SESSION_PROGRESS);
record_route();
}
if (loose_route()) {
if (!has_totag()) return;
if (is_method("INVITE")) {
setflag(FLAG_SESSION_PROGRESS);
# record_route();
}
#!ifdef ACCOUNTING_ROLE
if (is_method("BYE")) {
setflag(FLAG_ACC);
setflag(FLAG_ACCFAILED);
}
#!endif
if (loose_route()) {
#!ifdef NAT_TRAVERSAL_ROLE
if(!isdsturiset()) {
handle_ruri_alias();
}
#!endif
#!ifdef ACCOUNTING_ROLE
if (is_method("BYE")) {
setflag(FLAG_ACC);
setflag(FLAG_ACCFAILED);
}
#!endif
xlog("L_INFO", "$ci|log|loose_route in-dialog message\n");
# Called on in-dialog requests
# If the request in an Invite for on hold from external to internal,
# associate the contact with the media server
# if Invite for on hold, we need to associate the contact URI with the next hop
if (is_method("INVITE") && !isflagset(FLAG_INTERNALLY_SOURCED) && is_audio_on_hold()) {
setflag(FLAG_ASSOCIATE_USER);
}
if ( is_method("NOTIFY") ) {
# Add Record-Route for in-dialog NOTIFY as per RFC 6665.
record_route();
}
route(RELAY);
} else if (isflagset(FLAG_INTERNALLY_SOURCED)) {
xlog("L_INFO", "$ci|log|relay internally sourced in-dialog message without loose_route\n");
route(RELAY);
} else if (t_check_trans()) {
xlog("L_INFO", "$ci|log|allow message for a known transaction\n");
route(RELAY);
} else {
xlog("L_INFO", "$ci|log|message had a to-tag but can't be loose routed\n");
sl_send_reply("481", "Call Leg/Transaction Does Not Exist");
#!ifdef NAT_TRAVERSAL_ROLE
if(!isdsturiset()) {
handle_ruri_alias();
}
exit();
#!endif
xlog("L_INFO", "$ci|log|loose_route in-dialog message\n");
# Called on in-dialog requests
# If the request in an Invite for on hold from external to internal,
# associate the contact with the media server
# if Invite for on hold, we need to associate the contact URI with the next hop
if (is_method("INVITE") && !isflagset(FLAG_INTERNALLY_SOURCED) && is_audio_on_hold()) {
setflag(FLAG_ASSOCIATE_USER);
}
if ( is_method("NOTIFY") ) {
# Add Record-Route for in-dialog NOTIFY as per RFC 6665.
record_route();
}
route(RELAY);
} else if (isflagset(FLAG_INTERNALLY_SOURCED)) {
xlog("L_INFO", "$ci|log|relay internally sourced in-dialog message without loose_route\n");
route(RELAY);
} else if (t_check_trans()) {
xlog("L_INFO", "$ci|log|allow message for a known transaction\n");
route(RELAY);
} else {
xlog("L_INFO", "$ci|log|message had a to-tag but can't be loose routed\n");
sl_send_reply("481", "Call Leg/Transaction Does Not Exist");
}
exit();
}
route[PREPARE_INITIAL_REQUESTS]
@ -718,8 +722,8 @@ route[EXTERNAL_TO_INTERNAL_RELAY]
append_hf("X-AUTH-IP: $si\r\n");
append_hf("X-AUTH-PORT: $sp\r\n");
#!ifdef REGISTRAR_ROLE
route(ADD_AUTHORIZATION_HEADERS);
#!ifdef REGISTRAR_ROLE
route(ADD_AUTHORIZATION_HEADERS);
#!endif
t_on_reply("INTERNAL_REPLY");


+ 4
- 0
kamailio/defs.cfg View File

@ -60,6 +60,10 @@
#!substdef "!NAT_UAC_TEST_LEVEL!3!g"
#!endif
#!trydef RR_FULL_LR 1
#!trydef RR_DOUBLE_RR 1
#!trydef RR_FORCE_SOCKET 1
#################################
## Defs related to SIP_TRACE_ROLE
##


Loading…
Cancel
Save