Skip to content

Commit

Permalink
issue plivo#110
Browse files Browse the repository at this point in the history
  • Loading branch information
evghenin committed Jan 2, 2014
1 parent 56d8148 commit e9e46bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/plivo/rest/freeswitch/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1888,6 +1888,8 @@ def schedule_play(self):
[Mix]: 'true'|'false'. Mix with current audio stream (default 'true')
[Delimiter]: The delimiter used in the sounds list (default: ',')
Returns a scheduled task with id SchedPlayId that you can use to cancel play.
"""
self._rest_inbound_socket.log.debug("RESTAPI SchedulePlay with %s" \
Expand All @@ -1902,6 +1904,7 @@ def schedule_play(self):
length = get_post_param(request, 'Length')
loop = get_post_param(request, 'Loop') == 'true'
mix = get_post_param(request, 'Mix')
delimiter = get_post_param(request, 'Delimiter')
if mix == 'false':
mix = False
else:
Expand Down Expand Up @@ -1938,7 +1941,9 @@ def schedule_play(self):
msg = "Length Parameter must be a positive integer"
return self.send_response(Success=result, Message=msg)

sounds_list = sounds.split(',')
if not delimiter: delimiter = ','

sounds_list = sounds.split(delimiter)
if not sounds_list:
msg = "Sounds Parameter is Invalid"
return self.send_response(Success=result, Message=msg)
Expand Down

0 comments on commit e9e46bd

Please sign in to comment.