fixed no auth probing, cdrs still problem
This commit is contained in:
26
kamailio.cfg
26
kamailio.cfg
@@ -29,17 +29,19 @@ cfgengine "native"
|
||||
fork=yes
|
||||
children=4
|
||||
log_facility=LOG_LOCAL0
|
||||
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", "ds_ping_interval", 10)
|
||||
#modparam("dispatcher", "ds_ping_method", "REGISTER")
|
||||
#modparam("dispatcher", "ds_probing_threshold", 10)
|
||||
#modparam("dispatcher", "ds_inactive_threshold", 10)
|
||||
#modparam("dispatcher", "ds_ping_latency_stats", 1)
|
||||
#modparam("dispatcher", "ds_ping_from", "sip:kam@10.0.5.6")
|
||||
#modparam("dispatcher", "ds_probing_mode", 1) #Keeps pinging gateways when state is known (to detect change in state)
|
||||
modparam("dispatcher", "ds_ping_interval", 3)
|
||||
modparam("dispatcher", "ds_ping_method", "OPTIONS")
|
||||
modparam("dispatcher", "ds_probing_threshold", 2)
|
||||
modparam("dispatcher", "ds_inactive_threshold", 3)
|
||||
modparam("dispatcher", "ds_ping_latency_stats", 1)
|
||||
modparam("dispatcher", "ds_ping_reply_codes", "class=2;code=404;code=401")
|
||||
modparam("dispatcher", "ds_ping_from", "sip:kam@10.0.5.6")
|
||||
modparam("dispatcher", "ds_probing_mode", 1) #Keeps pinging gateways when state is known (to detect change in state)
|
||||
# KAMCTL config
|
||||
modparam("ctl", "binrpc", "/var/run/kamailio/kamailio_ctl")
|
||||
# UAC settings
|
||||
@@ -57,7 +59,7 @@ modparam("tm", "auto_inv_100_reason", "Trying")
|
||||
#!define FLT_ACCMISSED 6
|
||||
#!define FLT_ACCFAILED 7
|
||||
#!define FLT_ACCDB 7
|
||||
modparam("dialog", "dlg_flag", FLD_DLG)
|
||||
#modparam("dialog", "dlg_flag", FLD_DLG)
|
||||
|
||||
modparam("acc", "db_url", "flatstore:/var/log/cdrs")
|
||||
modparam("acc", "early_media", 0)
|
||||
@@ -66,18 +68,22 @@ modparam("acc", "report_cancels", 0)
|
||||
modparam("acc", "detect_direction", 0)
|
||||
modparam("acc", "db_flag", FLT_ACCDB)
|
||||
modparam("acc", "log_flag", FLT_ACC)
|
||||
modparam("acc", "log_level", 3)
|
||||
modparam("acc", "log_missed_flag", FLT_ACCMISSED)
|
||||
modparam("acc","cdr_extra","src_user=$fU;src_domain=$fd;src_ip=$si;dst_user=$rU;dst_ouser=$tU;dst_domain=$rd;sip_code=$rs;sip_reason=$rr;callid=$dlg(callid);dst_ip=$Ri")
|
||||
modparam("acc","log_extra","src_user=$fU;src_domain=$fd;src_ip=$si;dst_user=$rU;dst_ouser=$tU;dst_domain=$rd;sip_code=$rs;sip_reason=$rr;callid=$dlg(callid);dst_ip=$Ri")
|
||||
modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
|
||||
modparam("acc", "cdr_enable", 1)
|
||||
modparam("acc", "cdr_log_enable", 0)
|
||||
modparam("acc", "cdr_log_enable", 1)
|
||||
modparam("acc", "cdr_start_on_confirmed", 1)
|
||||
modparam("acc", "log_facility", "LOG_LOCAL0")
|
||||
modparam("acc", "cdr_facility", "LOG_LOCAL0")
|
||||
|
||||
/* Main SIP request routing logic
|
||||
* - processing of any incoming SIP request starts with this route
|
||||
* - note: this is the same as route { ... } */
|
||||
request_route {
|
||||
dlg_manage();
|
||||
# Variables
|
||||
$avp(customerpbxip)="10.0.5.4";
|
||||
$avp(sip1)="10.0.5.7";
|
||||
@@ -147,10 +153,8 @@ route[RELAY] {
|
||||
setflag(FLT_ACCDB);
|
||||
# update $du to set the destination address for proxying based on caller IP
|
||||
if ($siz==$avp(sip1) || $siz==$avp(sip2)) {
|
||||
xlog("Incomming call from SIP provider");
|
||||
$du = "sip:" + $avp(customerpbxip);
|
||||
} else {
|
||||
xlog("Incomming call from Customer PBX");
|
||||
ds_select_dst("1","9");
|
||||
}
|
||||
# If auth is required perform it
|
||||
|
||||
Reference in New Issue
Block a user