From 89aea17fe9e2ad23e32c1a9bfaacae36cbfbaf35 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 26 Nov 2012 16:12:26 +0100 Subject: [PATCH] Add some exclusion on CallerID for which we don't query openerp or try to geolocate. --- asterisk_click2dial/scripts/get_cid_name.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asterisk_click2dial/scripts/get_cid_name.py b/asterisk_click2dial/scripts/get_cid_name.py index b774cf8..d850f68 100755 --- a/asterisk_click2dial/scripts/get_cid_name.py +++ b/asterisk_click2dial/scripts/get_cid_name.py @@ -168,7 +168,7 @@ def main(options, arguments): # If we already have a "True" caller ID name # i.e. not just digits, but a real name, then we don't try to # connect to OpenERP or geoloc, we just keep it - if stdinput.get('agi_calleridname') and not stdinput.get('agi_calleridname').isdigit(): + if stdinput.get('agi_calleridname') and not stdinput.get('agi_calleridname').isdigit() and stdinput.get('agi_calleridname').lower() not in ['asterisk', 'unknown', 'anonymous']: stdout_write('VERBOSE "Incoming CallerID name is %s"\n' % stdinput.get('agi_calleridname')) stdout_write('VERBOSE "As it is a real name, we do not change it"\n') return True