Commit a2ddad34 authored by okhin's avatar okhin 🚴

Fixing some logging systems which where unnamed

parent bbd86c2f
......@@ -315,7 +315,7 @@ class Call(object):
channel = ari.Channel(config['asterisk'], self.id + '-' + sanitize_phonenumber(self.callee))
channel.originate(endpoint)
except AssertionError as e:
logging.error("Received a DTMF sequence out le being in a '{}' state, ignoring: {}".format(self.state(), event['digit']))
phone_logger.error("Received a DTMF sequence out le being in a '{}' state, ignoring: {}".format(self.state(), event['digit']))
def change(self, event):
'''
......@@ -340,11 +340,11 @@ class Call(object):
# Call is being picked up, we want to play a song
try:
channel = ari.Channel(config['asterisk'], event['channel']['id'])
logging.debug('Preparing to create a playback')
phone_logger.debug('Preparing to create a playback')
# We're starting a playback, with the same ID as the channel, to keep track of it
channel.playback(channel.name, config['asterisk']['playback'])
except Exception as e:
logging.exception(e)
phone_logger.exception(e)
raise e
def call_caller(self, event):
......@@ -361,7 +361,7 @@ class Call(object):
moh_bridge.status()
except HTTPError as e:
# The bridge dos not exist
logging.error("The Hold bridges does not exists")
phone_logger.error("The Hold bridges does not exists")
raise e
# Now, let's create the channel
......@@ -370,7 +370,7 @@ class Call(object):
channel = ari.Channel(config['asterisk'], self.id + '-' + sanitize_phonenumber(self.caller))
channel.originate()
except Exception as e:
logging.exception(e)
phone_logger.exception(e)
raise e
def save(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment