Skip to content
Browse files

Remove certain condition checks which may not be true,

Fix bug of bulk call
  • Loading branch information...
1 parent db00775 commit 4b376da455c75b51af60a6b5b8c4a7bd75b1b527 bevenky committed May 19, 2011
Showing with 5 additions and 11 deletions.
  1. +5 −11 src/plivo/rest/freeswitch/rest_api.py
View
16 src/plivo/rest/freeswitch/rest_api.py
@@ -323,14 +323,8 @@ def bulk_calls(self):
if len(to_str_list) < 2:
msg = "BulkCall should be used for atleast 2 numbers"
- elif len(to_str_list) != len(gw_str_list) or \
- len(to_str_list) != len(gw_codecs_str_list) or \
- len(to_str_list) != len(gw_timeouts_str_list) or \
- len(to_str_list) != len(gw_retries_str_list) or \
- len(to_str_list) != len(send_digits_list) or \
- len(to_str_list) != len(time_limit_list) or \
- len(to_str_list) != len(hangup_on_ring_list):
- msg = "'To' parameter length, not same as other Parameters"
+ elif len(to_str_list) != len(gw_str_list):
+ msg = "'To' parameter length does not match 'GW' Length"
else:
for to in to_str_list:
try:
@@ -367,9 +361,9 @@ def bulk_calls(self):
i += 1
request_uuid_list.append(request_uuid)
- self._rest_inbound_socket.bulk_originate(request_uuid_list)
- msg = "Bulk Call Requests Executed"
- result = True
+ self._rest_inbound_socket.bulk_originate(request_uuid_list)
+ msg = "Bulk Call Requests Executed"
+ result = True
return flask.jsonify(Success=result, Message=msg,
RequestUUID=str(request_uuid_list))

0 comments on commit 4b376da

Please sign in to comment.
Something went wrong with that request. Please try again.