Commit graph

58 commits

Author SHA1 Message Date
Anjandev Momi
1f563dd873 fix dtmf tones with busybox grep: dont set initial value
busybox grep doesnt have -b flag

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-07-11 22:08:51 +02:00
Stacy Harper
3d9fc07157 Prevent the incomingcallmenu to go futher if the menu failed
This can happen if an call come while a menu already is open of if the
user kill the dmenu with a top side gesture.

We dont want the notification to be purged to allow the user to manually
open it with the notification appmenu so we have to stop the code here.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-07-07 15:01:54 -04:00
Stacy Harper
e6ea657634 Cleanup hooks
This add a script to use either the user hook or the default one.

Sometime we checked the user hook or a default code. We move this
default code in a defaut hook.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-06-29 22:43:16 +02:00
Stacy Harper
02a37c9dea Add back a notification when receiving a call
If a menu already is open while receiving a call, the dedicated menu
could not open itself. It prevent completly the user to pickup the call.

We add a notification to open this menu manually.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-06-29 22:42:32 +02:00
Stacy Harper
7cf1dadf5f Fix the notification for outgoing call hanged up by the contact
There was a hole in the event logging where we start a call that the
contact hang up. As we dont have an event for outgoing call,
modemmonitor think this is a missed call.

Adding a dedicated event file help modemmonitor to know what happen.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-06-13 21:15:08 +02:00
noneofyourbusiness
3599be95f4
verify numbers with pn 2021-06-09 08:37:20 +02:00
Anjandev Momi
725d89d6d6
Rework the sxmo screenlock 2021-06-06 09:41:36 +02:00
Maarten van Gompel
b5e5387121 minor shellcheck fixes after applying latest patches 2021-04-23 19:23:06 +02:00
Stacy Harper
6426a94e46 Add proximity lock toggle on the config menu
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-23 19:16:24 +02:00
Stacy Harper
f4ee396394 Rework the incoming call pickup/discard behavior
* The sxmo_modemmonitor.sh will now run a new sxmo_modemcall.sh
dedicated menu to Pickup, Hangup or Mute the call. It will not write
notifications anymore.

* We now can mute the ring with the new pickup menu. With the default
hook, this will stop the ringtone like the missed_call would do.

* The sxmo_modemcall.sh now use a new sxmo_proximitylock.sh which
will lock the screen when putting the phone in front of the ear. This
script should be smart enough to work smoothly with a crust context.

To achieve this, the proximity_lock will only disable the initial
lock (the one who want to go back in crust after some seconds) if the
phone moved a little bit and is not in your pocket. So forgetting the
phone in a table or not earing the ring in your bag will not empty the
battery. You'll find the phone in crust with notifications.

* The sxmo_modemcall.sh do not monitor finished calls anymore. We leave
it with hangup or being killed by sxmo_modemmonitor.sh. This simplify
the call script and prevent double deleting mmcli calls. I had to use
pids and wait commands to fix and issue and make the script killeable
by the monitor.

Plus, only the monitor will now delete calls. The call script should be
precise on what happen using cached files.

* Discarded and hanged up calls are two different behavior with
different script (by default use the same linked ones)

