|
|
@ -56,6 +56,11 @@ toggleflag() { |
|
|
|
echo -- $NEWFLAGS |
|
|
|
echo -- $NEWFLAGS |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
toggleflagset() { |
|
|
|
|
|
|
|
FLAGS="$(toggleflag "$1" "$FLAGS")" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dialmenu() { |
|
|
|
dialmenu() { |
|
|
|
CONTACTS="$(contacts)" |
|
|
|
CONTACTS="$(contacts)" |
|
|
|
NUMBER="$( |
|
|
|
NUMBER="$( |
|
|
@ -108,33 +113,27 @@ incallmenu() { |
|
|
|
# E.g. There's some bug with the modem that' requires us to toggle the |
|
|
|
# E.g. There's some bug with the modem that' requires us to toggle the |
|
|
|
# DAI a few times before starting the call for it to kick in |
|
|
|
# DAI a few times before starting the call for it to kick in |
|
|
|
FLAGS=" " |
|
|
|
FLAGS=" " |
|
|
|
FLAGS="$(toggleflag "-e" "$FLAGS")" |
|
|
|
toggleflagset "-e" |
|
|
|
FLAGS="$(toggleflag "-m" "$FLAGS")" |
|
|
|
toggleflagset "-m" |
|
|
|
FLAGS="$(toggleflag "-2" "$FLAGS")" |
|
|
|
toggleflagset "-2" |
|
|
|
FLAGS="$(toggleflag "-2" "$FLAGS")" |
|
|
|
toggleflagset "-2" |
|
|
|
FLAGS="$(toggleflag "-2" "$FLAGS")" |
|
|
|
toggleflagset "-2" |
|
|
|
|
|
|
|
|
|
|
|
while true |
|
|
|
while true |
|
|
|
do |
|
|
|
do |
|
|
|
echo -- "$FLAGS" | grep -- "-m" && TMUTE="Mute" || TMUTE="Unmute" |
|
|
|
CHOICES=" |
|
|
|
echo -- "$FLAGS" | grep -- "-z" && TECHO="Echomic Off" || TECHO="Echomic On" |
|
|
|
Volume ↑ ^ sxmo_vol.sh up |
|
|
|
echo -- "$FLAGS" | grep -- "-e" && TEARPIECE="Earpiece Off" || TEARPIECE="Earpiece On" |
|
|
|
Volume ↓ ^ sxmo_vol.sh down |
|
|
|
echo -- "$FLAGS" | grep -- "-h" && TLINEJACK="Linejack Off" || TLINEJACK="Linejack On" |
|
|
|
Mic $(echo -- $FLAGS | grep -q -- -m && echo ✓) ^ toggleflagset -m |
|
|
|
echo -- "$FLAGS" | grep -- "-s" && TSPEAKER="Speakerphone Off" || TSPEAKER="Speakerphone On" |
|
|
|
Linemic $(echo -- $FLAGS | grep -q -- -l && echo ✓) ^ toggleflagset -l |
|
|
|
|
|
|
|
Echomic $(echo -- $FLAGS | grep -q -- -z && echo ✓) ^ toggleflagset -z |
|
|
|
CHOICES="$(echo -ne ' |
|
|
|
Earpiece $(echo -- $FLAGS | grep -q -- -e && echo ✓) ^ toggleflagset -e |
|
|
|
Volume ↑ ^ sxmo_vol.sh up |
|
|
|
Linejack $(echo -- $FLAGS | grep -q -- -h && echo ✓) ^ toggleflagset -h |
|
|
|
Volume ↓ ^ sxmo_vol.sh down |
|
|
|
Speakerphone $(echo -- $FLAGS | grep -q -- -s && echo ✓) ^ toggleflagset -s |
|
|
|
TMUTE ^ FLAGS="$(toggleflag "-m" "$FLAGS")" |
|
|
|
DTMF Tones ^ dtmfmenu $VID |
|
|
|
TECHO ^ FLAGS="$(toggleflag "-z" "$FLAGS")" |
|
|
|
Hangup ^ hangup $VID |
|
|
|
TEARPIECE ^ FLAGS="$(toggleflag "-e" "$FLAGS")" |
|
|
|
Lock Screen ^ sh -c 'pkill -9 lisgd; sxmo_screenlock; lisgd &' |
|
|
|
TLINEJACK ^ FLAGS="$(toggleflag "-h" "$FLAGS")" |
|
|
|
" |
|
|
|
TSPEAKER ^ FLAGS="$(toggleflag "-s" "$FLAGS")" |
|
|
|
|
|
|
|
DTMF Tones ^ dtmfmenu $VID |
|
|
|
|
|
|
|
Hangup ^ hangup $VID |
|
|
|
|
|
|
|
Lock Screen ^ sh -c "pkill -9 lisgd; sxmo_screenlock; lisgd &" |
|
|
|
|
|
|
|
' | sed "s/TMUTE/$TMUTE/;s/TECHO/$TECHO/;s/TEARPIECE/$TEARPIECE/;s/TLINEJACK/$TLINEJACK/;s/TSPEAKER/$TSPEAKER/" |
|
|
|
|
|
|
|
)" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PICKED="" |
|
|
|
PICKED="" |
|
|
|
PICKED=$( |
|
|
|
PICKED=$( |
|
|
|