kamailio.cfg: small sample for number normalization on pstw gw routing
authorDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 3 May 2018 07:50:57 +0000 (09:50 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 3 May 2018 07:50:57 +0000 (09:50 +0200)
etc/kamailio.cfg

index b55e06b..13bef88 100644 (file)
@@ -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 {