~mil/f_scripts

48fcecefbe3f075d7f8059ee70e5a6a0e46ae11c — Miles Alan a month ago 43ee7a9
f_phone: Use any available modem & show opts for a few action prompts
1 files changed, 4 insertions(+), 4 deletions(-)

M scripts/f_phone
M scripts/f_phone => scripts/f_phone +4 -4
@@ 32,7 32,7 @@ VAR="
"

cleannumber() { pn find -c "$F_PHONE_COUNTRYCODE" "$1"; }
mm() { mmcli -m 0 "$@"; }
mm() { mmcli -m any "$@"; }
monitorstateget() { cat "$F_PHONE_MONITORSTATEFILE" || echo ""; }
monitorstateset() { echo "$1" > "$F_PHONE_MONITORSTATEFILE"; }
ringhangup() { mm -o "$(callid "incoming.+ringing")" --hangup; }


@@ 119,7 119,7 @@ maketext() {

    OPTS="send cancel editmsg editnum"
    [ -p /tmp/fbp.fifo ] && { echo -e "\b\f\r"; echo "$OPTS" | tr " " "\n"; } > /tmp/fbp.fifo
    read -p "Action: " ACTION
    read -p "Action ($OPTS): " ACTION


    [ "$ACTION" == send ] && break


@@ 177,7 177,7 @@ makecall() {
    
    OPTS="confirm cancel editnum"
    [ -p /tmp/fbp.fifo ] && { echo -e "\b\f\r"; echo "$OPTS" | tr " " "\n"; } > /tmp/fbp.fifo
    read -p "Action: " ACTION
    read -p "Action ($OPTS): " ACTION

    [ "$ACTION" == confirm ] && break
    [ "$ACTION" == editnum ] && NUMBER=''


@@ 247,7 247,7 @@ loopincall() {
  while true; do
    OPTS="nop hangup volup voldown modespeaker modehandheld modewired 1 2 3 4 5 6 7 8 9 0"
    [ -p /tmp/fbp.fifo ] && { echo -e "\b\f\r"; echo "$OPTS" | tr " " "\n"; } > /tmp/fbp.fifo
    read -p "Action: " ACTION
    read -p "Action ($OPTS): " ACTION

    [ "$ACTION" = "volup" ] && volset 1+
    [ "$ACTION" = "voldown" ] && volset 1-