Fixed integer errors and added more logging
This commit is contained in:
@@ -30,8 +30,8 @@ voip_service = VoIPFileStreamService(client, receive_calls=False)
|
|||||||
|
|
||||||
REQUEST_URL = os.environ.get("REQUEST_URL")
|
REQUEST_URL = os.environ.get("REQUEST_URL")
|
||||||
|
|
||||||
RING_WAIT_TIME = os.environ.get("RING_WAIT_TIME")
|
RING_WAIT_TIME = int(os.environ.get("RING_WAIT_TIME"))
|
||||||
MAX_CALL_DURATION = os.environ.get("MAX_CALL_DURATION")
|
MAX_CALL_DURATION = int(os.environ.get("MAX_CALL_DURATION"))
|
||||||
|
|
||||||
def get_audio_duration(audio_name):
|
def get_audio_duration(audio_name):
|
||||||
logging.info(f"Getting audio duration for {audio_name}")
|
logging.info(f"Getting audio duration for {audio_name}")
|
||||||
@@ -88,7 +88,8 @@ async def main(user, message_text, audio):
|
|||||||
logging.info("Finishing call because of duration")
|
logging.info("Finishing call because of duration")
|
||||||
await call.discard_call()
|
await call.discard_call()
|
||||||
break
|
break
|
||||||
except:
|
except Exception as e:
|
||||||
|
logging.error(f"There was an error during the call: {e}")
|
||||||
break
|
break
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
|||||||
Reference in New Issue
Block a user