diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-01-11 04:23:43 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-01-11 04:23:43 +0000 |
commit | 20988a0f187eccda0edfb498cd04eb97e2349fd6 (patch) | |
tree | 19384e9a374c1127439cb7ae629395bb430d1392 | |
parent | bcd406e0735f2195af399fccfcd5187dfc4b8f94 (diff) |
applications/luci-asterisk:
- make nat handling configurable for sip trunks
- display actual reason when trunk is offline
-rw-r--r-- | applications/luci-asterisk/luasrc/model/cbi/asterisk/trunk_sip.lua | 7 | ||||
-rw-r--r-- | applications/luci-asterisk/luasrc/model/cbi/asterisk/trunks.lua | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/applications/luci-asterisk/luasrc/model/cbi/asterisk/trunk_sip.lua b/applications/luci-asterisk/luasrc/model/cbi/asterisk/trunk_sip.lua index ca2947138..1337602e4 100644 --- a/applications/luci-asterisk/luasrc/model/cbi/asterisk/trunk_sip.lua +++ b/applications/luci-asterisk/luasrc/model/cbi/asterisk/trunk_sip.lua @@ -34,6 +34,10 @@ if arg[1] then sipport = peer:option(Value, "port", "SIP Port") sipport.default = 5060 + sipnat = peer:option(Flag, "nat", "NAT between this device and provider") + sipnat.enabled = "yes" + sipnat.disabled = "no" + username = peer:option(Value, "username", "Authorization ID") password = peer:option(Value, "secret", "Authorization Password") password.password = true @@ -96,7 +100,8 @@ else if sip_peers[s].info.online == nil then return "n/a" else - return sip_peers[s].info.online and "yes" or "no" + return sip_peers[s].info.online + and "yes" or "no (%s)" % sip_peers[s].info.Status:lower() end end diff --git a/applications/luci-asterisk/luasrc/model/cbi/asterisk/trunks.lua b/applications/luci-asterisk/luasrc/model/cbi/asterisk/trunks.lua index b9dd1dfd8..af992989c 100644 --- a/applications/luci-asterisk/luasrc/model/cbi/asterisk/trunks.lua +++ b/applications/luci-asterisk/luasrc/model/cbi/asterisk/trunks.lua @@ -57,7 +57,8 @@ function online.cfgvalue(self, s) if sip_peers[s].info.online == nil then return "n/a" else - return sip_peers[s].info.online and "yes" or "no" + return sip_peers[s].info.online + and "yes" or "no (%s)" % sip_peers[s].info.Status:lower() end end |