Browse Source

Add a group "Asterisk CallerID" decidated to the CallerID name lookup feature

Update module description.
6.0
Alexis de Lattre 14 years ago
parent
commit
3f5715cb91
  1. 11
      asterisk_click2dial/__terp__.py
  2. 4
      asterisk_click2dial/scripts/get_cid_name.py
  3. 19
      asterisk_click2dial/security/asterisk_server_security.xml

11
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/',

4
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 <alexis.delattre@akretion.com>"

19
asterisk_click2dial/security/asterisk_server_security.xml

@ -3,13 +3,12 @@
Asterisk Click2dial module for OpenERP
Copyright (C) 2010 Alexis de Lattre <alexis@via.ecp.fr>
The licence is in the file __terp__.py
Default access rules for the new asterisk.server object
-->
<openerp>
<data noupdate="1">
<!-- Default access rules for the new asterisk.server object -->
<record id="ir_model_access_asterisk_server_user" model="ir.model.access">
<field name="model_id" ref="asterisk_click2dial.model_asterisk_server"/>
<field name="name" eval="&quot;&quot;&quot;asterisk.server_user&quot;&quot;&quot;" />
@ -18,7 +17,6 @@
<field name="perm_write" eval="0"/>
<field name="perm_unlink" eval="0"/>
<field name="perm_create" eval="0"/>
</record>
<record id="ir_model_access_asterisk_server_system" model="ir.model.access">
@ -31,6 +29,21 @@
<field name="perm_create" eval="1"/>
</record>
<!-- New group dedicated to the "Get CallerID name from OpenERP" feature -->
<record id="group_asterisk_cid" model="res.groups">
<field name="name">Asterisk CallerID</field>
</record>
<!-- Only add the minimum rights to the "Asterisk CallerID" group -->
<record id="ir_model_access_asterisk_cid" model="ir.model.access">
<field name="model_id" ref="base.model_res_partner_address"/>
<field name="name" eval="&quot;&quot;&quot;res.partner.address_read&quot;&quot;&quot;"/>
<field name="group_id" ref="asterisk_click2dial.group_asterisk_cid"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="0"/>
<field name="perm_unlink" eval="0"/>
<field name="perm_create" eval="0"/>
</record>
</data>
</openerp>
Loading…
Cancel
Save