Skip to content

Commit f89b21b

Browse files
committed
Docs: Fix various outdated opensips.cfg syntax samples
1 parent a4c8d9d commit f89b21b

File tree

29 files changed

+149
-149
lines changed

29 files changed

+149
-149
lines changed

menuconfig/configs/opensips_residential.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ ifelse(ENABLE_TCP, `yes', ifelse(ENABLE_TLS, `yes', `
428428
',`')
429429

430430
# do lookup with method filtering
431-
if (!lookup("location","m")) {
431+
if (!lookup("location", "method-filtering")) {
432432
ifelse(USE_AUTH,`yes',`if (!db_does_uri_exist("$ru","subscriber")) {
433433
send_reply(420,"Bad Extension");
434434
exit;

modules/acc/doc/acc_admin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ if ($ru=~"sip:+40") /* calls to Romania */ {
117117

118118
if (is_method("INVITE") && $au!=$fU) {
119119
xlog("FROM URI != digest username\n");
120-
sl_send_reply("403","Forbidden");
120+
sl_send_reply(403,"Forbidden");
121121
}
122122

123123
do_accounting("log"); /* set for accounting via syslog */

modules/auth_jwt/doc/auth_jwt_admin.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,12 @@ modparam("auth_jwt", "load_credentials", "$avp(extra_jwt_info)=my_extra_column")
343343
<programlisting format="linespecific">
344344
...
345345
if (!jwt_db_authorize("$avp(my_jwt_token)", $avp(decoded_token), $avp(sip_username) )) {
346-
send_reply("401","Unauthorized");
346+
send_reply(401,"Unauthorized");
347347
exit;
348348
} else {
349349
xlog("Succesful JWT auth - $avp(decoded_token) \n");
350350
if ($fU != $avp(sip_username)) {
351-
send_reply("403","Forbidden AUTH ID");
351+
send_reply(403,"Forbidden AUTH ID");
352352
exit;
353353
}
354354
}
@@ -411,7 +411,7 @@ if (!jwt_db_authorize("$avp(my_jwt_token)", $avp(decoded_token), $avp(sip_userna
411411
<programlisting format="linespecific">
412412
...
413413
if (!jwt_script_authorize("$avp(my_jwt_token)",$avp(pub_key), $avp(decoded_token))) {
414-
send_reply("401","Unauthorized");
414+
send_reply(401,"Unauthorized");
415415
exit;
416416
} else {
417417
xlog("Succesful JWT auth - $avp(decoded_token) \n");

modules/carrierroute/doc/carrierroute_admin.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ route {
13221322
# choose route domain 0 of the default carrier
13231323

13241324
if(!cr_route("default", "0", "$rU", "$rU", "call_id", "crc32")){
1325-
sl_send_reply("403", "Not allowed");
1325+
sl_send_reply(403, "Not allowed");
13261326
} else {
13271327
# In case of failure, re-route the request
13281328
t_on_failure("1");
@@ -1336,7 +1336,7 @@ failure_route[1] {
13361336
if (t_check_status("408|5[0-9][0-9]")) {
13371337
#choose route domain 1 of the default carrier
13381338
if(!cr_route("default", "1", "$rU", "$rU", "call_id", "crc32")){
1339-
t_reply("403", "Not allowed");
1339+
t_reply(403, "Not allowed");
13401340
} else {
13411341
t_on_failure("2");
13421342
t_relay();

modules/cgrates/doc/cgrates_admin.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<programlisting format="linespecific">
9090
...
9191
if (!cgrates_auth("$fU", "$rU")) {
92-
sl_send_reply("403", "Forbidden");
92+
sl_send_reply(403, "Forbidden");
9393
exit;
9494
}
9595
xlog("Call is allowed to run $cgr_ret seconds\n");
@@ -662,7 +662,7 @@ modparam("cgrates", "compat_mode", 1)
662662
$cgr(RequestType) = "*prepaid"; # do prepaid accounting
663663
$cgr(AttributeIDs) := '["+5551234"]'; # treat as array
664664
if (!cgrates_auth("$fU", "$rU")) {
665-
sl_send_reply("403", "Forbidden");
665+
sl_send_reply(403, "Forbidden");
666666
exit;
667667
}
668668
}
@@ -679,7 +679,7 @@ modparam("cgrates", "compat_mode", 1)
679679
$cgr_opt(Tenant) = $fd; # set the From domain as a tenant
680680
$cgr(RequestType) = "*prepaid"; # do prepaid accounting
681681
if (!cgrates_auth("$fU", "$rU")) {
682-
sl_send_reply("403", "Forbidden");
682+
sl_send_reply(403, "Forbidden");
683683
exit;
684684
}
685685

@@ -848,7 +848,7 @@ route [auth_reply]
848848
{
849849
if ($rc &lt; 0) {
850850
xlog("Call not authorized: code=$cgr_ret!\n");
851-
send_reply("403", "Forbidden");
851+
send_reply(403, "Forbidden");
852852
exit;
853853
}
854854
...
@@ -923,7 +923,7 @@ route [auth_reply]
923923
{
924924
if ($rc &lt; 0) {
925925
xlog("Call not authorized: code=$cgr_ret!\n");
926-
send_reply("403", "Forbidden");
926+
send_reply(403, "Forbidden");
927927
exit;
928928
}
929929
...
@@ -948,7 +948,7 @@ route [auth_reply]
948948
{
949949
if ($rc &lt; 0) {
950950
xlog("Call not authorized: MaxUsage=$cgr_ret(MaxUsage)!\n");
951-
send_reply("403", "Forbidden");
951+
send_reply(403, "Forbidden");
952952
exit;
953953
}
954954
...

modules/db_text/doc/db_text.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ route{
5858
# initial sanity checks -- messages with
5959
# max_forwards==0, or excessively long requests
6060
if (!mf_process_maxfwd_header("10")) {
61-
sl_send_reply("483","Too Many Hops");
61+
sl_send_reply(483,"Too Many Hops");
6262
exit;
6363
};
6464
if ($ml >= 65535 ) {
65-
sl_send_reply("513", "Message too big");
65+
sl_send_reply(513, "Message too big");
6666
exit;
6767
};
6868

@@ -112,7 +112,7 @@ route{
112112

113113
# native SIP destinations are handled using our USRLOC DB
114114
if (!lookup("location")) {
115-
sl_send_reply("404", "Not Found");
115+
sl_send_reply(404, "Not Found");
116116
exit;
117117
};
118118
};

modules/domainpolicy/doc/domainpolicy_admin.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,11 @@ dp_can_connect();
328328
switch(retcode) {
329329
case -2:
330330
xlog("L_INFO","Errors during the DP evaluation\n");
331-
sl_send_reply("404", "We can't connect you.");
331+
sl_send_reply(404, "We can't connect you.");
332332
break;
333333
case -1:
334334
xlog("L_INFO","We can't connect to that domain\n");
335-
sl_send_reply("404", "We can't connect you.");
335+
sl_send_reply(404, "We can't connect you.");
336336
break;
337337
case 1:
338338
xlog("L_INFO","We found matching policy records\n");

modules/emergency/doc/emergency_admin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ modparam("emergency","emergency_call_server",“124.78.29.123:5060”)
397397

398398
if (failure()) {
399399
        if (!t_relay()) {
400-
           send_reply("500","Internal Error");
400+
           send_reply(500,"Internal Error");
401401
        };
402402
        exit;
403403
}

modules/event_rabbitmq/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ i]");
322322
n");
323323
}
324324

325-
if (!lookup("location","m")) {
325+
if (!lookup("location", "method-filtering")) {
326326
switch ($retcode) {
327327
case -1:
328328
case -3:

modules/event_rabbitmq/doc/event_rabbitmq.cfg

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ startup_route {
1818

1919
route{
2020

21-
if (!mf_process_maxfwd_header("10")) {
22-
sl_send_reply("483","Too Many Hops");
21+
if (!mf_process_maxfwd_header(10)) {
22+
sl_send_reply(483,"Too Many Hops");
2323
exit;
2424
}
2525

@@ -38,7 +38,7 @@ route{
3838
exit;
3939
}
4040
}
41-
sl_send_reply("404","Not here");
41+
sl_send_reply(404,"Not here");
4242
}
4343
exit;
4444
}
@@ -56,7 +56,7 @@ route{
5656
xlog("L_ERR",
5757
"Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]");
5858
if (!is_method("ACK"))
59-
sl_send_reply("403","Preload Route denied");
59+
sl_send_reply(403,"Preload Route denied");
6060
exit;
6161
}
6262

@@ -71,7 +71,7 @@ route{
7171

7272
if (is_method("PUBLISH"))
7373
{
74-
sl_send_reply("503", "Service Unavailable");
74+
sl_send_reply(503, "Service Unavailable");
7575
exit;
7676
}
7777

@@ -85,7 +85,7 @@ route{
8585
}
8686

8787
if ($rU==NULL) {
88-
sl_send_reply("484","Address Incomplete");
88+
sl_send_reply(484,"Address Incomplete");
8989
exit;
9090
}
9191

@@ -98,15 +98,15 @@ route{
9898
xlog("L_ERR", "cannot raise E_SIP_MESSAGE event\n");
9999
}
100100

101-
if (!lookup("location","m")) {
101+
if (!lookup("location", "method-filtering")) {
102102
switch ($retcode) {
103103
case -1:
104104
case -3:
105105
t_newtran();
106-
t_reply("404", "Not Found");
106+
t_reply(404, "Not Found");
107107
exit;
108108
case -2:
109-
sl_send_reply("405", "Method Not Allowed");
109+
sl_send_reply(405, "Method Not Allowed");
110110
exit;
111111
}
112112
}

0 commit comments

Comments
 (0)