Audio condition updated to yes/no
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user