diff options
author | Daniel Dickinson <openwrt@daniel.thecshore.com> | 2015-12-14 22:51:29 -0500 |
---|---|---|
committer | Daniel Dickinson <openwrt@daniel.thecshore.com> | 2015-12-15 20:41:01 -0500 |
commit | c481f3f34325b9c1cf817b16a567a6b10fdd1f2e (patch) | |
tree | 5fe6f363c0ff7544a25bdbb21c17873ade06d272 /applications/luci-app-pbx/luasrc | |
parent | bbcfad7953489ed87336e3a1981c9cb19e390cdb (diff) |
validation: Add option ipv4only option to host and hostport datatypes
Some applications only support ipv4 so add ipv4only option
to host and hostport datatypes so that for thos applications
that when an IP address is specified only and ipv4 ip address
gets accepted.
Diffstat (limited to 'applications/luci-app-pbx/luasrc')
-rw-r--r-- | applications/luci-app-pbx/luasrc/model/cbi/pbx-advanced.lua | 2 | ||||
-rw-r--r-- | applications/luci-app-pbx/luasrc/model/cbi/pbx-voip.lua | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/applications/luci-app-pbx/luasrc/model/cbi/pbx-advanced.lua b/applications/luci-app-pbx/luasrc/model/cbi/pbx-advanced.lua index 5d4f135c5..34288c663 100644 --- a/applications/luci-app-pbx/luasrc/model/cbi/pbx-advanced.lua +++ b/applications/luci-app-pbx/luasrc/model/cbi/pbx-advanced.lua @@ -264,7 +264,7 @@ h = s:taboption("remote_usage", Value, "externhost", translate("Domain/IP Addres The best thing to input is a static IP address. If your IP address is dynamic and it changes, \ your configuration will become invalid. Hence, it's recommended to set up Dynamic DNS in this case. \ and enter your Dynamic DNS hostname here. You can configure Dynamic DNS with the luci-app-ddns package.")) -h.datatype = "host" +h.datatype = "host(0)" p = s:taboption("remote_usage", Value, "bindport", translate("External SIP Port"), translate("Pick a random port number between 6500 and 9500 for the service to listen on. \ diff --git a/applications/luci-app-pbx/luasrc/model/cbi/pbx-voip.lua b/applications/luci-app-pbx/luasrc/model/cbi/pbx-voip.lua index ed1ed1edb..9b4620285 100644 --- a/applications/luci-app-pbx/luasrc/model/cbi/pbx-voip.lua +++ b/applications/luci-app-pbx/luasrc/model/cbi/pbx-voip.lua @@ -84,7 +84,7 @@ function pwd.write(self, section, value) end h = s:option(Value, "host", translate("SIP Server/Registrar")) -h.datatype = "host" +h.datatype = "host(0)" p = s:option(ListValue, "register", translate("Enable Incoming Calls (Register via SIP)"), translate("This option should be set to \"Yes\" if you have a DID \(real telephone number\) \ @@ -103,7 +103,7 @@ p.default = "yes" from = s:option(Value, "fromdomain", translate("SIP Realm (needed by some providers)")) from.optional = true -from.datatype = "host" +from.datatype = "host(0)" port = s:option(Value, "port", translate("SIP Server/Registrar Port")) port.optional = true @@ -111,6 +111,6 @@ port.datatype = "port" op = s:option(Value, "outboundproxy", translate("Outbound Proxy")) op.optional = true -op.datatype = "host" +op.datatype = "host(0)" return m |