applications/luci-asterisk:
- make nat handling configurable for sip trunks - display actual reason when trunk is offline
This commit is contained in:
parent
bcd406e073
commit
20988a0f18
2 changed files with 8 additions and 2 deletions
|
@ -34,6 +34,10 @@ if arg[1] then
|
||||||
sipport = peer:option(Value, "port", "SIP Port")
|
sipport = peer:option(Value, "port", "SIP Port")
|
||||||
sipport.default = 5060
|
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")
|
username = peer:option(Value, "username", "Authorization ID")
|
||||||
password = peer:option(Value, "secret", "Authorization Password")
|
password = peer:option(Value, "secret", "Authorization Password")
|
||||||
password.password = true
|
password.password = true
|
||||||
|
@ -96,7 +100,8 @@ else
|
||||||
if sip_peers[s].info.online == nil then
|
if sip_peers[s].info.online == nil then
|
||||||
return "n/a"
|
return "n/a"
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,8 @@ function online.cfgvalue(self, s)
|
||||||
if sip_peers[s].info.online == nil then
|
if sip_peers[s].info.online == nil then
|
||||||
return "n/a"
|
return "n/a"
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue