diff --git a/src/plivo/rest/freeswitch/elements.py b/src/plivo/rest/freeswitch/elements.py index 419b92b8..455579cd 100644 --- a/src/plivo/rest/freeswitch/elements.py +++ b/src/plivo/rest/freeswitch/elements.py @@ -731,10 +731,7 @@ def _prepare_play_string(self, outbound_socket, remote_url): def create_number(self, number_instance, outbound_socket): num_gw = [] - # skip number object without gateway or number - if not number_instance.gateways: - outbound_socket.log.error("Gateway not defined on Number object !") - return '' + # skip number object without number if not number_instance.number: outbound_socket.log.error("Number not defined on Number object !") return '' @@ -1238,6 +1235,8 @@ def parse_element(self, element, uri=None): if gateways: # get list of gateways self.gateways = gateways.split(',') + else: + self.gateways = [""] # split gw codecs by , but only outside the '' if gateway_codecs: self.gateway_codecs = \