Fix kiosk audio output: don't mute microphone by default

The PTT handler was muting the audio source before checking if a PTT
device was configured. This prevented kiosks from sending audio back
to calling phones during normal intercom operation.

Changes:
- Move audio mute command after PTT device check
- Only mute audio when PTT device is actually configured
- Leave audio unmuted for standard kiosk intercom functionality
- Add clarifying comments about PTT mode vs normal operation

This fixes the issue where phones calling the kiosk could send audio
but received no audio back from the kiosk.
This commit is contained in:
Claude
2025-12-03 17:14:22 +00:00
parent edce1ca65d
commit cb95676722
+3 -1
View File
@@ -959,9 +959,11 @@ CONFIG="/etc/easy-asterisk/config"
PTT_CONFIG="/etc/easy-asterisk/ptt-device"
[[ -f "$CONFIG" ]] && source "$CONFIG"
[[ -f "$PTT_CONFIG" ]] && source "$PTT_CONFIG"
# Exit if no PTT device configured - leave audio unmuted for normal kiosk operation
[[ -z "$PTT_DEVICE" ]] && exit 0
# Default: Mute audio source on start
# PTT mode: Mute audio source on start, unmute only when button pressed
pactl set-source-mute @DEFAULT_SOURCE@ 1
# Unmute on press, mute on release