Skip to content

Commit

Permalink
added wait time param in MPC XML flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Abinaya-Shunmugavel committed Feb 23, 2024
1 parent 564a5f1 commit eecfec1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
15 changes: 15 additions & 0 deletions plivo/xml/MultiPartyCallElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,18 @@ def set_wait_music_method(self, wait_music_method):
self.wait_music_method = wait_music_method
return self

@property
def wait_time(self):
return self.__wait_time

@wait_time.setter
def wait_time(self, wait_time):
self.__wait_time = wait_time

def set_wait_time(self, wait_time):
self.wait_time = wait_time
return self

@property
def agent_hold_music_url(self):
return self.__agent_hold_music_url
Expand Down Expand Up @@ -543,6 +555,7 @@ def __init__(
record_min_member_count=1,
wait_music_url=None,
wait_music_method='GET',
wait_time=5,
agent_hold_music_url=None,
agent_hold_music_method='GET',
customer_hold_music_url=None,
Expand Down Expand Up @@ -585,6 +598,7 @@ def __init__(
self.record_min_member_count = record_min_member_count
self.wait_music_url = wait_music_url
self.wait_music_method = wait_music_method
self.wait_time = wait_time
self.agent_hold_music_url = agent_hold_music_url
self.agent_hold_music_method = agent_hold_music_method
self.customer_hold_music_url = customer_hold_music_url
Expand Down Expand Up @@ -619,6 +633,7 @@ def to_dict(self):
'recordMinMemberCount': self.record_min_member_count,
'waitMusicUrl': self.wait_music_url,
'waitMusicMethod': self.wait_music_method,
'waitTime': self.wait_time,
'agentHoldMusicUrl': self.agent_hold_music_url,
'agentHoldMusicMethod': self.agent_hold_music_method,
'customerHoldMusicUrl': self.customer_hold_music_url,
Expand Down
2 changes: 2 additions & 0 deletions plivo/xml/ResponseElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ def add_multi_party_call(self,
max_participants=10,
wait_music_url=None,
wait_music_method="GET",
wait_time=5,
agent_hold_music_url=None,
agent_hold_music_method='GET',
customer_hold_music_url=None,
Expand Down Expand Up @@ -371,6 +372,7 @@ def add_multi_party_call(self,
max_participants=max_participants,
wait_music_url=wait_music_url,
wait_music_method=wait_music_method,
wait_time=wait_time,
agent_hold_music_url=agent_hold_music_url,
agent_hold_music_method=agent_hold_music_method,
customer_hold_music_url=customer_hold_music_url,
Expand Down
3 changes: 2 additions & 1 deletion tests/xml/test_responseElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,14 @@ def test_add_mpc(self):
'stopRecordingAudio="https://plivo.com/plivoTone.mp3" ' \
'stopRecordingAudioMethod="GET" ' \
'waitMusicMethod="POST" ' \
'waitTime="5" ' \
'waitMusicUrl="https://plivo.com/plivoTone.mp3">multi party conference</MultiPartyCall>' \
'</Response>'

elem = plivoxml.ResponseElement().add_multi_party_call(content='multi party conference', role='customer',
max_duration=20000, max_participants=7,
wait_music_url='https://plivo.com/plivoTone.mp3',
wait_music_method='POST', start_mpc_on_enter=True,
wait_music_method='POST', wait_time=5, start_mpc_on_enter=True,
record=True, record_file_format='wav', mute=True,
enter_sound='beep:2', exit_sound='beep:1', hold=True,
on_exit_action_url='https://plivo.com/exitAction',
Expand Down

0 comments on commit eecfec1

Please sign in to comment.