From 15b1e86725b623d7e8fdb199dc7bf8cccbdb4864 Mon Sep 17 00:00:00 2001 From: Carlos Correia Date: Wed, 20 Nov 2019 09:48:52 +0000 Subject: [PATCH] time delay and callback VP call --- telephony/outcall_action.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/telephony/outcall_action.py b/telephony/outcall_action.py index e5e9962..edd1ab2 100644 --- a/telephony/outcall_action.py +++ b/telephony/outcall_action.py @@ -7,7 +7,7 @@ from rootio.radio.models import Person from telephony.prompt_engine import PromptEngine from .utils.audio import PlayStatus - +import time class PhoneStatus: REJECTING = 1 @@ -230,6 +230,7 @@ def notify_incoming_dtmf(self, dtmf_info): if self.__phone_status != PhoneStatus.WAKE: self.__phone_status = PhoneStatus.WAKE self.__prompt_engine.play_prompt(self.__prompt_engine.ENTERING_WAKE_MODE, self.__call_handler, self.__available_calls[self.__host.phone.raw_number]['Channel-Call-UUID']) + time.sleep(5) self.hangup_call() else: self.__phone_status = PhoneStatus.REJECTING @@ -323,6 +324,8 @@ def notify_incoming_call(self, call_info): self.__interested_participants.add(call_info['Caller-ANI']) self.__prompt_engine.play_prompt(self.__prompt_engine.INCOMING_CALL_QUEUED, self.__call_handler, self.__available_calls[self.__host.phone.raw_number]['Channel-Call-UUID']) + self.__prompt_engine.play_prompt(self.__prompt_engine.CALL_BACK_NOTIFICATION, self.__call_handler, call_info['Channel-Call-UUID']) + time.sleep(5) self.__call_handler.hangup(call_info['Channel-Call-UUID']) self.program.log_program_activity( "Call from community caller {0} was queued".format(call_info['Caller-Destination-Number']))