* Fixed a bug where sometime ringing was started twice. I think this is
cause by the new checkforincomingcalls in the connected state change. We
now use a file to test if the call already has been managed.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-23 19:16:08 +02:00
Maarten van Gompel
2f62b7c446 Moved checkmark to icons 2021-03-16 22:01:41 +01:00
Maarten van Gompel
f4ba3978c9 Call common script, moved icons to common script, removed unnecessary aliases from common (let's add them only when there are conflicts), made sure plays along with shellcheck 2021-02-01 18:32:32 +01:00
Maarten van Gompel
7669fa341e adding icons to menus 2021-02-01 18:32:32 +01:00
Maarten van Gompel
24905884ee Removed explicit font from most dmenu calls, dmenu font is read from Xresources now and kept as uniform as possible 2021-02-01 18:32:32 +01:00
Maarten van Gompel
c58fa6a1e9 Added an option (extra notification) to discard an incoming call #157 2021-01-30 21:41:08 +01:00
Maarten van Gompel
1608ab1ae4 increased verbosity in various scripts, and do not run xargs kill when argument is empty (cleaner and clearer stderr messages) 2021-01-30 21:41:08 +01:00
Maarten van Gompel
9a4df9fd28 reworking handling finished/missed calls #134 2020-12-09 15:46:21 +01:00
Maarten van Gompel
4b4bfc851f explicitly delete calls after hangup/termination #134 2020-12-09 15:46:21 +01:00
Maarten van Gompel
06b25c3bc9 Restore audio to original state after finishing a call #133 2020-12-09 15:46:21 +01:00
Maarten van Gompel
4a90d86f56 Sane message when terminating call with unknown number and more verbose output to stderr from modem scripts 2020-12-09 15:46:21 +01:00
Maarten van Gompel
7fb7cd70f3 various indentation fixes (spaces to tabs and stripping trailing whitespace) 2020-11-20 18:10:17 +01:00
Anjandev Momi
e11cf9e523 move sxmo data to XDG_DATA_HOME
Breaking change. Make sure you send an email to the mailing list
telling users to move their
$XDG_CONFIG_HOME/{modem,notifications} files/folders to
$XDG_DATA_HOME

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2020-11-08 19:45:39 -05:00
Reed Wade
6f94bb8159 Add a new pickup hook that trigger on accept incoming calls
Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-08 14:33:26 +01:00
Maarten van Gompel
565eae8835 Updated handling of '+' in phone numbers, it is now never stripped but expected: all numbers should be full international phone numbers (including in contacts.tsv).
Ensure contacts from modem and contacts lists are all fully qualified phone numbers (starting with + and carrying a country prefix). This effectively filters out older/incompatible entries.
2020-08-26 23:24:27 -05:00
Miles Alan
45c571727c Cleanup logic for notification LED setting; increase default call volume 2020-08-22 16:16:26 -05:00
Miles Alan
8e1c40e832 Delete calls from modem on terminating the in call script 2020-08-22 14:53:17 -05:00
Miles Alan
5f8aad0386 Fix bugs with incall functionality around statusbar showing call duration 2020-08-22 12:21:51 -05:00
Miles Alan
0801bb1adb Restructure configs into seperate folder 2020-07-12 19:29:46 -05:00
Miles Alan
d713b19199 Use sxmo_statusbarupdate.sh script instead of direct calls duplicated logic 2020-07-12 11:38:31 -05:00
Miles Alan
87c99ec024 Use USR1 signal instead of update file for updating statusbar 2020-07-12 11:32:02 -05:00
Miles Alan
18745b05bb Use setsid to update /tmp/sxmo_bar after call to refresh bar after process dead 2020-06-29 20:12:39 -05:00
Miles Alan
844ce9ddef Plus prefix strip numbers before storing into modem log 2020-06-29 15:24:34 -05:00
Miles Alan
a032e4923e Remove +1 stripping from numbers in modem scripts
Note prefix stripping was unreliable because any +1XX number would break things.
The advice should be to always dial with +1 / international prefixes and store
contacts in your contacts.tsv with international codes; this way we avoid any
duplicate errors since we can be assured things in mmcli always come back w/
international prefixing automatically.
2020-06-29 11:43:22 -05:00
Anjandev Momi
f95cb51984 add contacts.tsv integration to call and text apps
Signed-off-by: Miles Alan <m@milesalan.com>
2020-06-29 10:30:54 -05:00
Miles Alan
c119ab0145 Pull dialing functionality into seperate script; allows in-call check to be valid 2020-06-27 21:28:46 -05:00
Miles Alan
8ee22f3038 Quote $@ where needed 2020-06-27 20:50:06 -05:00
Miles Alan
cef4de2af0 Use "$@" for expansion calls rather than manually listing argument numbers 2020-06-27 20:19:47 -05:00
Miles Alan
91d6ebb15d Call improvements; fix bugs associated with hanging up; refresh bar on callend 2020-06-24 21:36:15 -05:00
Miles Alan
51921e5925 Fix bug preventing hanging up call upon killing window 2020-06-20 11:41:02 -05:00
Miles Alan
bca4475e0a Show duration of call in statusbar 2020-06-20 11:41:02 -05:00
Miles Alan
a4b2724c4a Clean up modem functionality & don't ever kill dmenu; move call monitoring to call script 2020-06-19 17:57:43 -05:00
Miles Alan
3c5a85a9a1 Add windowify toggle to the in call menu 2020-06-17 06:40:59 -05:00
Miles Alan
2a925ed1a0 Allow calling numbers with + prefix 2020-06-14 10:07:04 -05:00
Miles Alan
049a93e5d8 Shellcheck and tabindent all scripts 2020-06-13 20:36:13 -05:00
Miles Alan
bd5ead19e5 Fix shellcheck errors 2020-06-10 17:19:54 -05:00
Miles Alan
7f31a3da40 Simplify audio routing for modem call; add linemic via audio routing -l 2020-06-10 17:06:13 -05:00
Anjandev Momi
1b78c3cf2f modem: use XDG_CONFIG_HOME to save logs
Signed-off-by: Miles Alan <m@milesalan.com>
2020-06-07 10:05:46 -05:00
Miles Alan
66eeb46a55 Fix bug - dialer launches into screenlock upon starting call 2020-06-07 10:05:46 -05:00
Miles Alan
b3804adf0c Disable lisgd before locking screen in call script 2020-05-30 15:15:05 -05:00
Miles Alan
ba8e8b0b9a Fix typo when modem not found you're -> your 2020-05-22 21:55:56 -05:00