You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear Support Team,
I'm writing to report an issue with the call status monitoring functionality. We've identified a problem where the call status continues to show as "active" even after the call has been terminated from the other end.
Issue Details:
During outbound calls, we periodically check the call status
When the status changes to "active", we initiate call recording as expected
However, even after the call is terminated, the status continues to return "active"
This causes the recording to continue unnecessarily
Log Evidence:
10:25:08,079 [INFO] Periodic check (1/12): Call status = ringing
10:25:13,079 [INFO] Periodic check (2/12): Call status = ringing
10:25:18,080 [INFO] Periodic check (3/12): Call status = active
10:25:18,080 [INFO] ⏰ Periodic check found active call, starting recording
Code Example:
async def check_and_start_recording_if_needed(recorder, participant: rtc.RemoteParticipant, delay_seconds):
"""
Check if recording has started after a specified delay,
and start it only if certain conditions are met.
"""
await asyncio.sleep(delay_seconds)
logger.info("Checking if recording has started...")
# Check if recording has already started
if not recorder.is_recording():
logger.info("Recording not started after delay, checking SIP call status")
# Check SIP status
if hasattr(participant, 'attributes'):
call_status = participant.attributes.get("sip.callStatus")
logger.info(f"Current SIP call status: {call_status}")
if call_status == "active":
logger.info("SIP call is active, starting recording")
await recorder.force_start_recording()
elif call_status == "ringing":
logger.info("SIP call is still ringing, will wait for active status")
# Set up a task to check again after a few seconds
asyncio.create_task(recheck_call_status(recorder, participant, 5))
else:
logger.warning(f"SIP call status is '{call_status}', not starting recording yet")
else:
logger.warning("Participant has no attributes, cannot determine call status")
async def recheck_call_status(recorder, participant, delay_seconds):
"""
Recheck the call status after a delay and potentially start recording.
"""
await asyncio.sleep(delay_seconds)
if hasattr(participant, 'attributes'):
call_status = participant.attributes.get("sip.callStatus")
logger.info(f"Rechecking SIP call status: {call_status}")
if call_status == "active" and not recorder.is_recording():
logger.info("SIP call became active on recheck, starting recording")
await recorder.force_start_recording()
elif call_status == "ringing" and not recorder.is_recording():
# Still ringing, check again later
asyncio.create_task(recheck_call_status(recorder, participant, 5))
else:
logger.warning("Participant has no attributes on recheck, cannot determine call status")
This behavior leads to extended recordings and potential resource inefficiency. We would appreciate your assistance in resolving this issue so that call status accurately reflects when a call has ended.
Please let me know if you need any additional information or logs to help diagnose this problem.
Thank you for your assistance.
Regards,
Şevval İLHAN
The text was updated successfully, but these errors were encountered:
Dear Support Team,
I'm writing to report an issue with the call status monitoring functionality. We've identified a problem where the call status continues to show as "active" even after the call has been terminated from the other end.
Issue Details:
During outbound calls, we periodically check the call status
When the status changes to "active", we initiate call recording as expected
However, even after the call is terminated, the status continues to return "active"
This causes the recording to continue unnecessarily
Log Evidence:
Code Example:
This behavior leads to extended recordings and potential resource inefficiency. We would appreciate your assistance in resolving this issue so that call status accurately reflects when a call has ended.
Please let me know if you need any additional information or logs to help diagnose this problem.
Thank you for your assistance.
Regards,
Şevval İLHAN
The text was updated successfully, but these errors were encountered: