Selaa lähdekoodia

kamailio.cfg: add option to set pstn gw port

Daniel-Constantin Mierla 13 vuotta sitten
vanhempi
commit
4ef839851e
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7 1
      etc/kamailio.cfg

+ 7 - 1
etc/kamailio.cfg

@@ -191,6 +191,7 @@ tcp_connection_lifetime=3605
 #
 #
 # - by default is empty to avoid misrouting
 # - by default is empty to avoid misrouting
 pstn.gw_ip = "" desc "PSTN GW Address"
 pstn.gw_ip = "" desc "PSTN GW Address"
+pstn.gw_port = "" desc "PSTN GW Port"
 #!endif
 #!endif
 
 
 #!ifdef WITH_VOICEMAIL
 #!ifdef WITH_VOICEMAIL
@@ -826,7 +827,12 @@ route[PSTN] {
 		exit;
 		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);
 	route(RELAY);
 	exit;
 	exit;