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
parent
commit
5f3c655ee9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      asterisk_click2dial/asterisk_click2dial.py

7
asterisk_click2dial/asterisk_click2dial.py

@ -253,6 +253,13 @@ class asterisk_server(orm.Model):
_logger.debug("Found a matching Event in 'Ring' state") _logger.debug("Found a matching Event in 'Ring' state")
calling_party_number = chan.get('CallerIDNum') calling_party_number = chan.get('CallerIDNum')
break 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 # 6 = Up
if ( if (
chan.get('ChannelState') == '6' and chan.get('ChannelState') == '6' and

Loading…
Cancel
Save