Skip to content
GitLab
Menu
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
a2ddad34
Commit
a2ddad34
authored
May 12, 2016
by
okhin
Browse files
Fixing some logging systems which where unnamed
parent
bbd86c2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
piphone.py
View file @
a2ddad34
...
...
@@ -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
:
logg
ing
.
error
(
"Received a DTMF sequence out le being in a '{}' state, ignoring: {}"
.
format
(
self
.
state
(),
event
[
'digit'
]))
phone_
logg
er
.
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'
])
logg
ing
.
debug
(
'Preparing to create a playback'
)
phone_
logg
er
.
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
:
logg
ing
.
exception
(
e
)
phone_
logg
er
.
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
logg
ing
.
error
(
"The Hold bridges does not exists"
)
phone_
logg
er
.
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
:
logg
ing
.
exception
(
e
)
phone_
logg
er
.
exception
(
e
)
raise
e
def
save
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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