Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
piphone
piphone-sip
Commits
cd400f3b
Commit
cd400f3b
authored
Jan 25, 2017
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
piphone.py
View file @
cd400f3b
...
...
@@ -286,6 +286,7 @@ class Call(object):
bridge_id
=
'-'
.
join
(
event
[
'channel'
][
'id'
].
split
(
'-'
)[:
-
1
])
try
:
bridge
=
ari
.
Bridge
(
config
[
'asterisk'
],
bridge_id
,
'mixed'
)
results
=
json
.
loads
(
bridge
.
status
())
except
:
# 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'
]))
return
results
=
json
.
loads
(
bridge
.
status
())
if
len
(
results
[
'channels'
])
==
0
:
# We were the last channel standing
phone_logger
.
info
(
'Deleting bridge {}'
.
format
(
bridge_id
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment