Audio condition updated to yes/no

This commit is contained in:
2023-08-06 08:24:44 +00:00
parent 9d69a11888
commit 1276f64c40

View File

@@ -66,8 +66,11 @@ async def main(user, message_text, audio):
logging.info(f"Calling {user}")
call = await voip_service.start_call(user)
await client.send_message(user, message_text)
if audio:
try:
if audio == 'yes':
call.play(f"/data/audio/{audio_name}.raw")
except Exception as e:
logging.error(f"Error: {e}")
call_has_ended = False
@call.on_call_state_changed