Module: sip-router
Branch: master
Commit: 4ef839851ef518815df38a9ae73e948719784e89
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4ef839851ef518815df38a9ae73e948719784e89

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date:   Wed Oct 31 20:21:07 2012 +0100

kamailio.cfg: add option to set pstn gw port

---

 etc/kamailio.cfg |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg
index a8d694a..aa83fad 100644
--- a/etc/kamailio.cfg
+++ b/etc/kamailio.cfg
@@ -191,6 +191,7 @@ tcp_connection_lifetime=3605
 #
 # - by default is empty to avoid misrouting
 pstn.gw_ip = "" desc "PSTN GW Address"
+pstn.gw_port = "" desc "PSTN GW Port"
 #!endif
 
 #!ifdef WITH_VOICEMAIL
@@ -826,7 +827,12 @@ route[PSTN] {
                exit;
        }
 
-       $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip);
+       if (strempty($sel(cfg_get.pstn.gw_port))) {
+               $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip);
+       } else {
+               $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip) + ":"
+                                       + $sel(cfg_get.pstn.gw_port);
+       }
 
        route(RELAY);
        exit;


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to