|
@ -255,15 +255,15 @@ class asterisk_server(orm.Model): |
|
|
break |
|
|
break |
|
|
# 6 = Up |
|
|
# 6 = Up |
|
|
if ( |
|
|
if ( |
|
|
chan.get('ChannelState') == '6' |
|
|
|
|
|
and sip_account in chan.get('BridgedChannel', '')): |
|
|
|
|
|
|
|
|
chan.get('ChannelState') == '6' and |
|
|
|
|
|
sip_account in chan.get('BridgedChannel', '')): |
|
|
_logger.debug("Found a matching Event in 'Up' state") |
|
|
_logger.debug("Found a matching Event in 'Up' state") |
|
|
calling_party_number = chan.get('CallerIDNum') |
|
|
calling_party_number = chan.get('CallerIDNum') |
|
|
break |
|
|
break |
|
|
# Compatibility with Asterisk 1.4 |
|
|
# Compatibility with Asterisk 1.4 |
|
|
if ( |
|
|
if ( |
|
|
chan.get('State') == 'Up' |
|
|
|
|
|
and sip_account in chan.get('Link', '')): |
|
|
|
|
|
|
|
|
chan.get('State') == 'Up' and |
|
|
|
|
|
sip_account in chan.get('Link', '')): |
|
|
_logger.debug("Found a matching Event in 'Up' state") |
|
|
_logger.debug("Found a matching Event in 'Up' state") |
|
|
calling_party_number = chan.get('CallerIDNum') |
|
|
calling_party_number = chan.get('CallerIDNum') |
|
|
break |
|
|
break |
|
|