Module: kamailio
Branch: master
Commit: b4ad3105e11559bfe502523f60b085ea720a06a5
URL:
https://github.com/kamailio/kamailio/commit/b4ad3105e11559bfe502523f60b085e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-05-03T09:50:57+02:00
kamailio.cfg: small sample for number normalization on pstw gw routing
---
Modified: etc/kamailio.cfg
---
Diff:
https://github.com/kamailio/kamailio/commit/b4ad3105e11559bfe502523f60b085e…
Patch:
https://github.com/kamailio/kamailio/commit/b4ad3105e11559bfe502523f60b085e…
---
diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg
index b55e06b0cc..13bef88de1 100644
--- a/etc/kamailio.cfg
+++ b/etc/kamailio.cfg
@@ -854,6 +854,13 @@ route[PSTN] {
exit;
}
+ # normalize target number for pstn gateway
+ # - convert leading 00 to +
+ if (starts_with("$rU", "00")) {
+ strip(2);
+ prefix("+");
+ }
+
if (strempty($sel(cfg_get.pstn.gw_port))) {
$ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip);
} else {