Update opensips tutorial configurations

For both tutorials and tutorial_tests
This commit is contained in:
ionutboangiu
2024-05-15 20:40:19 +03:00
committed by Dan Christian Bogos
parent 8bf2ae0d38
commit 37b0a154a4
4 changed files with 21 additions and 17 deletions

View File

@@ -58,6 +58,7 @@
"thresholds_conns": ["*internal"],
"debit_interval": "5s",
"channel_sync_interval":"7s",
"client_protocol": 1.0
},

View File

@@ -16,17 +16,18 @@
####### Global Parameters #########
log_level=3
log_stderror=no
log_facility=LOG_LOCAL0
stderror_enabled=no
syslog_enabled=yes
syslog_facility=LOG_LOCAL0
udp_workers=4
auto_aliases=no
listen=udp:enp0s3:5060
listen=udp:127.0.0.1:5080
listen=udp:127.0.0.1:5060
listen=udp:enp0s3:5080
socket=udp:enp0s3:5060
socket=udp:127.0.0.1:5080
socket=udp:127.0.0.1:5060
socket=udp:enp0s3:5080
@@ -138,12 +139,12 @@ route{
t_check_trans();
if ( !(is_method("REGISTER") ) ) {
if (is_myself("$fd")) {
} else {
# if caller is not local, then called number must be local
if (!is_myself("$rd")) {
send_reply(403,"Relay Forbidden");
exit;
@@ -167,19 +168,19 @@ route{
if (!is_myself("$rd")) {
append_hf("P-hint: outbound\r\n");
route(relay);
}
# requests for my domain
if (is_method("PUBLISH|SUBSCRIBE")) {
send_reply(503, "Service Unavailable");
exit;
}
if (is_method("REGISTER")) {
if (!save("location"))
sl_reply_error();
@@ -193,7 +194,7 @@ route{
}
# do lookup with method filtering
if (!lookup("location","m")) {
if (!lookup("location","method-filtering")) {
t_reply(404, "Not Found");
exit;
}
@@ -210,7 +211,7 @@ route{
$cgr(RequestType) = "*prepaid";
$cgr(OriginHost) = "127.0.0.1";
$cgr(Source) = "OpenSIPS";
if (!async(cgrates_auth("$fU", "$rU"), resume_cgr_auth)) {
sl_send_reply(503, "Service Unavailable");
exit;
@@ -219,7 +220,7 @@ route{
route [resume_cgr_auth] {
if ($rc != 1) {
xlog("Call not authorized: code=$cgrret!\n");
xlog("Call not authorized: code=$cgr_ret!\n");
send_reply(403, "Forbidden");
exit;
}