Skip to content

Commit

Permalink
misc/examples: add a space between comma and quote
Browse files Browse the repository at this point in the history
  • Loading branch information
dilyanpalauzov authored and henningw committed Dec 10, 2022
1 parent 4397e6b commit ab9bfb5
Show file tree
Hide file tree
Showing 58 changed files with 281 additions and 281 deletions.
32 changes: 16 additions & 16 deletions misc/examples/ims/icscf/kamailio.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ modparam("jsonrpcs", "pretty_format", 1)
modparam("rr", "enable_full_lr", 1)

# -- cdp params --
modparam("cdp","config_file","/etc/kamailio_icscf/icscf.xml")
modparam("cdp", "config_file", "/etc/kamailio_icscf/icscf.xml")

# ----- icscf params -----
# Comment the following line to enable realm routing
#!ifdef CXDX_FORCED_PEER
modparam("ims_icscf", "cxdx_forced_peer", CXDX_FORCED_PEER)
#!endif
modparam("ims_icscf","cxdx_dest_realm", NETWORKNAME)
modparam("ims_icscf", "cxdx_dest_realm", NETWORKNAME)

# DB-URL, where information about S-CSCF-Server can be found:
#!ifdef DB_URL2
Expand All @@ -173,11 +173,11 @@ modparam("ims_icscf", "db_url", DB_URL)

#!ifdef PEERING
# Route which is executed, in case HSS returned "User-Unknown" on LIR request
modparam("ims_icscf","route_lir_user_unknown", "lir_term_user_unknown")
modparam("ims_icscf", "route_lir_user_unknown", "lir_term_user_unknown")
#!endif
#!ifdef FALLBACK_AUTH
# Route which is executed, in case HSS returned "User-Unknown" on UAR request
modparam("ims_icscf","route_uar_user_unknown", "uar_term_user_unknown")
modparam("ims_icscf", "route_uar_user_unknown", "uar_term_user_unknown")
#!endif

