Code cleanup and regression tests ok!
This commit is contained in:
19
kamailio.cfg
19
kamailio.cfg
@@ -19,6 +19,11 @@ loadmodule "sanity"
|
||||
loadmodule "acc.so"
|
||||
loadmodule "dialog.so"
|
||||
|
||||
|
||||
# Lines to configure:
|
||||
# uac reg_contact_addr
|
||||
# 3 avps
|
||||
|
||||
# Global parameters
|
||||
cfgengine "native"
|
||||
fork=yes
|
||||
@@ -133,23 +138,13 @@ route[RELAY] {
|
||||
# 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:" + "10.0.5.4";
|
||||
$du = "sip:" + $avp(customerpbxip);
|
||||
} else {
|
||||
xlog("Incomming call from Customer PBX");
|
||||
# $du = "sip:" + "10.0.5.7";
|
||||
ds_select_dst("1","9");
|
||||
}
|
||||
# if ($siz=="10.0.5.5") {
|
||||
# xlog("Incomming call from SIP provider2");
|
||||
# $du = "sip:" + "10.0.5.4";
|
||||
# }
|
||||
# Start CDR
|
||||
setflag(2);
|
||||
# If auth is required perform it
|
||||
t_on_failure("TRUNKAUTH");
|
||||
# Start CDR
|
||||
setflag(1);
|
||||
# Relay
|
||||
t_relay();
|
||||
exit;
|
||||
@@ -157,17 +152,13 @@ route[RELAY] {
|
||||
|
||||
# TRUNK AUTH ROUTE
|
||||
failure_route[TRUNKAUTH] {
|
||||
xlog("trunk auth");
|
||||
if (t_is_canceled()) {
|
||||
exit;
|
||||
}
|
||||
xlog("Checking status code");
|
||||
if(t_check_status("401|407")) {
|
||||
xlog("status code is valid auth challenge");
|
||||
$avp(auser) = "kam";
|
||||
$avp(apass) = "kam";
|
||||
uac_auth();
|
||||
xlog("after uac_auth");
|
||||
t_relay();
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user