Add callscreen DWM plugin for incoming and active voice calls

This commit is contained in:
Luxferre
2026-10-22 10:17:24 +03:00
parent cbac6743bc
commit 6e58218e10
38 changed files with 2120 additions and 38 deletions
+15
View File
@@ -28,12 +28,18 @@ EOF
fi
sxmo_log "Attempting to dial: $NUMBER"
if command -v xcallscreen >/dev/null 2>&1; then
xcallscreen outgoing "-" "$NUMBER" >/dev/null 2>&1 || true
fi
if ! CALLID="$(
mmcli -m any --voice-create-call "number=$NUMBER" |
grep -Eo "Call/[0-9]+" |
grep -oE "[0-9]+"
)"; then
if command -v xcallscreen >/dev/null 2>&1; then
xcallscreen ended >/dev/null 2>&1 || true
fi
sxmo_notify_user.sh --urgency=critical "We failed to initiate call"
return 1
fi
@@ -41,17 +47,26 @@ EOF
# cleanup all dangling event files, ignore errors
rm "$XDG_RUNTIME_DIR/sxmo_calls/$CALLID."* 2>/dev/null || true
sxmo_log "Starting call with CALLID: $CALLID"
if command -v xcallscreen >/dev/null 2>&1; then
xcallscreen outgoing "$CALLID" "$NUMBER" >/dev/null 2>&1 || true
fi
sxmo_log "Invoking dial hook"
sxmo_hook_dial.sh
if ! sxmo_modemaudio.sh setup_audio; then
if command -v xcallscreen >/dev/null 2>&1; then
xcallscreen ended >/dev/null 2>&1 || true
fi
sxmo_notify_user.sh --urgency=critical "We failed to setup call audio"
mmcli -m any --voice-delete-call="$CALLID"
return 1
fi
if ! sxmo_modemcall.sh pickup "$CALLID"; then
if command -v xcallscreen >/dev/null 2>&1; then
xcallscreen ended >/dev/null 2>&1 || true
fi
sxmo_modemaudio.sh reset_audio
mmcli -m any --voice-delete-call="$CALLID"
return 1