|
@@ -235,7 +235,7 @@ modparam("ims_registrar_scscf", "subscription_min_expires", 3700)
|
|
modparam("ims_registrar_scscf", "subscription_max_expires", 605800)
|
|
modparam("ims_registrar_scscf", "subscription_max_expires", 605800)
|
|
|
|
|
|
# -- CDP params --
|
|
# -- CDP params --
|
|
-modparam("cdp","config_file","/etc/kamailio_scscf/scscf.xml")
|
|
|
|
|
|
+modparam("cdp", "config_file", "/etc/kamailio_scscf/scscf.xml")
|
|
|
|
|
|
# -- ims_dialog params --
|
|
# -- ims_dialog params --
|
|
modparam("ims_dialog", "dlg_flag", FLT_DIALOG)
|
|
modparam("ims_dialog", "dlg_flag", FLT_DIALOG)
|
|
@@ -275,7 +275,7 @@ modparam("ims_auth", "cxdx_dest_realm", NETWORKNAME)
|
|
modparam("ims_auth", "av_check_only_impu", 1)
|
|
modparam("ims_auth", "av_check_only_impu", 1)
|
|
|
|
|
|
#modparam("ims_auth", "auth_data_timeout", 5)
|
|
#modparam("ims_auth", "auth_data_timeout", 5)
|
|
-modparam("ims_auth","auth_used_vector_timeout", 300)
|
|
|
|
|
|
+modparam("ims_auth", "auth_used_vector_timeout", 300)
|
|
|
|
|
|
# -- ims_registrar_scscf params --
|
|
# -- ims_registrar_scscf params --
|
|
#!ifdef WITH_DEBUG
|
|
#!ifdef WITH_DEBUG
|
|
@@ -289,7 +289,7 @@ modparam("ims_registrar_scscf", "max_expires", 604800)
|
|
#!endif
|
|
#!endif
|
|
modparam("ims_registrar_scscf", "use_path", 1)
|
|
modparam("ims_registrar_scscf", "use_path", 1)
|
|
modparam("ims_registrar_scscf", "support_wildcardPSI",1)
|
|
modparam("ims_registrar_scscf", "support_wildcardPSI",1)
|
|
-modparam("ims_registrar_scscf", "user_data_xsd","/etc/kamailio_scscf/CxDataType_Rel7.xsd")
|
|
|
|
|
|
+modparam("ims_registrar_scscf", "user_data_xsd", "/etc/kamailio_scscf/CxDataType_Rel7.xsd")
|
|
modparam("ims_registrar_scscf", "scscf_name", URI)
|
|
modparam("ims_registrar_scscf", "scscf_name", URI)
|
|
modparam("ims_registrar_scscf", "scscf_name", URI)
|
|
modparam("ims_registrar_scscf", "scscf_name", URI)
|
|
modparam("ims_registrar_scscf", "cxdx_dest_realm", NETWORKNAME)
|
|
modparam("ims_registrar_scscf", "cxdx_dest_realm", NETWORKNAME)
|
|
@@ -330,14 +330,14 @@ modparam("ims_charging", "ro_forced_peer", RO_FORCED_PEER);
|
|
modparam("ims_charging", "destination_host", RO_DESTINATION);
|
|
modparam("ims_charging", "destination_host", RO_DESTINATION);
|
|
modparam("ims_charging", "destination_realm", NETWORKNAME);
|
|
modparam("ims_charging", "destination_realm", NETWORKNAME);
|
|
|
|
|
|
-modparam("ims_charging","service_context_id_root", RO_ROOT);
|
|
|
|
-modparam("ims_charging","service_context_id_ext", RO_EXT);
|
|
|
|
-modparam("ims_charging","service_context_id_mnc", RO_MNC);
|
|
|
|
-modparam("ims_charging","service_context_id_mcc", RO_MCC);
|
|
|
|
-modparam("ims_charging","service_context_id_release", RO_RELEASE);
|
|
|
|
|
|
+modparam("ims_charging", "service_context_id_root", RO_ROOT);
|
|
|
|
+modparam("ims_charging", "service_context_id_ext", RO_EXT);
|
|
|
|
+modparam("ims_charging", "service_context_id_mnc", RO_MNC);
|
|
|
|
+modparam("ims_charging", "service_context_id_mcc", RO_MCC);
|
|
|
|
+modparam("ims_charging", "service_context_id_release", RO_RELEASE);
|
|
|
|
|
|
-modparam("ims_charging","interim_update_credits",30);
|
|
|
|
-modparam("ims_charging","timer_buffer",5);
|
|
|
|
|
|
+modparam("ims_charging", "interim_update_credits",30);
|
|
|
|
+modparam("ims_charging", "timer_buffer",5);
|
|
#!endif
|
|
#!endif
|
|
|
|
|
|
# ----- enum params -----
|
|
# ----- enum params -----
|
|
@@ -438,7 +438,7 @@ route {
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- sl_send_reply("403","Forbidden - Domain not served");
|
|
|
|
|
|
+ sl_send_reply("403", "Forbidden - Domain not served");
|
|
exit();
|
|
exit();
|
|
}
|
|
}
|
|
route(term);
|
|
route(term);
|
|
@@ -448,7 +448,7 @@ route {
|
|
|
|
|
|
route[UNREG_SAR_REPLY]
|
|
route[UNREG_SAR_REPLY]
|
|
{
|
|
{
|
|
- xlog("L_DBG","saa_return code is $avp(s:saa_return_code)\n");
|
|
|
|
|
|
+ xlog("L_DBG", "saa_return code is $avp(s:saa_return_code)\n");
|
|
switch ($avp(s:saa_return_code)){
|
|
switch ($avp(s:saa_return_code)){
|
|
case 1: #success
|
|
case 1: #success
|
|
xlog("L_DBG", "SAR success - will route message\n");
|
|
xlog("L_DBG", "SAR success - will route message\n");
|
|
@@ -487,7 +487,7 @@ route[REQINIT] {
|
|
#!endif
|
|
#!endif
|
|
|
|
|
|
if (!mf_process_maxfwd_header("10")) {
|
|
if (!mf_process_maxfwd_header("10")) {
|
|
- sl_send_reply("483","Too Many Hops");
|
|
|
|
|
|
+ sl_send_reply("483", "Too Many Hops");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -526,7 +526,7 @@ route[PUBLISH]
|
|
{
|
|
{
|
|
if (!t_newtran()) {
|
|
if (!t_newtran()) {
|
|
#absorb retransmissions
|
|
#absorb retransmissions
|
|
- sl_reply("500","Could not create transaction");
|
|
|
|
|
|
+ sl_reply("500", "Could not create transaction");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -538,14 +538,14 @@ route[PUBLISH]
|
|
break;
|
|
break;
|
|
case -1: #failure
|
|
case -1: #failure
|
|
xlog("L_ERR", "Publish reg failure - sending 500 Error now\n");
|
|
xlog("L_ERR", "Publish reg failure - sending 500 Error now\n");
|
|
- t_reply("500","Server Error publishing subscription");
|
|
|
|
|
|
+ t_reply("500", "Server Error publishing subscription");
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
xlog("L_ERR", "Unknown return code from publish reg event alue is [$var(ret)]\n");
|
|
xlog("L_ERR", "Unknown return code from publish reg event alue is [$var(ret)]\n");
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- t_reply("403","Forbidden to PUBLISH");
|
|
|
|
|
|
+ t_reply("403", "Forbidden to PUBLISH");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -557,7 +557,7 @@ route[SUBSCRIBE]
|
|
{
|
|
{
|
|
if (!t_newtran()) {
|
|
if (!t_newtran()) {
|
|
#absorb retransmissions
|
|
#absorb retransmissions
|
|
- sl_reply("500","Could not create transaction");
|
|
|
|
|
|
+ sl_reply("500", "Could not create transaction");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -569,7 +569,7 @@ route[SUBSCRIBE]
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
if (!can_subscribe_to_reg("location")){
|
|
if (!can_subscribe_to_reg("location")){
|
|
- t_reply("403","Forbidden to SUBSCRIBE");
|
|
|
|
|
|
+ t_reply("403", "Forbidden to SUBSCRIBE");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
@@ -583,7 +583,7 @@ route[SUBSCRIBE]
|
|
break;
|
|
break;
|
|
case -1: #failure
|
|
case -1: #failure
|
|
xlog("L_ERR", "Subscribe to reg failure - sending 500 Error now\n");
|
|
xlog("L_ERR", "Subscribe to reg failure - sending 500 Error now\n");
|
|
- t_reply("500","Server Error saving subscription");
|
|
|
|
|
|
+ t_reply("500", "Server Error saving subscription");
|
|
break;
|
|
break;
|
|
case -2: #error
|
|
case -2: #error
|
|
xlog("L_ERR", "Subscribe to reg error sending notify - 200 OK so subscription already sent\n");
|
|
xlog("L_ERR", "Subscribe to reg error sending notify - 200 OK so subscription already sent\n");
|
|
@@ -597,7 +597,7 @@ route[SUBSCRIBE]
|
|
route[SUBSCRIBE_UNREG_SAR_REPLY]
|
|
route[SUBSCRIBE_UNREG_SAR_REPLY]
|
|
{
|
|
{
|
|
|
|
|
|
- xlog("L_DBG","saa_return code is $avp(s:saa_return_code)\n");
|
|
|
|
|
|
+ xlog("L_DBG", "saa_return code is $avp(s:saa_return_code)\n");
|
|
switch ($avp(s:saa_return_code)){
|
|
switch ($avp(s:saa_return_code)){
|
|
case 1: #success
|
|
case 1: #success
|
|
xlog("L_DBG", "SAR success - will process subscribe\n");
|
|
xlog("L_DBG", "SAR success - will process subscribe\n");
|
|
@@ -609,7 +609,7 @@ route[SUBSCRIBE_UNREG_SAR_REPLY]
|
|
break;
|
|
break;
|
|
case -1: #failure
|
|
case -1: #failure
|
|
xlog("L_ERR", "Subscribe to reg failure - sending 500 Error now\n");
|
|
xlog("L_ERR", "Subscribe to reg failure - sending 500 Error now\n");
|
|
- t_reply("500","Server Error saving subscription");
|
|
|
|
|
|
+ t_reply("500", "Server Error saving subscription");
|
|
break;
|
|
break;
|
|
case -2: #error
|
|
case -2: #error
|
|
xlog("L_ERR", "Subscribe to reg error sending notify - 200 OK so subscription already sent\n");
|
|
xlog("L_ERR", "Subscribe to reg error sending notify - 200 OK so subscription already sent\n");
|
|
@@ -619,21 +619,21 @@ route[SUBSCRIBE_UNREG_SAR_REPLY]
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
- t_reply("403","Forbidden to SUBSCRIBE");
|
|
|
|
|
|
+ t_reply("403", "Forbidden to SUBSCRIBE");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case -1: #failure
|
|
case -1: #failure
|
|
xlog("L_ERR", "SAR failure - Sending 403 Forbidden\n");
|
|
xlog("L_ERR", "SAR failure - Sending 403 Forbidden\n");
|
|
- t_reply("403","Forbidden to SUBSCRIBE");
|
|
|
|
|
|
+ t_reply("403", "Forbidden to SUBSCRIBE");
|
|
break;
|
|
break;
|
|
case -2: #error
|
|
case -2: #error
|
|
xlog("L_ERR", "SAR error - Sending 403 Forbidden\n");
|
|
xlog("L_ERR", "SAR error - Sending 403 Forbidden\n");
|
|
- t_reply("403","Forbidden to SUBSCRIBE");
|
|
|
|
|
|
+ t_reply("403", "Forbidden to SUBSCRIBE");
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
xlog("L_ERR", "Unknown return code from SAR, value is [$avp(s:saa_return_code)] - sending 403 Forbidden\n");
|
|
xlog("L_ERR", "Unknown return code from SAR, value is [$avp(s:saa_return_code)] - sending 403 Forbidden\n");
|
|
- t_reply("403","Forbidden to SUBSCRIBE");
|
|
|
|
|
|
+ t_reply("403", "Forbidden to SUBSCRIBE");
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
exit;
|
|
exit;
|
|
@@ -695,7 +695,7 @@ route[REGISTER] {
|
|
exit;
|
|
exit;
|
|
} else {
|
|
} else {
|
|
#user has not been authenticated. Lets send a challenge via 401 Unauthorized
|
|
#user has not been authenticated. Lets send a challenge via 401 Unauthorized
|
|
- xlog("L_DBG","About to challenge! auth_ims\n");
|
|
|
|
|
|
+ xlog("L_DBG", "About to challenge! auth_ims\n");
|
|
ims_www_challenge("REG_MAR_REPLY", "$td", "$var(alg)");
|
|
ims_www_challenge("REG_MAR_REPLY", "$td", "$var(alg)");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
@@ -704,11 +704,11 @@ route[REGISTER] {
|
|
# We need to check if this user is registered or not
|
|
# We need to check if this user is registered or not
|
|
if (!impu_registered("location")) {
|
|
if (!impu_registered("location")) {
|
|
xlog("L_ERR", "Not REGISTERED\n");
|
|
xlog("L_ERR", "Not REGISTERED\n");
|
|
- save("PRE_REG_SAR_REPLY","location");
|
|
|
|
|
|
+ save("PRE_REG_SAR_REPLY", "location");
|
|
exit;
|
|
exit;
|
|
} else {
|
|
} else {
|
|
- isc_match_filter_reg("1","location");
|
|
|
|
- save("REG_SAR_REPLY","location");
|
|
|
|
|
|
+ isc_match_filter_reg("1", "location");
|
|
|
|
+ save("REG_SAR_REPLY", "location");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -717,7 +717,7 @@ route[REGISTER] {
|
|
route[REG_MAR_REPLY]
|
|
route[REG_MAR_REPLY]
|
|
{
|
|
{
|
|
#this is async so to know status we have to check the reply avp
|
|
#this is async so to know status we have to check the reply avp
|
|
- xlog("L_DBG","maa_return code is $avp(s:maa_return_code)\n");
|
|
|
|
|
|
+ xlog("L_DBG", "maa_return code is $avp(s:maa_return_code)\n");
|
|
|
|
|
|
switch ($avp(s:maa_return_code)){
|
|
switch ($avp(s:maa_return_code)){
|
|
case 1: #success
|
|
case 1: #success
|
|
@@ -740,13 +740,13 @@ route[REG_MAR_REPLY]
|
|
|
|
|
|
route[PRE_REG_SAR_REPLY]
|
|
route[PRE_REG_SAR_REPLY]
|
|
{
|
|
{
|
|
- xlog("L_DBG","saa_return code is $avp(s:saa_return_code)\n");
|
|
|
|
|
|
+ xlog("L_DBG", "saa_return code is $avp(s:saa_return_code)\n");
|
|
#this is async so to know status we have to check the reply avp
|
|
#this is async so to know status we have to check the reply avp
|
|
- xlog("L_DBG","saa_return code (for scscf_save on register) is $avp(s:saa_return_code)\n");
|
|
|
|
|
|
+ xlog("L_DBG", "saa_return code (for scscf_save on register) is $avp(s:saa_return_code)\n");
|
|
switch ($avp(s:saa_return_code)){
|
|
switch ($avp(s:saa_return_code)){
|
|
case 1: #success
|
|
case 1: #success
|
|
xlog("L_DBG", "SAR success - 200 response sent from module\n");
|
|
xlog("L_DBG", "SAR success - 200 response sent from module\n");
|
|
- isc_match_filter_reg("0","location");
|
|
|
|
|
|
+ isc_match_filter_reg("0", "location");
|
|
exit;
|
|
exit;
|
|
case -1: #failure
|
|
case -1: #failure
|
|
xlog("L_ERR", "SAR failure - error response sent from module\n");
|
|
xlog("L_ERR", "SAR failure - error response sent from module\n");
|
|
@@ -763,9 +763,9 @@ route[PRE_REG_SAR_REPLY]
|
|
|
|
|
|
route[REG_SAR_REPLY]
|
|
route[REG_SAR_REPLY]
|
|
{
|
|
{
|
|
- xlog("L_DBG","saa_return code is $avp(s:saa_return_code)\n");
|
|
|
|
|
|
+ xlog("L_DBG", "saa_return code is $avp(s:saa_return_code)\n");
|
|
#this is async so to know status we have to check the reply avp
|
|
#this is async so to know status we have to check the reply avp
|
|
- xlog("L_DBG","saa_return code (for scscf_save on register) is $avp(s:saa_return_code)\n");
|
|
|
|
|
|
+ xlog("L_DBG", "saa_return code (for scscf_save on register) is $avp(s:saa_return_code)\n");
|
|
switch ($avp(s:saa_return_code)){
|
|
switch ($avp(s:saa_return_code)){
|
|
case 1: #success
|
|
case 1: #success
|
|
xlog("L_DBG", "SAR success - 200 response sent from module\n");
|
|
xlog("L_DBG", "SAR success - 200 response sent from module\n");
|
|
@@ -803,12 +803,12 @@ route[apply_privacy]
|
|
######################################################################
|
|
######################################################################
|
|
route[orig]
|
|
route[orig]
|
|
{
|
|
{
|
|
- xlog("L_DBG","Enter orig route\n");
|
|
|
|
|
|
+ xlog("L_DBG", "Enter orig route\n");
|
|
set_dlg_profile("orig");
|
|
set_dlg_profile("orig");
|
|
|
|
|
|
# we MAYBE need something like this to check if a user is barred
|
|
# we MAYBE need something like this to check if a user is barred
|
|
# if (S_originating_barred()){
|
|
# if (S_originating_barred()){
|
|
- # sl_send_reply("403","Forbidden - Originating Public Identity barred");
|
|
|
|
|
|
+ # sl_send_reply("403", "Forbidden - Originating Public Identity barred");
|
|
# exit;
|
|
# exit;
|
|
# }
|
|
# }
|
|
|
|
|
|
@@ -835,14 +835,14 @@ route[orig]
|
|
#!ifdef WITH_RO
|
|
#!ifdef WITH_RO
|
|
# before we allow call - lets check credit
|
|
# before we allow call - lets check credit
|
|
if (is_method("INVITE")) {
|
|
if (is_method("INVITE")) {
|
|
- xlog("L_DBG","Sending initial CCR Request for call\n");
|
|
|
|
|
|
+ xlog("L_DBG", "Sending initial CCR Request for call\n");
|
|
$var(cc_ret) = Ro_CCR("CHARGING_CCR_ORIG_REPLY", "orig", 30, "0", "0");
|
|
$var(cc_ret) = Ro_CCR("CHARGING_CCR_ORIG_REPLY", "orig", 30, "0", "0");
|
|
if ($var(cc_ret) < 0) {
|
|
if ($var(cc_ret) < 0) {
|
|
- xlog("L_ERR","CCR Request failure\n");
|
|
|
|
- sl_send_reply("402","Payment required");
|
|
|
|
|
|
+ xlog("L_ERR", "CCR Request failure\n");
|
|
|
|
+ sl_send_reply("402", "Payment required");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
- xlog("L_DBG","CCR Request success\n");
|
|
|
|
|
|
+ xlog("L_DBG", "CCR Request success\n");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
#!endif
|
|
#!endif
|
|
@@ -863,7 +863,7 @@ route[FINAL_ORIG]
|
|
|
|
|
|
route[CHARGING_CCR_ORIG_REPLY]
|
|
route[CHARGING_CCR_ORIG_REPLY]
|
|
{
|
|
{
|
|
- xlog("L_DBG","cca_return code is $avp(s:cca_return_code)\n");
|
|
|
|
|
|
+ xlog("L_DBG", "cca_return code is $avp(s:cca_return_code)\n");
|
|
|
|
|
|
switch ($avp(s:cca_return_code)){
|
|
switch ($avp(s:cca_return_code)){
|
|
case 1: #success
|
|
case 1: #success
|
|
@@ -886,7 +886,7 @@ route[CHARGING_CCR_ORIG_REPLY]
|
|
send_reply("486", "Line limit exceeded");
|
|
send_reply("486", "Line limit exceeded");
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
- send_reply("402","Payment required ($avp(s:cca_result_code))");
|
|
|
|
|
|
+ send_reply("402", "Payment required ($avp(s:cca_result_code))");
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
case -2: #error
|
|
case -2: #error
|
|
@@ -907,7 +907,7 @@ route[CHARGING_CCR_ORIG_REPLY]
|
|
######################################################################
|
|
######################################################################
|
|
onreply_route[orig_reply]
|
|
onreply_route[orig_reply]
|
|
{
|
|
{
|
|
- xlog("L_DBG","Orig reply\n");
|
|
|
|
|
|
+ xlog("L_DBG", "Orig reply\n");
|
|
|
|
|
|
route(apply_privacy);
|
|
route(apply_privacy);
|
|
break;
|
|
break;
|
|
@@ -918,7 +918,7 @@ onreply_route[orig_reply]
|
|
######################################################################
|
|
######################################################################
|
|
route[orig_subsequent]
|
|
route[orig_subsequent]
|
|
{
|
|
{
|
|
- xlog("L_DBG","Orig_Subsequent\n");
|
|
|
|
|
|
+ xlog("L_DBG", "Orig_Subsequent\n");
|
|
|
|
|
|
if (!is_method("ACK")) {
|
|
if (!is_method("ACK")) {
|
|
t_on_reply("orig_subsequent_reply");
|
|
t_on_reply("orig_subsequent_reply");
|
|
@@ -931,7 +931,7 @@ route[orig_subsequent]
|
|
######################################################################
|
|
######################################################################
|
|
onreply_route[orig_subsequent_reply]
|
|
onreply_route[orig_subsequent_reply]
|
|
{
|
|
{
|
|
- xlog("L_DBG","Orig_Subsequent_reply\n");
|
|
|
|
|
|
+ xlog("L_DBG", "Orig_Subsequent_reply\n");
|
|
route(apply_privacy);
|
|
route(apply_privacy);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -941,12 +941,12 @@ onreply_route[orig_subsequent_reply]
|
|
######################################################################
|
|
######################################################################
|
|
failure_route[isc_orig_failure]
|
|
failure_route[isc_orig_failure]
|
|
{
|
|
{
|
|
- xlog("L_DBG","ISC_Orig_failure\n");
|
|
|
|
|
|
+ xlog("L_DBG", "ISC_Orig_failure\n");
|
|
|
|
|
|
if (t_check_status("(408)|(5..)")){
|
|
if (t_check_status("(408)|(5..)")){
|
|
t_on_failure("isc_orig_failure");
|
|
t_on_failure("isc_orig_failure");
|
|
- if (isc_match_filter("orig","location")){
|
|
|
|
- xlog("L_DBG","ISC_Orig_failure - msg was fwded to AS\n");
|
|
|
|
|
|
+ if (isc_match_filter("orig", "location")){
|
|
|
|
+ xlog("L_DBG", "ISC_Orig_failure - msg was fwded to AS\n");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -966,13 +966,13 @@ failure_route[isc_orig_failure]
|
|
######################################################################
|
|
######################################################################
|
|
route[term]
|
|
route[term]
|
|
{
|
|
{
|
|
- xlog("L_DBG","Term\n");
|
|
|
|
|
|
+ xlog("L_DBG", "Term\n");
|
|
|
|
|
|
set_dlg_profile("term");
|
|
set_dlg_profile("term");
|
|
|
|
|
|
#we need something like this to check if a user is barred
|
|
#we need something like this to check if a user is barred
|
|
# if (S_terminating_barred()){
|
|
# if (S_terminating_barred()){
|
|
- # sl_send_reply("404","Not Found - Terminating user barred");
|
|
|
|
|
|
+ # sl_send_reply("404", "Not Found - Terminating user barred");
|
|
# exit;
|
|
# exit;
|
|
# }
|
|
# }
|
|
|
|
|
|
@@ -983,23 +983,23 @@ route[term]
|
|
}
|
|
}
|
|
|
|
|
|
# check if dialog saved as fwded to AS
|
|
# check if dialog saved as fwded to AS
|
|
- if (isc_match_filter("term","location")){
|
|
|
|
|
|
+ if (isc_match_filter("term", "location")){
|
|
t_on_failure("isc_term_failure");
|
|
t_on_failure("isc_term_failure");
|
|
- xlog("L_DBG","Term - msg was fwded to AS\n");
|
|
|
|
|
|
+ xlog("L_DBG", "Term - msg was fwded to AS\n");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
#!ifdef WITH_RO_TERM
|
|
#!ifdef WITH_RO_TERM
|
|
# before we allow call - lets check credit
|
|
# before we allow call - lets check credit
|
|
if (is_method("INVITE")) {
|
|
if (is_method("INVITE")) {
|
|
- xlog("L_DBG","Sending initial CCR Request for call\n");
|
|
|
|
|
|
+ xlog("L_DBG", "Sending initial CCR Request for call\n");
|
|
$var(cc_ret) = Ro_CCR("CHARGING_CCR_TERM_REPLY", "term", 30, "0", "0");
|
|
$var(cc_ret) = Ro_CCR("CHARGING_CCR_TERM_REPLY", "term", 30, "0", "0");
|
|
if ($var(cc_ret) < 0) {
|
|
if ($var(cc_ret) < 0) {
|
|
- xlog("L_ERR","CCR Request failure\n");
|
|
|
|
- sl_send_reply("402","Payment required");
|
|
|
|
|
|
+ xlog("L_ERR", "CCR Request failure\n");
|
|
|
|
+ sl_send_reply("402", "Payment required");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
- xlog("L_DBG","CCR Request success\n");
|
|
|
|
|
|
+ xlog("L_DBG", "CCR Request success\n");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
#!endif
|
|
#!endif
|
|
@@ -1013,7 +1013,7 @@ route[FINAL_TERM] {
|
|
sl_reply_error();
|
|
sl_reply_error();
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
- t_reply("404","Not Found - destination user not found on this S-CSCF");
|
|
|
|
|
|
+ t_reply("404", "Not Found - destination user not found on this S-CSCF");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -1022,7 +1022,7 @@ route[FINAL_TERM] {
|
|
sl_reply_error();
|
|
sl_reply_error();
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
- t_reply("404","Not Found - destination user not found on this S-CSCF");
|
|
|
|
|
|
+ t_reply("404", "Not Found - destination user not found on this S-CSCF");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
route(apply_privacy);
|
|
route(apply_privacy);
|
|
@@ -1033,7 +1033,7 @@ route[FINAL_TERM] {
|
|
|
|
|
|
route[CHARGING_CCR_TERM_REPLY]
|
|
route[CHARGING_CCR_TERM_REPLY]
|
|
{
|
|
{
|
|
- xlog("L_DBG","cca_return code is $avp(s:cca_return_code)\n");
|
|
|
|
|
|
+ xlog("L_DBG", "cca_return code is $avp(s:cca_return_code)\n");
|
|
|
|
|
|
switch ($avp(s:cca_return_code)){
|
|
switch ($avp(s:cca_return_code)){
|
|
case 1: #success
|
|
case 1: #success
|
|
@@ -1056,7 +1056,7 @@ route[CHARGING_CCR_TERM_REPLY]
|
|
send_reply("486", "Line limit exceeded");
|
|
send_reply("486", "Line limit exceeded");
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
- send_reply("402","Payment required ($avp(s:cca_result_code))");
|
|
|
|
|
|
+ send_reply("402", "Payment required ($avp(s:cca_result_code))");
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
case -2: #error
|
|
case -2: #error
|
|
@@ -1077,22 +1077,22 @@ route[CHARGING_CCR_TERM_REPLY]
|
|
######################################################################
|
|
######################################################################
|
|
failure_route[isc_term_failure]
|
|
failure_route[isc_term_failure]
|
|
{
|
|
{
|
|
- xlog("L_DBG","ISC_term_failure\n");
|
|
|
|
|
|
+ xlog("L_DBG", "ISC_term_failure\n");
|
|
|
|
|
|
if (t_check_status("(408)|(5..)")){
|
|
if (t_check_status("(408)|(5..)")){
|
|
t_on_failure("isc_term_failure");
|
|
t_on_failure("isc_term_failure");
|
|
- if (isc_match_filter("term","location")){
|
|
|
|
- xlog("L_DBG","Term - msg was fwded to AS\n");
|
|
|
|
|
|
+ if (isc_match_filter("term", "location")){
|
|
|
|
+ xlog("L_DBG", "Term - msg was fwded to AS\n");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
if (lookup("location")) {
|
|
if (lookup("location")) {
|
|
if (uri==myself) {
|
|
if (uri==myself) {
|
|
- t_reply("404","Not Found - destination user not found on this S-CSCF");
|
|
|
|
|
|
+ t_reply("404", "Not Found - destination user not found on this S-CSCF");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- t_reply("404","Not Found - destination user not found on this S-CSCF");
|
|
|
|
|
|
+ t_reply("404", "Not Found - destination user not found on this S-CSCF");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
t_relay();
|
|
t_relay();
|
|
@@ -1104,7 +1104,7 @@ failure_route[isc_term_failure]
|
|
######################################################################
|
|
######################################################################
|
|
route[term_subsequent]
|
|
route[term_subsequent]
|
|
{
|
|
{
|
|
- xlog("L_DBG","term_subsequent\n");
|
|
|
|
|
|
+ xlog("L_DBG", "term_subsequent\n");
|
|
route(apply_privacy);
|
|
route(apply_privacy);
|
|
t_relay();
|
|
t_relay();
|
|
}
|
|
}
|
|
@@ -1119,7 +1119,7 @@ route[PSTN_handling]
|
|
# $fu: sip:[email protected]
|
|
# $fu: sip:[email protected]
|
|
# becomes $ru: sip:[email protected];user=phone
|
|
# becomes $ru: sip:[email protected];user=phone
|
|
if (!tel2sip("$ru", "$fd", "$ru"))
|
|
if (!tel2sip("$ru", "$fd", "$ru"))
|
|
- xlog("L_WARN","Failed to convert $ru to a sip:-URI - M=$rm R=$ru F=$fu T=$tu IP=$si:$sp ID=$ci\n\n");
|
|
|
|
|
|
+ xlog("L_WARN", "Failed to convert $ru to a sip:-URI - M=$rm R=$ru F=$fu T=$tu IP=$si:$sp ID=$ci\n\n");
|
|
|
|
|
|
if ($rU =~ "\+[0-9]+") {
|
|
if ($rU =~ "\+[0-9]+") {
|
|
# Now let's check, if the number can be found in ENUM:
|
|
# Now let's check, if the number can be found in ENUM:
|
|
@@ -1157,7 +1157,7 @@ route[PSTN]
|
|
|
|
|
|
if ($var(has_trf) == 0) {
|
|
if ($var(has_trf) == 0) {
|
|
if (!ds_select_domain("1", "4")) {
|
|
if (!ds_select_domain("1", "4")) {
|
|
- xlog("L_WARN","No PSTN-Gateways available - M=$rm R=$ru F=$fu T=$tu IP=$si:$sp ID=$ci\n\n");
|
|
|
|
|
|
+ xlog("L_WARN", "No PSTN-Gateways available - M=$rm R=$ru F=$fu T=$tu IP=$si:$sp ID=$ci\n\n");
|
|
send_reply("503", "Service not available");
|
|
send_reply("503", "Service not available");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
@@ -1183,7 +1183,7 @@ failure_route[TRF_failure] {
|
|
if (t_branch_timeout() || t_check_status("[5-6]..")) {
|
|
if (t_branch_timeout() || t_check_status("[5-6]..")) {
|
|
$du = $null;
|
|
$du = $null;
|
|
if (!ds_select_domain("1", "4")) {
|
|
if (!ds_select_domain("1", "4")) {
|
|
- xlog("L_WARN","No PSTN-Gateways available - M=$rm R=$ru F=$fu T=$tu IP=$si:$sp ID=$ci\n\n");
|
|
|
|
|
|
+ xlog("L_WARN", "No PSTN-Gateways available - M=$rm R=$ru F=$fu T=$tu IP=$si:$sp ID=$ci\n\n");
|
|
send_reply("503", "Service not available");
|
|
send_reply("503", "Service not available");
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|