summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-pbx/luasrc/model
diff options
context:
space:
mode:
authorDaniel Dickinson <openwrt@daniel.thecshore.com>2015-12-14 22:51:29 -0500
committerDaniel Dickinson <openwrt@daniel.thecshore.com>2015-12-15 13:12:10 -0500
commit0ec3f91a0c7a8c71980f5e70f3322397e496a8d6 (patch)
tree670952c9572eb3f474a584acc7d66914bb5be97c /applications/luci-app-pbx/luasrc/model
parent38880407aa6c0246bc9af52073a79ff4a2096a6e (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/model')
-rw-r--r--applications/luci-app-pbx/luasrc/model/cbi/pbx-advanced.lua2
-rw-r--r--applications/luci-app-pbx/luasrc/model/cbi/pbx-voip.lua6
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 5d4f135c5b..34288c6632 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 ed1ed1edb1..9b46202855 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