feat(call): add call start time to response and update call status handling in voicemail manager
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user