#!ifdef WITH_TLS
Expand Down Expand Up @@ -255,7 +255,7 @@ route{
# Shouldn't get here unless missconfigured (add more methods as initial) or
# somebody is routing unknown messages
append_to_reply("Allow: INVITE,SUBSCRIBE,MESSAGE,INFO,PUBLISH,CANCEL\r\n");
send_reply("406","Initial Request Method not allowed at the I-CSCF");
send_reply("406", "Initial Request Method not allowed at the I-CSCF");
break;
}
}
Expand All @@ -279,7 +279,7 @@ route[REQINIT] {
setflag(FLT_CAPTURE);
#!endif
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
sl_send_reply("483", "Too Many Hops");
exit;
}
if(!sanity_check("1511", "7")) {
Expand Down Expand Up @@ -351,15 +351,15 @@ route[register]
t_on_reply("register_reply");
t_on_failure("register_failure");
if (!t_relay()) {
send_reply("500","Error forwarding towards S-CSCF");
send_reply("500", "Error forwarding towards S-CSCF");
}
} else {
#no S-CSCF list therefore must do UAR
#free this from the failed I_scscf_select call
I_scscf_drop();
# Do an asynchronous UAR:
#0=REG/DEREG; 1=REG+Capabilities
if (!I_perform_user_authorization_request("REG_UAR_REPLY","0")) {
if (!I_perform_user_authorization_request("REG_UAR_REPLY", "0")) {
send_reply("500", "Error in Request");
}
}
Expand Down Expand Up @@ -426,7 +426,7 @@ failure_route[register_failure]
t_on_reply("register_reply");
t_on_failure("register_failure");
if (!t_relay()) {
t_reply("500","Error forwarding towards next S-CSCF");
t_reply("500", "Error forwarding towards next S-CSCF");
break;
}
break;
Expand Down Expand Up @@ -461,7 +461,7 @@ route[LIR_REPLY] {
t_on_reply("initial_request_reply");
t_on_failure("initial_request_failure");
if (!t_relay()) {
t_reply("500","Error forwarding towards S-CSCF");
t_reply("500", "Error forwarding towards S-CSCF");
break;
}
break;
Expand Down Expand Up @@ -503,7 +503,7 @@ failure_route[initial_request_failure]
t_on_reply("initial_request_reply");
t_on_failure("initial_request_failure");
if (!t_relay()) {
t_reply("500","Error forwarding towards next S-CSCF");
t_reply("500", "Error forwarding towards next S-CSCF");
break;
}
break;
Expand Down Expand Up @@ -537,25 +537,25 @@ route[lir_term_user_unknown]
t_on_reply("initial_request_reply");
t_on_failure("initial_request_failure");
if (!t_relay()) {
t_reply("500","Error forwarding to external domain");
t_reply("500", "Error forwarding to external domain");
exit;
};
exit;
} else {
t_reply("604","Does not exist anywhere - HSS User Unknown");
t_reply("604", "Does not exist anywhere - HSS User Unknown");
exit;
};
} else {
# we received a request for our domain (non-tel), but HSS said "User Unknown"
if ($rd != NETWORKNAME) {
t_reply("604","Does not exist anywhere - HSS User Unknown");
t_reply("604", "Does not exist anywhere - HSS User Unknown");
exit;
} else {
# try to forward non-tel request to other domain
t_on_reply("Initial_Request_reply");
t_on_failure("Initial_Request_failure");
if (!t_relay()) {
t_reply("500","Error forwarding to external domain");
t_reply("500", "Error forwarding to external domain");
exit;
};
exit;
Expand Down Expand Up @@ -621,7 +621,7 @@ route[uar_term_user_unknown]
t_on_reply("register_reply");
t_on_failure("register_failure");
if (!t_relay()) {
t_reply("500","Error forwarding towards S-CSCF");
t_reply("500", "Error forwarding towards S-CSCF");
break;
}
break;
Expand Down
26 changes: 13 additions & 13 deletions misc/examples/ims/pcscf/kamailio.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,12 @@ modparam("htable", "htable", "a=>size=8;autoexpire=20")
modparam("htable", "htable", "natping=>size=8;autoexpire=600000;")
modparam("htable", "htable", "natpingfail=>size=8;autoexpire=600000;")
#!ifdef DB_URL2
modparam("sqlops","sqlcon","pcscf=>cluster://cluster1")
modparam("sqlops", "sqlcon", "pcscf=>cluster://cluster1")
#!else
modparam("sqlops","sqlcon", SQLOPS_DBURL)
modparam("sqlops", "sqlcon", SQLOPS_DBURL)
#!endif

modparam("uac","restore_mode","none")
modparam("uac", "restore_mode", "none")

# ----------------- Settings for RTimer ---------------
# time interval set to 10 seconds
Expand Down Expand Up @@ -379,7 +379,7 @@ modparam("ims_ipsec_pcscf", "ipsec_server_port", IPSEC_SERVER_PORT)

#!ifdef WITH_RX
# -- CDP params --
modparam("cdp","config_file","/etc/kamailio_pcscf/pcscf.xml")
modparam("cdp", "config_file", "/etc/kamailio_pcscf/pcscf.xml")
# -- diameter_rx params --
modparam("ims_qos", "rx_dest_realm", "NETWORKNAME")
#!endif
Expand Down Expand Up @@ -474,11 +474,11 @@ route {
t_check_trans();

if (is_method("UPDATE")) {
send_reply("403","Forbidden - Target refresh outside dialog not allowed");
send_reply("403", "Forbidden - Target refresh outside dialog not allowed");
break;
}
if (is_method("BYE|PRACK")) {
send_reply("403","Forbidden - Originating subsequent requests outside dialog not allowed");
send_reply("403", "Forbidden - Originating subsequent requests outside dialog not allowed");
break;
}

Expand Down Expand Up @@ -682,22 +682,22 @@ route[REQINIT] {
exit;
}
if (!pike_check_req()) {
xlog("L_ALERT","ALERT: pike blocking $rm from $fu (IP:$si:$sp, $ua)\n");
xlog("L_ALERT", "ALERT: pike blocking $rm from $fu (IP:$si:$sp, $ua)\n");
xlog("Blocking traffic from $si\n");
$sht(ipban=>$si) = 1;
exit;
}
}
if ((uri == myself) && is_method("INVITE|REGISTER")) {
xlog("L_ALERT","ALERT: Request to myself: $ru from $fu (IP:$si:$sp, $ua), Blocking\n");
xlog("L_ALERT", "ALERT: Request to myself: $ru from $fu (IP:$si:$sp, $ua), Blocking\n");
xlog("Blocking traffic from $si\n");
$sht(ipban=>$si) = 1;
exit;
}
#!endif

if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
sl_send_reply("483", "Too Many Hops");
exit;
}

Expand Down Expand Up @@ -771,7 +771,7 @@ route[WITHINDLG] {
exit;
}
}
sl_send_reply("404","Not here");
sl_send_reply("404", "Not here");
}
exit;
}
Expand All @@ -789,7 +789,7 @@ failure_route[SBC_failure] {
else
$sht(failedauth=>$si) = 1;
if ($sht(failedauth=>$si) > 10) {
xlog("L_ALERT","ALERT: blocking $rm from $fu (IP:$si:$sp), more than 5 failed auth requests!\n");
xlog("L_ALERT", "ALERT: blocking $rm from $fu (IP:$si:$sp), more than 5 failed auth requests!\n");
xlog("Blocking traffic from $si\n");
$sht(ipban=>$si) = 1;
}
Expand Down Expand Up @@ -819,10 +819,10 @@ route[NOTIFY]
{
xlog("L_DBG", "IMS: INSIDE NOTIFY\n");
if (reginfo_handle_notify("location")) {
send_reply("200","OK - P-CSCF processed notification");
send_reply("200", "OK - P-CSCF processed notification");
break;
} else {
t_reply("500","Error encountered while processing notification");
t_reply("500", "Error encountered while processing notification");
break;
}
}
Expand Down
18 changes: 9 additions & 9 deletions misc/examples/ims/pcscf/route/mo.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ route[MO]
# Process route headers, if any:
loose_route();
if (!pcscf_is_registered("location")) {
send_reply("403","Forbidden - You must register first with a S-CSCF");
send_reply("403", "Forbidden - You must register first with a S-CSCF");
exit;
}

Expand All @@ -32,7 +32,7 @@ route[MO]

if (!pcscf_follows_service_routes("location")){
#Variant 1 - deny access to the network
#send_reply("400","Bad Request - Not following indicated service routes");
#send_reply("400", "Bad Request - Not following indicated service routes");
#break;

#Variant 2 - enforce routes and let the dialog continue
Expand Down Expand Up @@ -110,12 +110,12 @@ onreply_route[MO_reply] {
drop();
}

xlog("L_DBG","Diameter: Orig authorizing media via Rx\n");
xlog("L_DBG", "Diameter: Orig authorizing media via Rx\n");
$avp(FTAG_CUSTOM_AVP)=$ft;
$avp(TTAG_CUSTOM_AVP)=$tt;
$avp(CALLID_CUSTOM_AVP)=$ci;

$var(aarret) = Rx_AAR("MO_aar_reply","orig","",-1);
$var(aarret) = Rx_AAR("MO_aar_reply", "orig", "", -1);
xlog("L_DBG", "AAR return code is $var(aarret)\n");

switch ($var(aarret)) {
Expand Down Expand Up @@ -145,15 +145,15 @@ route[MO_aar_reply]
#this is async so to know status we have to check the reply avp
switch ($avp(s:aar_return_code)) {
case 1:
xlog("L_DBG", "Diameter: Orig AAR success on media authorization\n");
xlog("L_DBG", "Diameter: Orig AAR success on media authorization\n");
break;
default:
xlog("L_ERR", "IMS: AAR failed Orig\n");
xlog("L_ERR", "IMS: ttag: "+ "$avp(TTAG_CUSTOM_AVP)");
xlog("L_ERR", "IMS: ftag: "+ "$avp(FTAG_CUSTOM_AVP)");
xlog("L_ERR", "IMS: callid: "+ "$avp(CALLID_CUSTOM_AVP)");
#comment this if you want to allow even if Rx fails
if(dlg_get("$avp(CALLID_CUSTOM_AVP)","$avp(FTAG_CUSTOM_AVP)","$avp(TTAG_CUSTOM_AVP)")){
if(dlg_get("$avp(CALLID_CUSTOM_AVP)", "$avp(FTAG_CUSTOM_AVP)", "$avp(TTAG_CUSTOM_AVP)")){
dlg_terminate("all", "Sorry no QoS available");
exit;
}
Expand Down Expand Up @@ -183,12 +183,12 @@ onreply_route[MO_indialog_reply] {
}

xlog("L_DBG", "IMS: ORIG_SUBSEQUENT reply. This is a 200 OK to a re-INVITE\n");
xlog("L_DBG","Diameter: Orig authorizing media via Rx\n");
xlog("L_DBG", "Diameter: Orig authorizing media via Rx\n");
$avp(FTAG_CUSTOM_AVP)=$ft;
$avp(TTAG_CUSTOM_AVP)=$tt;
$avp(CALLID_CUSTOM_AVP)=$ci;

$var(aarret) = Rx_AAR("MO_indialog_aar_reply","orig","",-1);
$var(aarret) = Rx_AAR("MO_indialog_aar_reply", "orig", "", -1);
xlog("L_DBG", "AAR return code is $var(aarret)\n");

switch ($var(aarret)) {
Expand Down Expand Up @@ -226,7 +226,7 @@ route[MO_indialog_aar_reply]
xlog("L_ERR", "IMS: ftag: "+ "$avp(FTAG_CUSTOM_AVP)");
xlog("L_ERR", "IMS: callid: "+ "$avp(CALLID_CUSTOM_AVP)");
#comment this if you want to allow even if Rx fails
if(dlg_get("$avp(CALLID_CUSTOM_AVP)","$avp(FTAG_CUSTOM_AVP)","$avp(TTAG_CUSTOM_AVP)")){
if(dlg_get("$avp(CALLID_CUSTOM_AVP)", "$avp(FTAG_CUSTOM_AVP)", "$avp(TTAG_CUSTOM_AVP)")){
dlg_terminate("all", "Sorry no QoS available");
exit;
}
Expand Down
12 changes: 6 additions & 6 deletions misc/examples/ims/pcscf/route/mt.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ onreply_route[MT_reply] {
drop();
}

xlog("L_DBG","Diameter: Term authorizing media via Rx\n");
xlog("L_DBG", "Diameter: Term authorizing media via Rx\n");
$avp(FTAG_CUSTOM_AVP)=$ft;
$avp(TTAG_CUSTOM_AVP)=$tt;
$avp(CALLID_CUSTOM_AVP)=$ci;

$var(aarret) = Rx_AAR("MT_aar_reply","term","",-1);
$var(aarret) = Rx_AAR("MT_aar_reply", "term", "", -1);
xlog("L_DBG", "AAR return code is $var(aarret)\n");

switch ($var(aarret)) {
Expand Down Expand Up @@ -70,7 +70,7 @@ route[MT_aar_reply]
xlog("L_ERR", "IMS: ftag: "+ "$avp(FTAG_CUSTOM_AVP)");
xlog("L_ERR", "IMS: callid: "+ "$avp(CALLID_CUSTOM_AVP)");
#comment this if you want to allow even if Rx fails
if(dlg_get("$avp(CALLID_CUSTOM_AVP)","$avp(FTAG_CUSTOM_AVP)","$avp(TTAG_CUSTOM_AVP)")){
if(dlg_get("$avp(CALLID_CUSTOM_AVP)", "$avp(FTAG_CUSTOM_AVP)", "$avp(TTAG_CUSTOM_AVP)")){
dlg_terminate("all", "Sorry no QoS available");
exit;
}
Expand Down Expand Up @@ -99,12 +99,12 @@ onreply_route[MT_indialog_reply] {
}

xlog("L_DBG", "IMS: TERM_SUBSEQUENT reply. This is a 200 OK to a re-INVITE\n");
xlog("L_DBG","Diameter: Term authorizing media via Rx\n");
xlog("L_DBG", "Diameter: Term authorizing media via Rx\n");
$avp(FTAG_CUSTOM_AVP)=$ft;
$avp(TTAG_CUSTOM_AVP)=$tt;
$avp(CALLID_CUSTOM_AVP)=$ci;

$var(aarret) = Rx_AAR("MT_indialog_aar_reply","term","",-1);
$var(aarret) = Rx_AAR("MT_indialog_aar_reply", "term", "", -1);
xlog("L_DBG", "AAR return code is $var(aarret)\n");

switch ($var(aarret)) {
Expand Down Expand Up @@ -142,7 +142,7 @@ route[MT_indialog_aar_reply]
xlog("L_ERR", "IMS: ftag: "+ "$avp(FTAG_CUSTOM_AVP)");
xlog("L_ERR", "IMS: callid: "+ "$avp(CALLID_CUSTOM_AVP)");
#comment this if you want to allow even if Rx fails
if(dlg_get("$avp(CALLID_CUSTOM_AVP)","$avp(FTAG_CUSTOM_AVP)","$avp(TTAG_CUSTOM_AVP)")){
if(dlg_get("$avp(CALLID_CUSTOM_AVP)", "$avp(FTAG_CUSTOM_AVP)", "$avp(TTAG_CUSTOM_AVP)")){
dlg_terminate("all", "Sorry no QoS available");
exit;
}
Expand Down
6 changes: 3 additions & 3 deletions misc/examples/ims/pcscf/route/register.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ route[REGISTER] {
$ru = "sip:"+$rU+"@"+$rd;

#!ifdef WITH_RX
xlog("L_DBG","Subscribing to signalling bearer status\n");
xlog("L_DBG", "Subscribing to signalling bearer status\n");

Rx_AAR_Register("REG_AAR_REPLY", "location");
switch ($retcode) {
Expand Down Expand Up @@ -187,15 +187,15 @@ failure_route[REGISTER_failure]
else
$sht(failedauth=>$si) = 1;
if ($sht(failedauth=>$si) > 10) {
xlog("L_ALERT","ALERT: blocking $rm from $fu (IP:$si:$sp), more than 5 failed auth requests!\n");
xlog("L_ALERT", "ALERT: blocking $rm from $fu (IP:$si:$sp), more than 5 failed auth requests!\n");
xlog("Blocking traffic from $si\n");
$sht(ipban=>$si) = 1;
}
update_stat("register_failed", "+1");
}
#!endif
if (t_check_status("408")) {
send_reply("504","Server Time-Out");
send_reply("504", "Server Time-Out");
update_stat("register_failed", "+1");
exit;
}
Expand Down

0 comments on commit ab9bfb5

Please sign in to comment.