Skip to content

Commit 2d435ad

Browse files
committed
Telephony enabled switch broken if no 4G (#169)
1 parent c471e94 commit 2d435ad

File tree

5 files changed

+28
-15
lines changed

5 files changed

+28
-15
lines changed

CHANGELOG.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
==========
33
* tch-gui-unhide: Fixed Warning on setting landing page state
44
* tch-gui-unhide: Fixed static leases in FW 17.2 which was broken by moving static leases to a separate tab in release 2023.05.16 (#168)
5+
* tch-gui-unhide: Fixed broken Telephony Enabled switch on devices with no 4G backup (#169)
56
* move-lan-port-to-own-network: Removed - use the GUI to create VLANs
67

78
2023.08.24

build/17.2/120-Telephony

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
echo -e "[$SCRIPT]: Create Services.X_TELSTRA_VOLTE.map if it does not exist"
2-
[ ! -e /usr/share/transformer/mappings/bbf/Services.X_TELSTRA_VOLTE.map ] && cat <<"VOLTE" >/usr/share/transformer/mappings/bbf/Services.X_TELSTRA_VOLTE.map
1+
if [ -e /etc/config/mobiled_device_specific -a ! -e /usr/share/transformer/mappings/bbf/Services.X_TELSTRA_VOLTE.map ]; then
2+
#region Services.X_TELSTRA_VOLTE.map
3+
echo -e "[$SCRIPT]: Create Services.X_TELSTRA_VOLTE.map"
4+
cat <<"VOLTE" >/usr/share/transformer/mappings/bbf/Services.X_TELSTRA_VOLTE.map
35
-- Manually generated
46

57
local lfs = require("lfs")
@@ -95,6 +97,8 @@ for _, dupli in ipairs(duplicates) do
9597
end
9698

9799
VOLTE
100+
#endregion
101+
fi
98102

99103
if ! grep -q mmpbxmobilenet /usr/share/transformer/commitapply/uci_mmpbx.ca; then
100104
echo -e "[$SCRIPT]: Adding mmpbxmobilenet commit/apply action"

build/common/120-Telephony

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fi
2525
if [ ! -e /etc/config/mobiled_device_specific ]; then
2626
echo -e "[$SCRIPT]: Remove VoLTE Tab and card info"
2727
sed -e '/mmpbx-volte-modal.lp/d' -i /www/snippets/tabs-voice.lp
28-
sed -e '/--region VoLTE/,/--endregion/d' -i /www/lua/telephonycard_helper.lua
28+
sed -e '/--region VoLTE/,/--endregion/d' -e 's/No SIP profiles or VoLTE enabled/No SIP profiles enabled/' -i /www/lua/telephonycard_helper.lua
2929
rm -f /usr/share/transformer/mappings/uci/mobiled_device_specific.map /usr/share/transformer/commitapply/mobiled_device_specific.ca
3030
rm -f /usr/share/transformer/mappings/uci/mobiled_sessions.map /usr/share/transformer/commitapply/mobiled_sessions.ca
3131
fi

src/common/telephony/www/docroot/modals/mmpbx-global-modal.lp

+6-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ local mapParams = {
3131
mmpbx_enabled = "[email protected]",
3232
voiceonfailover = "uci.wansensing.global.voiceonfailover",
3333
}
34+
if mobile_devices == 0 then
35+
mapParams.voiceonfailover = nil
36+
mapValid.voiceonfailover = nil
37+
end
3438
local content = post_helper.handleQuery(mapParams,mapValid)
3539

3640
local split = require("split").split
@@ -302,7 +306,7 @@ local sipnet_options = {
302306
canDelete = false,
303307
}
304308

305-
if cfg["wansensing_enabled"] == "1" and content["voiceonfailover"] == "1" then
309+
if mobile_devices == 0 and cfg["wansensing_enabled"] == "1" and content["voiceonfailover"] == "1" then
306310
sipnet_columns[10]["readonly"] = true
307311
sipnet_columns[10]["header"] = sipnet_columns[10]["header"].." <span class='icon-question-sign' title='Interface is controlled by WAN Sensing.'></span>"
308312
end
@@ -331,7 +335,7 @@ ngx.print('\
331335
html[#html+1] = ui_helper.createSwitch(T"Telephony Enabled","mmpbx_enabled",content["mmpbx_enabled"])
332336
if cfg["wansensing_enabled"] == "1" and mobile_devices > 0 then
333337
html[#html+1] = ui_helper.createSwitch(T"Voice on 4G Failover","voiceonfailover",content["voiceonfailover"])
334-
else
338+
elseif content["voiceonfailover"] then
335339
html[#html + 1] = ui_helper.createSimpleInputHidden("voiceonfailover",content["voiceonfailover"])
336340
end
337341
html[#html+1] = '<fieldset>'

tch-gui-unhide-17.2

+14-10
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)