Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time delay and callback VP call #376

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion telephony/outcall_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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']))
Expand Down