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
ca12224f
Commit
ca12224f
authored
Jan 25, 2017
by
okhin
Browse files
Let's get rid of cause_txt
parent
7ac2cdff
Pipeline
#793
passed with stage
in 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
piphone.py
View file @
ca12224f
...
...
@@ -292,7 +292,6 @@ class Call(object):
phone_logger
.
info
(
'Channel destroyed {}'
.
format
(
event
[
'channel'
][
'id'
]))
self
.
update
((
':'
.
join
([
event
[
'channel'
][
'state'
]
,
event
[
'channel'
][
'id'
].
split
(
'-'
)[
-
1
]]
,
event
[
'cause_txt'
])
,
event
[
'timestamp'
]))
return
...
...
@@ -342,7 +341,6 @@ class Call(object):
# First we need to check if it's really a change ie, if the new state is not the previous one
self
.
update
((
':'
.
join
([
event
[
'channel'
][
'state'
]
,
event
[
'channel'
][
'id'
].
split
(
'-'
)[
-
1
]]
,
event
[
'cause_txt'
])
,
event
[
'timestamp'
],))
phone_logger
.
info
(
"New state for call {}: {}"
.
format
(
event
[
'channel'
][
'id'
],
event
[
'channel'
][
'state'
]))
# We now need to take action according to our new state
...
...
@@ -378,7 +376,6 @@ class Call(object):
'''
self
.
update
((
':'
.
join
([
event
[
'type'
]
,
event
[
'channel'
][
'id'
].
split
(
'-'
)[
-
1
]]
,
event
[
'cause_txt'
])
,
event
[
'timestamp'
],))
# We want to check if the moh bridge is opened
moh_bridge
=
ari
.
Bridge
(
config
[
'asterisk'
],
config
[
'moh'
][
'name'
],
'holding'
)
...
...
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