Force hangup call on exception to avoid potential infinite loop problem

This commit is contained in:
Benjamin Renard 2020-02-12 11:42:31 +01:00 committed by root
parent 1b83b247df
commit 52fd855b61

View file

@ -315,9 +315,11 @@ try:
except agi.AGIAppError as e:
logging.info('An AGI error stop script : %s' % e)
clean_tmp()
sys.exit(0)
hangup(asterisk_agi)
sys.exit(1)
except Exception as e:
logging.error(traceback.format_exc())
set_return(None)
clean_tmp()
hangup(asterisk_agi)
sys.exit(1)