From 3f5715cb91ab536df35f8bdf1de8d75c764f2963 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 29 Dec 2010 12:53:43 +0100 Subject: [PATCH] Add a group "Asterisk CallerID" decidated to the CallerID name lookup feature Update module description. --- asterisk_click2dial/__terp__.py | 11 +++++++++++ asterisk_click2dial/scripts/get_cid_name.py | 4 ++-- .../security/asterisk_server_security.xml | 19 ++++++++++++++++--- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/asterisk_click2dial/__terp__.py b/asterisk_click2dial/__terp__.py index 5361583..130105b 100644 --- a/asterisk_click2dial/__terp__.py +++ b/asterisk_click2dial/__terp__.py @@ -35,6 +35,17 @@ Here is how it works : 4) Asterisk dials the phone number found in OpenERP in place of the user. 5) If the remote party answers, the user can talk to his correspondent. +This module also adds the ability to show the name of the calling party on incoming phone calls if the presented +phone number is present in the Partner addresses of OpenERP. + +Here is how it works : +1) On incoming phone calls, the Asterisk dialplan executes an AGI "get_cid_name_timeout.sh". +2) The "get_cid_name_timeout.sh" script calls the "get_cid_name.py" script with a short timeout. +3) The "get_cid_name.py" script will make an XML-RPC request on the OpenERP server to try to find the name + of the person corresponding to the phone number presented by the calling party. +4) If it finds the name, it is add as CallerID name of the call, so as to be presented on the IP phone + of the user. + A detailed documentation for this module is available on the Akretion Web site : http://www.akretion.com/en/blog/2010/09/23/akretion-and-anevia-present-the-asterisk_click2dial-module-unleash-your-asterisk-phones-in-openerp/""", 'author': 'Alexis de Lattre', 'website': 'http://www.akretion.com/', diff --git a/asterisk_click2dial/scripts/get_cid_name.py b/asterisk_click2dial/scripts/get_cid_name.py index e8b9a66..9992ef9 100755 --- a/asterisk_click2dial/scripts/get_cid_name.py +++ b/asterisk_click2dial/scripts/get_cid_name.py @@ -32,8 +32,8 @@ exten => _0141981242,n,Hangup() It's probably a good idea to create a user in OpenERP dedicated to this task. - This user only needs read access on the 'res.partner.address' object. - + This user only needs to be part of the group "Asterisk CallerID", which has + read access on the 'res.partner.address' object, nothing more. """ __author__ = "Alexis de Lattre " diff --git a/asterisk_click2dial/security/asterisk_server_security.xml b/asterisk_click2dial/security/asterisk_server_security.xml index 9b7daa9..5869798 100644 --- a/asterisk_click2dial/security/asterisk_server_security.xml +++ b/asterisk_click2dial/security/asterisk_server_security.xml @@ -3,13 +3,12 @@ Asterisk Click2dial module for OpenERP Copyright (C) 2010 Alexis de Lattre The licence is in the file __terp__.py - - Default access rules for the new asterisk.server object --> + @@ -18,7 +17,6 @@ - @@ -31,6 +29,21 @@ + + + Asterisk CallerID + + + + + + + + + + + +