Browse Source

Ability to avoid the 'Not found in Odoo' as callerID name when phone is not found

pull/9/head
Alexis de Lattre 10 years ago
parent
commit
fd88d89996
  1. 14
      asterisk_click2dial/scripts/set_name_agi.py

14
asterisk_click2dial/scripts/set_name_agi.py

@ -103,8 +103,9 @@ from optparse import OptionParser
# Name that will be displayed if there is no match
# and no geolocalisation
not_found_name = "Not in OpenERP"
# and no geolocalisation. Set it to False if you don't want
# to have a 'not_found_name' when nothing is found
not_found_name = "Not in Odoo"
# Define command line options
options = [
@ -353,10 +354,11 @@ def main(options, arguments):
res = convert_to_ascii(res)
stdout_write('VERBOSE "Name = %s"\n' % res)
if options.outgoing:
stdout_write('SET VARIABLE connectedlinename "%s"\n' % res)
else:
stdout_write('SET CALLERID "%s"<%s>\n' % (res, phone_number))
if res:
if options.outgoing:
stdout_write('SET VARIABLE connectedlinename "%s"\n' % res)
else:
stdout_write('SET CALLERID "%s"<%s>\n' % (res, phone_number))
return True
if __name__ == '__main__':

Loading…
Cancel
Save