Skip to content

Commit

Permalink
Merge pull request #193 from mwolff44/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mwolff44 committed Apr 18, 2024
2 parents d543cbc + 5110fa8 commit 02ef45c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/pks
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
export PATH+=':/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'

# Variables
VERSION="v4.0.3"
VERSION="v4.0.4"
readonly PKS_GIT_URL="https://raw.githubusercontent.com/mwolff44/pyfreebilling"
readonly DATA_DIR="/srv"
ENV_FILE="/srv/pks/.env"
Expand Down
2 changes: 1 addition & 1 deletion src/sip/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ services:
pks-admin:
container_name: pks-admin
hostname: admin.pks.local
image: mwolff44w/pks-admin:v1.2.1
image: mwolff44w/pks-admin:v1.3.0
restart: unless-stopped
depends_on:
pks-db:
Expand Down
27 changes: 14 additions & 13 deletions src/sip/kamailio.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -715,19 +715,6 @@ route[DISPATCH] {
switch ($var(rule3)) {
case -2:
xinfo("INFO | No internal routing rule found for GW (IP:$si:$sp) associated with '$rU'\n");
$var(rule2) = dp_match("2", "$rU");
switch ($var(rule2)) {
case -2:
xwarn("INFO | No external routing rule found for GW (IP:$si:$sp) associated with '$rU'\n");
$var(rule2) = dp_match("2", "$rU");
return;
case -1:
xerr("ALERT | Error finding external routing rule for GW (IP:$si:$sp) associated with '$rU'\n");
exit;
case 1:
xinfo("INFO | The external routing rule for GW (IP:$si:$sp) associated with '$rU' are '$avp(s:dest)'\n");
return;
}
return;
case -1:
xerr("ALERT | Error finding internal routing rule for GW (IP:$si:$sp) associated with '$rU'\n");
Expand All @@ -736,6 +723,20 @@ route[DISPATCH] {
xinfo("INFO | The internal routing rule for GW (IP:$si:$sp) associated with '$rU' are '$avp(s:dest)'\n");
return;
}
if (!$avp(s:dest)) {
$var(rule2) = dp_match("2", "$rU");
switch ($var(rule2)) {
case -2:
xwarn("INFO | No external routing rule found for GW (IP:$si:$sp) associated with '$rU'\n");
return;
case -1:
xerr("ALERT | Error finding external routing rule for GW (IP:$si:$sp) associated with '$rU'\n");
exit;
case 1:
xinfo("INFO | The external routing rule for GW (IP:$si:$sp) associated with '$rU' are '$avp(s:dest)'\n");
return;
}
}
} else if(isflagset(FLAG_FROM_PROV)) {
$fsn = "private";
$var(rule1) = dp_match("1", "$rU");
Expand Down

0 comments on commit 02ef45c

Please sign in to comment.