|
|
@ -17,6 +17,9 @@ modem_n() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
dialmenu() { |
|
|
|
dialmenu() { |
|
|
|
|
|
|
|
if [ -n "$1" ]; then |
|
|
|
|
|
|
|
NUMBER="$1" |
|
|
|
|
|
|
|
else |
|
|
|
CONTACTS="$(sxmo_contacts.sh | grep -E "^\+?[0-9]+:")" |
|
|
|
CONTACTS="$(sxmo_contacts.sh | grep -E "^\+?[0-9]+:")" |
|
|
|
NUMBER="$( |
|
|
|
NUMBER="$( |
|
|
|
printf %b "Close Menu\nMore contacts\n$CONTACTS" | |
|
|
|
printf %b "Close Menu\nMore contacts\n$CONTACTS" | |
|
|
@ -31,6 +34,8 @@ dialmenu() { |
|
|
|
sxmo_dmenu_with_kb.sh -l 10 -p Number -c -i |
|
|
|
sxmo_dmenu_with_kb.sh -l 10 -p Number -c -i |
|
|
|
)" |
|
|
|
)" |
|
|
|
NUMBER="$(echo "$NUMBER" | cut -d: -f1 | tr -d -- '- ')" |
|
|
|
NUMBER="$(echo "$NUMBER" | cut -d: -f1 | tr -d -- '- ')" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if [ -z "$NUMBER" ] || [ "$NUMBER" = "CloseMenu" ]; then |
|
|
|
if [ -z "$NUMBER" ] || [ "$NUMBER" = "CloseMenu" ]; then |
|
|
|
#no number selected (probably cancelled), silently discard |
|
|
|
#no number selected (probably cancelled), silently discard |
|
|
|
exit 0 |
|
|
|
exit 0 |
|
|
@ -49,7 +54,7 @@ dialmenu() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
modem_n || fatalerr "Couldn't determine modem number - is modem online?" |
|
|
|
modem_n || fatalerr "Couldn't determine modem number - is modem online?" |
|
|
|
CREATEDCALLID="$(dialmenu)" |
|
|
|
CREATEDCALLID="$(dialmenu "$1")" |
|
|
|
if [ -n "$CREATEDCALLID" ]; then |
|
|
|
if [ -n "$CREATEDCALLID" ]; then |
|
|
|
sxmo_modemcall.sh pickup "$CREATEDCALLID" |
|
|
|
sxmo_modemcall.sh pickup "$CREATEDCALLID" |
|
|
|
fi |
|
|
|
fi |
|
|
|