Browse Source
Merge pull request #49 from morty29/8.0
use missed opportunity to detect number
pull/136/merge
Pedro M. Baeza
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
0 deletions
-
asterisk_click2dial/asterisk_click2dial.py
|
|
@ -253,6 +253,13 @@ class asterisk_server(orm.Model): |
|
|
|
_logger.debug("Found a matching Event in 'Ring' state") |
|
|
|
calling_party_number = chan.get('CallerIDNum') |
|
|
|
break |
|
|
|
# Compatibility with Asterisk 1.4 |
|
|
|
if ( |
|
|
|
chan.get('State') == 'Ringing' and |
|
|
|
chan.get('ConnectedLineNum') == user.internal_number): |
|
|
|
_logger.debug("Found a matching Event in 'Ring' state") |
|
|
|
calling_party_number = chan.get('CallerIDNum') |
|
|
|
break |
|
|
|
# 6 = Up |
|
|
|
if ( |
|
|
|
chan.get('ChannelState') == '6' and |
|
|
|