feat(call): add call start time to response and update call status handling in voicemail manager

This commit is contained in:
2026-01-01 20:17:47 -06:00
parent ea7ef09660
commit 3794e5806b
3 changed files with 11 additions and 1 deletions

View File

@@ -3047,6 +3047,7 @@ class ReticulumMeshChat:
"is_mic_muted": self.telephone_manager.telephone.transmit_muted,
"is_speaker_muted": self.telephone_manager.telephone.receive_muted,
"is_voicemail": self.voicemail_manager.is_recording,
"call_start_time": self.telephone_manager.call_start_time,
}
return web.json_response(

View File

@@ -6,6 +6,15 @@ from LXST import Telephone
class TelephoneManager:
# LXST Status Constants for reference:
# 0: STATUS_BUSY
# 1: STATUS_REJECTED
# 2: STATUS_CALLING
# 3: STATUS_AVAILABLE
# 4: STATUS_RINGING
# 5: STATUS_CONNECTING
# 6: STATUS_ESTABLISHED
def __init__(self, identity: RNS.Identity, config_manager=None):
self.identity = identity
self.config_manager = config_manager

View File

@@ -213,7 +213,7 @@ class VoicemailManager:
and telephone.active_call
and telephone.active_call.get_remote_identity().hash
== caller_identity.hash
and telephone.call_status == LXST.Signalling.STATUS_RINGING
and telephone.call_status == 4 # Ringing
):
RNS.log(
f"Auto-answering call from {RNS.prettyhexrep(caller_identity.hash)} for voicemail",