From 1f563dd873907fe8dbc18d689181b261cfdde782 Mon Sep 17 00:00:00 2001 From: Anjandev Momi Date: Sun, 11 Jul 2021 15:45:50 -0400 Subject: [PATCH] fix dtmf tones with busybox grep: dont set initial value busybox grep doesnt have -b flag Signed-off-by: Maarten van Gompel --- scripts/modem/sxmo_modemcall.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/modem/sxmo_modemcall.sh b/scripts/modem/sxmo_modemcall.sh index d3c76fd..d066e4c 100755 --- a/scripts/modem/sxmo_modemcall.sh +++ b/scripts/modem/sxmo_modemcall.sh @@ -202,16 +202,14 @@ incallmenuloop() { dtmfmenu() { CALLID="$1" - DTMFINDEX=0 NUMS="0123456789*#ABCD" while true; do PICKED="$( echo "$NUMS" | grep -o . | sed '1 iReturn to Call Menu' | - dmenu "$([ "$WINDOWIFIED" = 0 ] && echo "-c" || echo "-wm")" -l 20 -c -idx $DTMFINDEX -p "DTMF Tone" + dmenu "$([ "$WINDOWIFIED" = 0 ] && echo "-c" || echo "-wm")" -l 20 -c -p "DTMF Tone" )" echo "$PICKED" | grep "Return to Call Menu" && return - DTMFINDEX=$(echo "$NUMS" | grep -bo "$PICKED" | cut -d: -f1 | xargs -IN echo 2+N | bc) modem_cmd_errcheck -m "$(modem_n)" -o "$CALLID" --send-dtmf="$PICKED" done }