Commit cd400f3b authored by okhin's avatar okhin
Browse files

Raising the exception for not in a bridge yet on hangup at the correct place

parent a99b6082
Pipeline #797 passed with stage
in 2 seconds
......@@ -286,6 +286,7 @@ class Call(object):
bridge_id = '-'.join(event['channel']['id'].split('-')[:-1])
bridge = ari.Bridge(config['asterisk'], bridge_id, 'mixed')
results = json.loads(bridge.status())
# Not in a bridge yet. Our channel has been destroyed.
# That or we're in moh.
......@@ -295,7 +296,6 @@ class Call(object):
, event['timestamp']))
results = json.loads(bridge.status())
if len(results['channels']) == 0:
# We were the last channel standing'Deleting bridge {}'.format(bridge_id))
Supports Markdown
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