From d062934f7a070aaea87b8a504d1b7394819669f4 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 22 Sep 2010 21:42:48 +0200 Subject: [PATCH 001/187] Initial import. Long life to the asterisk_click2dial module for OpenERP ! --- asterisk_click2dial/__init__.py | 23 ++ asterisk_click2dial/__terp__.py | 48 +++ asterisk_click2dial/asterisk_click2dial.py | 276 +++++++++++++++ .../asterisk_click2dial_demo.xml | 26 ++ asterisk_click2dial/asterisk_server_view.xml | 64 ++++ .../i18n/asterisk_click2dial.pot | 334 ++++++++++++++++++ asterisk_click2dial/i18n/fr_FR.po | 328 +++++++++++++++++ asterisk_click2dial/res_partner_view.xml | 83 +++++ asterisk_click2dial/res_users_view.xml | 21 ++ .../security/asterisk_server_security.xml | 29 ++ 10 files changed, 1232 insertions(+) create mode 100644 asterisk_click2dial/__init__.py create mode 100644 asterisk_click2dial/__terp__.py create mode 100644 asterisk_click2dial/asterisk_click2dial.py create mode 100644 asterisk_click2dial/asterisk_click2dial_demo.xml create mode 100644 asterisk_click2dial/asterisk_server_view.xml create mode 100644 asterisk_click2dial/i18n/asterisk_click2dial.pot create mode 100644 asterisk_click2dial/i18n/fr_FR.po create mode 100644 asterisk_click2dial/res_partner_view.xml create mode 100644 asterisk_click2dial/res_users_view.xml create mode 100644 asterisk_click2dial/security/asterisk_server_security.xml diff --git a/asterisk_click2dial/__init__.py b/asterisk_click2dial/__init__.py new file mode 100644 index 000000000..78eea66bc --- /dev/null +++ b/asterisk_click2dial/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Asterisk Click2Dial module for OpenERP +# Copyright (C) 2010 Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import asterisk_click2dial + diff --git a/asterisk_click2dial/__terp__.py b/asterisk_click2dial/__terp__.py new file mode 100644 index 000000000..079523bef --- /dev/null +++ b/asterisk_click2dial/__terp__.py @@ -0,0 +1,48 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Asterisk Click2dial module for OpenERP +# Copyright (C) 2010 Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + + +{ + 'name': 'Asterisk Click2dial', + 'version': '0.1', + 'category': 'Generic Modules/Others', + 'license': 'AGPL-3', + 'description': """This module adds a 'dial' button in the partner address +view so that users can directly dial a phone number through Asterisk. This feature is usually known as 'click2dial'. + +Here is how it works : +1) In OpenERP, the user clicks on the 'dial' button next to a phone number field in the Partner address view. +2) Asterisk makes the user's phone ring. +3) The user answers his own phone (if he doesn't, the process stops here). +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. + +Documentation for this module is available on the Akretion Web site : http://www.akretion.com/""", + 'author': 'Alexis de Lattre', + 'website': 'http://www.akretion.com/', + 'depends': ['base'], + 'init_xml': [], + 'update_xml': ['asterisk_server_view.xml', 'res_users_view.xml', 'res_partner_view.xml', 'security/asterisk_server_security.xml'], + 'demo_xml': ['asterisk_click2dial_demo.xml'], + 'installable': True, + 'active': False, +} + diff --git a/asterisk_click2dial/asterisk_click2dial.py b/asterisk_click2dial/asterisk_click2dial.py new file mode 100644 index 000000000..42b0f496f --- /dev/null +++ b/asterisk_click2dial/asterisk_click2dial.py @@ -0,0 +1,276 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Asterisk Click2dial module for OpenERP +# Copyright (C) 2010 Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +# TODO list : +# Wait time don't seem to be taken into account + +from osv import osv, fields +# Lib required to open a socket towards Asterisk +import socket +# Lib required to print logs +import netsvc + +class asterisk_server(osv.osv): + _name = "asterisk.server" + _description = "Asterisk Servers" + _columns = { + 'name' : fields.char('Asterisk server name', size=50, required=True, help="Asterisk server name."), + 'ip_address' : fields.char('Asterisk IP addr. or DNS', size=50, required=True, help="IPv4 address or DNS name of the Asterisk server."), + 'port' : fields.integer('Port', required=True, help="TCP port on which the Asterisk Manager Interface listens. Defined in /etc/asterisk/manager.conf on Asterisk."), + 'out_prefix' : fields.char('Out prefix', size=4, help="Prefix to dial to place outgoing calls. If you don't use a prefix to place outgoing calls, leave empty."), + 'national_prefix' : fields.char('National prefix', size=4, help="Prefix for national phone calls (don't include the 'out prefix'). For e.g., in France, the phone numbers look like '01 41 98 12 42' : the National prefix is '0'."), + 'international_prefix' : fields.char('International prefix', size=4, help="Prefix to add to make international phone calls (don't include the 'out prefix'). For e.g., in France, the International prefix is '00'."), + 'country_prefix' : fields.char('My country prefix', size=4, help="Phone prefix of the country where the Asterisk server is located. For e.g. the phone prefix for France is '33'. If the phone number to dial starts with the 'My country prefix', OpenERP will remove the country prefix from the phone number and add the 'out prefix' followed by the 'national prefix'. If the phone number to dial doesn't start with the 'My country prefix', OpenERP will add the 'out prefix' followed by the 'international prefix'."), + 'login' : fields.char('AMI login', size=30, required=True, help="Login that OpenERP will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server."), + 'password' : fields.char('AMI password', size=30, required=True, help="Password that Asterisk will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server."), + 'context' : fields.char('Dialplan context', size=50, required=True, help="Asterisk dialplan context from which the calls will be made. Refer to /etc/asterisk/extensions.conf on your Asterisk server."), + 'wait_time' : fields.integer('Wait time (sec)', required=True, help="Amount of time (in seconds) Asterisk will try to reach the user's phone before hanging up."), + 'extension_priority' : fields.integer('Extension priority', required=True, help="Priority of the extension in the Asterisk dialplan. Refer to /etc/asterisk/extensions.conf on your Asterisk server."), + 'alert-info' : fields.char('Alert-Info SIP header', size=40, help="Set Alert-Info header in SIP request to user's IP Phone. If empty, the Alert-Info header will not be added. You can use it to have a special ring tone for click2dial, for example you could choose a silent ring tone."), + 'company_id' : fields.many2one('res.company', 'Company', help="Company who uses the Asterisk server."), + } + + _defaults = { + 'port': lambda *a: 5038, # Default AMI port + 'out_prefix': lambda *a: '0', + 'national_prefix': lambda *a: '0', + 'international_prefix': lambda *a: '00', + 'extension_priority': lambda *a: 1, + 'wait_time': lambda *a: 15, + } + + def _only_digits(self, cr, uid, ids, prefix, can_be_empty): + for i in ids: + prefix_to_check = self.read(cr, uid, i, [prefix])[prefix] + if prefix_to_check == False: + if can_be_empty: + return True + else: + return False + else: + if not prefix_to_check.isdigit(): + return False + return True + + def _only_digits_out_prefix(self, cr, uid, ids): + return self._only_digits(cr, uid, ids, 'out_prefix', True) + + def _only_digits_country_prefix(self, cr, uid, ids): + return self._only_digits(cr, uid, ids, 'country_prefix', False) + + def _only_digits_national_prefix(self, cr, uid, ids): + return self._only_digits(cr, uid, ids, 'national_prefix', True) + + def _only_digits_international_prefix(self, cr, uid, ids): + return self._only_digits(cr, uid, ids, 'international_prefix', False) + + def _check_wait_time(self, cr, uid, ids): + for i in ids: + wait_time_to_check = self.read(cr, uid, i, ['wait_time'])['wait_time'] + if wait_time_to_check < 1 or wait_time_to_check > 120: + return False + return True + + def _check_extension_priority(self, cr, uid, ids): + for i in ids: + extension_priority_to_check = self.read(cr, uid, i, ['extension_priority'])['extension_priority'] + if extension_priority_to_check < 1: + return False + return True + + def _check_port(self, cr, uid, ids): + for i in ids: + port_to_check = self.read(cr, uid, i, ['port'])['port'] + if port_to_check > 65535 or port_to_check < 1: + return False + return True + + # TODO : is it possible to read the field name inside the constraint + # function in order to avoid using as many functions as fields to + # check prefix ? + _constraints = [ + (_only_digits_out_prefix, "Only use digits for the 'out prefix' or leave empty", ['out_prefix']), + (_only_digits_country_prefix, "Only use digits for the 'country prefix'", ['country_prefix']), + (_only_digits_national_prefix, "Only use digits for the 'national prefix' or leave empty", ['national_prefix']), + (_only_digits_international_prefix, "Only use digits for 'international prefix'", ['international_prefix']), + (_check_wait_time, "You should enter a 'Wait time' value between 1 and 120 seconds", ['wait_time']), + (_check_extension_priority, "The 'extension priority' must be a positive value", ['extension_priority']), + (_check_port, 'TCP ports range from 1 to 65535', ['port']), + ] + + # This function is dedicated to the transformation of the number + # available in OpenERP to the number that Asterisk should dial. + # You may have to inherit this function in another module specific + # for your company if you are not happy with the way I reformat + # the OpenERP numbers. + def reformat_number(self, cr, uid, ids, erp_number, ast_server, context): + logger = netsvc.Logger() + invalid_format_msg = "The phone number is not written in valid international format. Example of valid international format : +33 1 41 98 12 42" + + # Let's call the variable tmp_number now + tmp_number = erp_number + logger.notifyChannel('asterisk_click2dial', netsvc.LOG_DEBUG, 'Number before reformat = ' + tmp_number) + + # First, we remove all stupid caracters and spaces + try: + for i in [' ', '.', '(', ')', '[', ']', '-', '/']: + tmp_number = tmp_number.replace(i, '') + except: + raise osv.except_osv('Invalid phone number', invalid_format_msg) + + # Remove the starting '+' of the number + if tmp_number[0]=='+': + tmp_number = tmp_number.replace('+','') + logger.notifyChannel('asterisk_click2dial', netsvc.LOG_DEBUG, 'Number after removal of special char = ' + tmp_number) + else: + raise osv.except_osv('Invalid phone number', invalid_format_msg) + + # At this stage, 'tmp_number' should only contain digits + if not tmp_number.isdigit(): + raise osv.except_osv('Invalid phone number', invalid_format_msg) + + # Before starting to use prefix, we convert empty prefix whose value + # is False to an empty string + country_prefix = (ast_server.country_prefix or '') + national_prefix = (ast_server.national_prefix or '') + international_prefix = (ast_server.international_prefix or '') + out_prefix = (ast_server.out_prefix or '') + + logger.notifyChannel('asterisk_click2dial', netsvc.LOG_DEBUG, 'Country prefix = ' + country_prefix) + if country_prefix == tmp_number[0:len(country_prefix)]: + # If the number is a national number, + # remove 'my country prefix' and add 'national prefix' + tmp_number = (national_prefix) + tmp_number[len(country_prefix):len(tmp_number)] + logger.notifyChannel('asterisk_click2dial', netsvc.LOG_DEBUG, 'National prefix = ' + national_prefix + ' - Number with national prefix = ' + tmp_number) + + else: + # If the number is an international number, + # add 'international prefix' + tmp_number = international_prefix + tmp_number + logger.notifyChannel('asterisk_click2dial', netsvc.LOG_DEBUG, 'International prefix = ' + international_prefix + ' - Number with international prefix = ' + tmp_number) + + # Add 'out prefix' to all numbers - Caution : out prefix can be False + tmp_number = out_prefix + tmp_number + logger.notifyChannel('asterisk_click2dial', netsvc.LOG_DEBUG, 'Out prefix = ' + out_prefix) + logger.notifyChannel('asterisk_click2dial', netsvc.LOG_DEBUG, 'Number that will be sent to Asterisk = ' + tmp_number) + return tmp_number + + # Open the socket to the Asterisk Manager Interface + # and send instructions to Dial to Asterisk + def dial(self, cr, uid, ids, erp_number, context): + logger = netsvc.Logger() + user = self.pool.get('res.users').browse(cr, uid, uid, context=context) + + # Check if the number to dial is not empty + if not erp_number: + raise osv.except_osv('Error', 'There is no phone number !') + + # We check if the user has an Asterisk server configured + if not user.asterisk_server_id.id: + raise osv.except_osv('No Asterisk server configured for the current user', "You must associate an Asterisk server to the current user.") + else: + ast_server = user.asterisk_server_id + + # We check if the current user has a chan type + if not user.asterisk_chan_type: + raise osv.except_osv('No channel type configured for the current user', "You must configure an Asterisk channel type for the current user.") + + # We check if the current user has an internal number + if not user.internal_number: + raise osv.except_osv('No internal phone number configured for the current user', "You must configure an internal phone number for the current user.") + + # Convert the phone number in the format that will be sent to Asterisk + ast_number = self.reformat_number(cr, uid, ids, erp_number, ast_server, context=context) + logger.notifyChannel('asterisk_click2dial', netsvc.LOG_DEBUG, 'User dialing : channel = ' + user.asterisk_chan_type + '/' + user.internal_number + ' - Callerid = ' + user.callerid) + logger.notifyChannel('asterisk_click2dial', netsvc.LOG_DEBUG, 'Asterisk server = ' + ast_server.ip_address + ':' + str(ast_server.port)) + + # Connect to the Asterisk Manager Interface + try: + ast_ip = socket.gethostbyname(str(ast_server.ip_address)) + except: + raise osv.except_osv('Wrong DNS', "Can't resolve the DNS name of the Asterisk server.") + try: + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.connect((ast_ip, ast_server.port)) + sock.send('Action: login\r\n') + sock.send('Events: off\r\n') + sock.send('Username: '+str(ast_server.login)+'\r\n') + sock.send('Secret: '+str(ast_server.password)+'\r\n\r\n') + sock.send('Action: originate\r\n') + sock.send('Channel: ' + str(user.asterisk_chan_type) + '/' + str(user.internal_number)+'\r\n') + sock.send('WaitTime: '+str(ast_server.wait_time)+'\r\n') + sock.send('CallerId: '+str(user.callerid)+'\r\n') + sock.send('Exten: '+str(ast_number)+'\r\n') + sock.send('Context: '+str(ast_server.context)+'\r\n') + if not ast_server.alert-info and user.asterisk_chan_type == 'SIP': + sock.send('Variable: SIPAddHeader=Alert-Info: '+str(ast_server.alert-info)+'\r\n') + sock.send('Priority: '+str(ast_server.extension_priority)+'\r\n\r\n') + sock.send('Action: Logoff\r\n\r\n') + sock.close() + except: + logger.notifyChannel('asterisk_click2dial', netsvc.LOG_WARNING, "Click2dial failed : unable to connect to Asterisk") + raise osv.except_osv('Asterisk server unreachable', "The connection from OpenERP to the Asterisk server failed. Please check the configuration on OpenERP and on Asterisk.") + logger.notifyChannel('asterisk_click2dial', netsvc.LOG_INFO, "Asterisk Click2Dial from " + user.internal_number + ' to ' + ast_number) + +asterisk_server() + + +class res_users(osv.osv): + _name = "res.users" + _inherit = "res.users" + _columns = { + 'internal_number' : fields.char('Internal number', size=15, help="User's internal phone number."), + 'callerid' : fields.char('Caller ID', size=50, help="Caller ID used for the calls initiated by this user."), + 'asterisk_chan_type' : fields.selection([('SIP', 'SIP'), ('IAX2', 'IAX2'), ('DAHDI', 'DAHDI'), ('Zap', 'Zap'), ('Skinny', 'Skinny'), ('MGCP', 'MGCP'), ('mISDN', 'mISDN'), ('H323', 'H323')], 'Asterisk channel type', help="Asterisk channel type, as used in the Asterisk dialplan. If the user has a regular IP phone, the channel type is 'SIP'."), + 'asterisk_server_id' : fields.many2one('asterisk.server', 'Asterisk server', help="Asterisk server on which the user's phone is connected."), + } + + _defaults = { + 'asterisk_chan_type': lambda *a: 'SIP', + } + +res_users() + + +class res_partner_address(osv.osv): + _name = "res.partner.address" + _inherit ="res.partner.address" + + # Functions called by the button "Dial" in the partner address view + def action_dial_phone(self, cr, uid, ids, context): + erp_number = self.read(cr, uid, ids, ['phone'], context=context)[0]['phone'] + self.pool.get('asterisk.server').dial(cr, uid, ids, erp_number, context) + + def action_dial_mobile(self, cr, uid, ids, context): + erp_number = self.read(cr, uid, ids, ['mobile'], context=context)[0]['mobile'] + self.pool.get('asterisk.server').dial(cr, uid, ids, erp_number, context) + +res_partner_address() + + +class res_company(osv.osv): + _name = "res.company" + _inherit = "res.company" + _columns = { + 'asterisk_server_ids' : fields.one2many('asterisk.server', 'company_id', 'Asterisk servers', help="List of Asterisk servers.") + } + +res_company() diff --git a/asterisk_click2dial/asterisk_click2dial_demo.xml b/asterisk_click2dial/asterisk_click2dial_demo.xml new file mode 100644 index 000000000..619f6f08b --- /dev/null +++ b/asterisk_click2dial/asterisk_click2dial_demo.xml @@ -0,0 +1,26 @@ + + + + + Akretion Asterisk IPBX + asterisk.akretion.com + 33 + click2dial + mypassword + from-internal + info=<Bellcore-dr5> + + + + 11 + Administrator <0141981242> + + + + 12 + Demo user <0141984212> + + + + + diff --git a/asterisk_click2dial/asterisk_server_view.xml b/asterisk_click2dial/asterisk_server_view.xml new file mode 100644 index 000000000..92c775f1b --- /dev/null +++ b/asterisk_click2dial/asterisk_server_view.xml @@ -0,0 +1,64 @@ + + + + + + asterisk.server.company + res.company + + + + + + + + + + + + + asterisk.server.form + asterisk.server + form + +
+ + + + + + + + + + + + + + + +
+ + + asterisk.server.tree + asterisk.server + tree + + + + + + + + + + + + Asterisk Servers + asterisk.server + form + tree,form + + +
+
diff --git a/asterisk_click2dial/i18n/asterisk_click2dial.pot b/asterisk_click2dial/i18n/asterisk_click2dial.pot new file mode 100644 index 000000000..8ae13cbf8 --- /dev/null +++ b/asterisk_click2dial/i18n/asterisk_click2dial.pot @@ -0,0 +1,334 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * asterisk_click2dial +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 5.0.14\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2010-09-10 20:38:35+0000\n" +"PO-Revision-Date: 2010-09-10 20:38:35+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "The 'extension priority' must be a positive value" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,password:0 +msgid "AMI password" +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "SIP" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,international_prefix:0 +msgid "International prefix" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,ip_address:0 +msgid "IPv4 address or DNS name of the Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "mISDN" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:ir.model:0 +msgid "The Object name must start with x_ and not contain any special character !" +msgstr "" + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Dial" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'country prefix'" +msgstr "" + +#. module: asterisk_click2dial +#: field:res.users,asterisk_server_id:0 +msgid "Asterisk server" +msgstr "" + +#. module: asterisk_click2dial +#: help:res.users,asterisk_server_id:0 +msgid "Asterisk server on which the user's phone is connected." +msgstr "" + +#. module: asterisk_click2dial +#: model:ir.actions.act_window,name:asterisk_click2dial.action_asterisk_server +#: model:ir.model,name:asterisk_click2dial.model_asterisk_server +msgid "Asterisk Servers" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:ir.actions.act_window:0 +msgid "Invalid model name in the action definition." +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "DAHDI" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,extension_priority:0 +msgid "Priority of the extension in the Asterisk dialplan. Refer to /etc/asterisk/extensions.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: field:res.users,callerid:0 +msgid "Caller ID" +msgstr "" + +#. module: asterisk_click2dial +#: model:ir.module.module,description:asterisk_click2dial.module_meta_information +msgid "The module adds dial button in partner address\n" +"so that you can directly dial a phone number through Asterisk.\n" +"Documentation is available on the Arkretion Web site http://[TODO]" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,name:0 +msgid "Asterisk server name." +msgstr "" + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Mobile : " +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,login:0 +msgid "AMI login" +msgstr "" + +#. module: asterisk_click2dial +#: view:res.company:0 +msgid "Asterisk servers for click2dial" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,wait_time:0 +msgid "Wait time (sec)" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,context:0 +msgid "Dialplan context" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,extension_priority:0 +msgid "Extension priority" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,company_id:0 +msgid "Company" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,country_prefix:0 +msgid "Phone prefix of the country where the Asterisk server is located. For e.g. the phone prefix for France is '33'. If the phone number to dial starts with the 'My country prefix', OpenERP will remove the country prefix from the phone number and add the 'out prefix' followed by the 'national prefix'. If the phone number to dial doesn't start with the 'My country prefix', OpenERP will add the 'out prefix' followed by the 'international prefix'." +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,out_prefix:0 +msgid "Prefix to dial to place outgoing calls. If you don't use a prefix to place outgoing calls, leave empty." +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "Zap" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,context:0 +msgid "Asterisk dialplan context from which the calls will be made. Refer to /etc/asterisk/extensions.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: help:res.users,callerid:0 +msgid "Caller ID used for the calls initiated by this user." +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "IAX2" +msgstr "" + +#. module: asterisk_click2dial +#: view:res.company:0 +msgid "IPBX" +msgstr "" + +#. module: asterisk_click2dial +#: model:ir.module.module,shortdesc:asterisk_click2dial.module_meta_information +msgid "Asterisk Click2dial" +msgstr "" + +#. module: asterisk_click2dial +#: help:res.company,asterisk_server_ids:0 +msgid "List of Asterisk servers." +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "MGCP" +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "Skinny" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:ir.ui.view:0 +msgid "Invalid XML for View Architecture!" +msgstr "" + +#. module: asterisk_click2dial +#: help:res.users,internal_number:0 +msgid "User's internal phone number." +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,national_prefix:0 +msgid "Prefix for national phone calls (don't include the 'out prefix'). For e.g., in France, the phone numbers look like '01 41 98 12 42' : the National prefix is '0'." +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,port:0 +msgid "TCP port on which the Asterisk Manager Interface listens. Defined in /etc/asterisk/manager.conf on Asterisk." +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,international_prefix:0 +msgid "Prefix to add to make international phone calls (don't include the 'out prefix'). For e.g., in France, the International prefix is '00'." +msgstr "" + +#. module: asterisk_click2dial +#: field:res.users,internal_number:0 +msgid "Internal number" +msgstr "" + +#. module: asterisk_click2dial +#: field:res.users,asterisk_chan_type:0 +msgid "Asterisk channel type" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,out_prefix:0 +msgid "Out prefix" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "TCP ports range from 1 to 65535" +msgstr "" + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Phone : " +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,company_id:0 +msgid "Company who uses the Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'out prefix' or leave empty" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,ip_address:0 +msgid "Asterisk IP addr. or DNS" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,password:0 +msgid "Password that Asterisk will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for 'international prefix'" +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "H323" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,national_prefix:0 +msgid "National prefix" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,country_prefix:0 +msgid "My country prefix" +msgstr "" + +#. module: asterisk_click2dial +#: view:asterisk.server:0 +#: field:res.company,asterisk_server_ids:0 +msgid "Asterisk servers" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,login:0 +msgid "Login that OpenERP will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,name:0 +msgid "Asterisk server name" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,wait_time:0 +msgid "Amount of time (in seconds) Asterisk will try to reach the user's phone before hanging up." +msgstr "" + +#. module: asterisk_click2dial +#: help:res.users,asterisk_chan_type:0 +msgid "Asterisk channel type, as used in the Asterisk dialplan. If the user has a regular IP phone, the channel type is 'SIP'." +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'national prefix' or leave empty" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,port:0 +msgid "Port" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "You should enter a 'Wait time' value between 1 and 120 seconds" +msgstr "" + diff --git a/asterisk_click2dial/i18n/fr_FR.po b/asterisk_click2dial/i18n/fr_FR.po new file mode 100644 index 000000000..cf76b630e --- /dev/null +++ b/asterisk_click2dial/i18n/fr_FR.po @@ -0,0 +1,328 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * asterisk_click2dial +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 5.0.14\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2010-09-10 20:15:08+0000\n" +"PO-Revision-Date: 2010-09-10 20:15:08+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "The 'extension priority' must be a positive value" +msgstr "La priorité de l'extension doit être une valeur positive" + +#. module: asterisk_click2dial +#: field:asterisk.server,password:0 +msgid "AMI password" +msgstr "Mot de passe AMI" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "SIP" +msgstr "SIP" + +#. module: asterisk_click2dial +#: field:asterisk.server,international_prefix:0 +msgid "International prefix" +msgstr "Préfixe international" + +#. module: asterisk_click2dial +#: help:asterisk.server,ip_address:0 +msgid "IPv4 address or DNS name of the Asterisk server." +msgstr "Adresse IPv4 ou nom DNS du serveur Asterisk." + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "mISDN" +msgstr "mISDN" + +#. module: asterisk_click2dial +#: constraint:ir.model:0 +msgid "The Object name must start with x_ and not contain any special character !" +msgstr "Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères spéciaux !" + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Dial" +msgstr "Appeler" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'country prefix'" +msgstr "N'utiliser que des chiffres pour le préfixe du pays" + +#. module: asterisk_click2dial +#: field:res.users,asterisk_server_id:0 +msgid "Asterisk server" +msgstr "Serveur Asterisk" + +#. module: asterisk_click2dial +#: help:res.users,asterisk_server_id:0 +msgid "Asterisk server on which the user's phone is connected." +msgstr "Serveur Asterisk sur lequel le téléphone de l'utilisateur est connecté." + +#. module: asterisk_click2dial +#: model:ir.actions.act_window,name:asterisk_click2dial.action_asterisk_server +#: model:ir.model,name:asterisk_click2dial.model_asterisk_server +msgid "Asterisk Servers" +msgstr "Serveurs Asterisk" + +#. module: asterisk_click2dial +#: constraint:ir.actions.act_window:0 +msgid "Invalid model name in the action definition." +msgstr "Invalid model name in the action definition." + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "DAHDI" +msgstr "DAHDI" + +#. module: asterisk_click2dial +#: help:asterisk.server,extension_priority:0 +msgid "Priority of the extension in the Asterisk dialplan. Refer to /etc/asterisk/extensions.conf on your Asterisk server." +msgstr "Priorité de l'extension dans le dialplan d'Asterisk. Cf /etc/asterisk/extensions.conf sur le serveur Asterisk." + +#. module: asterisk_click2dial +#: field:res.users,callerid:0 +msgid "Caller ID" +msgstr "Identification de l'appelant" + +#. module: asterisk_click2dial +#: help:asterisk.server,name:0 +msgid "Asterisk server name." +msgstr "Nom du serveur Asterisk." + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Mobile : " +msgstr "Portable : " + +#. module: asterisk_click2dial +#: field:asterisk.server,login:0 +msgid "AMI login" +msgstr "Nom d'utilisateur AMI" + +#. module: asterisk_click2dial +#: view:res.company:0 +msgid "Asterisk servers for click2dial" +msgstr "Serveurs Asterisk pour le click2dial" + +#. module: asterisk_click2dial +#: field:asterisk.server,wait_time:0 +msgid "Wait time (sec)" +msgstr "Temps d'attente (sec)" + +#. module: asterisk_click2dial +#: field:asterisk.server,context:0 +msgid "Dialplan context" +msgstr "Contexte du dialplan" + +#. module: asterisk_click2dial +#: field:asterisk.server,extension_priority:0 +msgid "Extension priority" +msgstr "Priorité de l'extension" + +#. module: asterisk_click2dial +#: field:asterisk.server,company_id:0 +msgid "Company" +msgstr "Société" + +#. module: asterisk_click2dial +#: help:asterisk.server,country_prefix:0 +msgid "Phone prefix of the country where the Asterisk server is located. For e.g. the phone prefix for France is '33'. If the phone number to dial starts with the 'My country prefix', OpenERP will remove the country prefix from the phone number and add the 'out prefix' followed by the 'national prefix'. If the phone number to dial doesn't start with the 'My country prefix', OpenERP will add the 'out prefix' followed by the 'international prefix'." +msgstr "Préfixe téléphonique du pays dans lequel est situé le serveur Asterisk. Par exemple, le préfixe téléphonique de la France est '33'. Si le numéro de téléphone à appeler commence par le préfixe du pays, OpenERP supprimera ce préfixe du numéro de téléphone à composer et ajoutera le préfixe pour l'extérieur suivi par le préfixe national. Si le numéro de téléphone à appeler ne commence pas par le préfixe du pays, OpenERP ajoutera le préfixe pour l'extérieur suivi par le préfixe international." + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "Skinny" +msgstr "Skinny" + +#. module: asterisk_click2dial +#: help:asterisk.server,context:0 +msgid "Asterisk dialplan context from which the calls will be made. Refer to /etc/asterisk/extensions.conf on your Asterisk server." +msgstr "Contexte du dialplan d'Asterisk depuis lequel les appels seront initiés. Cf /etc/asterisk/extensions.conf sur le serveur Asterisk." + +#. module: asterisk_click2dial +#: help:res.users,callerid:0 +msgid "Caller ID used for the calls initiated by this user." +msgstr "'Caller ID' des appels passés par l'utilisateur." + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "IAX2" +msgstr "IAX2" + +#. module: asterisk_click2dial +#: view:res.company:0 +msgid "IPBX" +msgstr "IPBX" + +#. module: asterisk_click2dial +#: model:ir.module.module,shortdesc:asterisk_click2dial.module_meta_information +msgid "Asterisk Click2dial" +msgstr "Asterisk Click2dial" + +#. module: asterisk_click2dial +#: help:res.company,asterisk_server_ids:0 +msgid "List of Asterisk servers." +msgstr "Liste des serveurs Asterisk." + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "MGCP" +msgstr "MGCP" + +#. module: asterisk_click2dial +#: constraint:ir.ui.view:0 +msgid "Invalid XML for View Architecture!" +msgstr "XML non valide pour l'architecture de la vue" + +#. module: asterisk_click2dial +#: help:res.users,internal_number:0 +msgid "User's internal phone number." +msgstr "Numéro de téléphone interne de l'utilisateur." + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "You should enter a 'Wait time' value between 1 and 120 seconds" +msgstr "Vous devez entrer un temps d'attente compris entre 1 et 120 secondes" + +#. module: asterisk_click2dial +#: help:asterisk.server,port:0 +msgid "TCP port on which the Asterisk Manager Interface listens. Defined in /etc/asterisk/manager.conf on Asterisk." +msgstr "Port TCP sur lequel écoute l'interface du Manager Asterisk. Cf /etc/asterisk/manager.conf sur le serveur Asterisk." + +#. module: asterisk_click2dial +#: help:asterisk.server,international_prefix:0 +msgid "Prefix to add to make international phone calls (don't include the 'out prefix'). For e.g., in France, the International prefix is '00'." +msgstr "Préfixe à ajouter pour passer des appels vers l'étranger (ne pas inclure le préfixe pour l'extérieur). Par exemple, en France, le préfixe pour l'international est '00'." + +#. module: asterisk_click2dial +#: help:asterisk.server,national_prefix:0 +msgid "Prefix for national phone calls (don't include the 'out prefix'). For e.g., in France, the phone numbers look like '01 41 98 12 42' : the National prefix is '0'." +msgstr "Préfixe pour les appels nationaux (ne pas inclure le préfixe pour l'extérieur). Par exemple, en France, les numéros de téléphone sont du type '01 41 98 12 42' ; le préfixe national est '0'." + + +#. module: asterisk_click2dial +#: field:res.users,internal_number:0 +msgid "Internal number" +msgstr "Numéro interne" + +#. module: asterisk_click2dial +#: field:res.users,asterisk_chan_type:0 +msgid "Asterisk channel type" +msgstr "Type de canal Asterisk" + +#. module: asterisk_click2dial +#: field:asterisk.server,out_prefix:0 +msgid "Out prefix" +msgstr "Préfixe pour l'extérieur" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "TCP ports range from 1 to 65535" +msgstr "Les ports TCP vont de 1 à 65535" + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Phone : " +msgstr "Téléphone : " + +#. module: asterisk_click2dial +#: help:asterisk.server,company_id:0 +msgid "Company who uses the Asterisk server." +msgstr "Société qui utilise le serveur Asterisk." + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'out prefix' or leave empty" +msgstr "N'utiliser que des chiffres pour le préfixe pour appeler vers l'extérieur ou laisser vide" + +#. module: asterisk_click2dial +#: field:asterisk.server,ip_address:0 +msgid "Asterisk IP addr. or DNS" +msgstr "Adr. IP ou DNS d'Asterisk" + +#. module: asterisk_click2dial +#: help:asterisk.server,password:0 +msgid "Password that Asterisk will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." +msgstr "Password that Asterisk will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." + +#. module: asterisk_click2dial +#: help:asterisk.server,out_prefix:0 +msgid "Prefix to dial to place outgoing calls. If you don't use a prefix to place outgoing calls, leave empty." +msgstr "Préfixe à composer pour appeler vers l'extérieur. Si vous n'avez pas à composer un préfixe pour appeler vers l'extérieur, laissez vide." + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for 'international prefix'" +msgstr "N'utiliser que des chiffres pour le préfixe international" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "H323" +msgstr "H323" + +#. module: asterisk_click2dial +#: field:asterisk.server,national_prefix:0 +msgid "National prefix" +msgstr "Préfixe national" + +#. module: asterisk_click2dial +#: field:asterisk.server,country_prefix:0 +msgid "My country prefix" +msgstr "Préfixe du pays" + +#. module: asterisk_click2dial +#: view:asterisk.server:0 +#: field:res.company,asterisk_server_ids:0 +msgid "Asterisk servers" +msgstr "Serveurs Asterisk" + +#. module: asterisk_click2dial +#: help:asterisk.server,login:0 +msgid "Login that OpenERP will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." +msgstr "Nom d'utilisateur qu'OpenERP utilisera pour communiquer avec l'interface du Manager d'Asterisk. Cf /etc/asterisk/manager.conf sur le serveur Asterisk." + +#. module: asterisk_click2dial +#: field:asterisk.server,name:0 +msgid "Asterisk server name" +msgstr "Nom du serveur Asterisk" + +#. module: asterisk_click2dial +#: help:asterisk.server,wait_time:0 +msgid "Amount of time (in seconds) Asterisk will try to reach the user's phone before hanging up." +msgstr "Temps (en secondes) pendant lequel Asterisk essayera de joindre le téléphone de l'utilisateur avant d'abandonner." + +#. module: asterisk_click2dial +#: help:res.users,asterisk_chan_type:0 +msgid "Asterisk channel type, as used in the Asterisk dialplan. If the user has a regular IP phone, the channel type is 'SIP'." +msgstr "Type de canal Asterisk, tel qu'utilisé dans le dialplan d'Asterisk. Si l'utilisateur a un téléphone IP classique, le type de canal est 'SIP'." + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'national prefix' or leave empty" +msgstr "N'utiliser que des chiffres pour le préfixe national ou laisser vide" + +#. module: asterisk_click2dial +#: field:asterisk.server,port:0 +msgid "Port" +msgstr "Port" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "Zap" +msgstr "Zap" + diff --git a/asterisk_click2dial/res_partner_view.xml b/asterisk_click2dial/res_partner_view.xml new file mode 100644 index 000000000..4b1cefa9b --- /dev/null +++ b/asterisk_click2dial/res_partner_view.xml @@ -0,0 +1,83 @@ + + + + + + res.partner.address.inherit.form1 + res.partner.address + form + + + + + diff --git a/asterisk_click2dial/wizard/__init__.py b/asterisk_click2dial/controller.py similarity index 65% rename from asterisk_click2dial/wizard/__init__.py rename to asterisk_click2dial/controller.py index 92ca19bee..b48c66f48 100644 --- a/asterisk_click2dial/wizard/__init__.py +++ b/asterisk_click2dial/controller.py @@ -1,8 +1,8 @@ -# -*- coding: utf-8 -*- +# -*- encoding: utf-8 -*- ############################################################################## # -# Asterisk Click2Dial module for OpenERP -# Copyright (C) 2012-2014 Alexis de Lattre +# Asterisk click2dial module for OpenERP +# Copyright (C) 2014 Alexis de Lattre (alexis@via.ecp.fr) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -19,4 +19,13 @@ # ############################################################################## -from . import open_calling_partner +import openerp + + +class AsteriskClick2dialController(openerp.addons.web.http.Controller): + _cp_path = '/asterisk_click2dial' + + @openerp.addons.web.http.jsonrequest + def get_record_from_my_channel(self, req): + res = req.session.model('asterisk.server').get_record_from_my_channel() + return res diff --git a/asterisk_click2dial/i18n/asterisk_click2dial.pot b/asterisk_click2dial/i18n/asterisk_click2dial.pot index f4212cd2f..04861aed7 100644 --- a/asterisk_click2dial/i18n/asterisk_click2dial.pot +++ b/asterisk_click2dial/i18n/asterisk_click2dial.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 7.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-08-21 16:21+0000\n" -"PO-Revision-Date: 2014-08-21 16:21+0000\n" +"POT-Creation-Date: 2014-08-25 21:42+0000\n" +"PO-Revision-Date: 2014-08-25 21:42+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -17,12 +17,12 @@ msgstr "" #. module: asterisk_click2dial #: field:asterisk.server,login:0 -msgid "AMI login" +msgid "AMI Login" msgstr "" #. module: asterisk_click2dial #: field:asterisk.server,password:0 -msgid "AMI password" +msgid "AMI Password" msgstr "" #. module: asterisk_click2dial @@ -32,7 +32,7 @@ msgstr "" #. module: asterisk_click2dial #: field:asterisk.server,alert_info:0 -msgid "Alert-Info SIP header" +msgid "Alert-Info SIP Header" msgstr "" #. module: asterisk_click2dial @@ -45,9 +45,14 @@ msgstr "" msgid "Asterisk CallerID" msgstr "" +#. module: asterisk_click2dial +#: field:res.users,asterisk_chan_type:0 +msgid "Asterisk Channel Type" +msgstr "" + #. module: asterisk_click2dial #: field:asterisk.server,ip_address:0 -msgid "Asterisk IP addr. or DNS" +msgid "Asterisk IP address or DNS" msgstr "" #. module: asterisk_click2dial @@ -55,6 +60,16 @@ msgstr "" msgid "Asterisk Manager Interface" msgstr "" +#. module: asterisk_click2dial +#: field:res.users,asterisk_server_id:0 +msgid "Asterisk Server" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,name:0 +msgid "Asterisk Server Name" +msgstr "" + #. module: asterisk_click2dial #: view:asterisk.server:0 msgid "Asterisk Server Search" @@ -68,11 +83,6 @@ msgstr "" msgid "Asterisk Servers" msgstr "" -#. module: asterisk_click2dial -#: field:res.users,asterisk_chan_type:0 -msgid "Asterisk channel type" -msgstr "" - #. module: asterisk_click2dial #: help:res.users,asterisk_chan_type:0 msgid "Asterisk channel type, as used in the Asterisk dialplan. If the user has a regular IP phone, the channel type is 'SIP'." @@ -84,23 +94,15 @@ msgid "Asterisk dialplan context from which the calls will be made. Refer to /et msgstr "" #. module: asterisk_click2dial -#: field:res.users,asterisk_server_id:0 -msgid "Asterisk server" -msgstr "" - -#. module: asterisk_click2dial -#: field:asterisk.server,name:0 -msgid "Asterisk server name" -msgstr "" - -#. module: asterisk_click2dial -#: help:asterisk.server,name:0 -msgid "Asterisk server name." +#: help:res.users,asterisk_server_id:0 +msgid "Asterisk server on which the user's phone is connected. If you leave this field empty, it will use the first Asterisk server of the user's company." msgstr "" #. module: asterisk_click2dial -#: help:res.users,asterisk_server_id:0 -msgid "Asterisk server on which the user's phone is connected. If you leave this field empty, it will use the first Asterisk server of the user's company." +#. openerp-web +#: code:addons/asterisk_click2dial/static/src/js/asterisk_click2dial.js:26 +#, python-format +msgid "BIG PB" msgstr "" #. module: asterisk_click2dial @@ -114,7 +116,9 @@ msgid "Call Detail Record (CDR) account used for billing this user." msgstr "" #. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:405 #: field:res.users,callerid:0 +#, python-format msgid "Caller ID" msgstr "" @@ -124,24 +128,19 @@ msgid "Caller ID used for the calls initiated by this user." msgstr "" #. module: asterisk_click2dial -#: field:wizard.open.calling.partner,calling_number:0 -msgid "Calling number" +#: field:number.not.found,calling_number:0 +msgid "Calling Number" msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:288 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:310 #, python-format msgid "Can't get calling number from Asterisk.\n" "Here is the error: '%s'" msgstr "" #. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Cancel" -msgstr "" - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:395 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:481 #, python-format msgid "Click to dial with Asterisk failed.\n" "Here is the error: '%s'" @@ -163,72 +162,30 @@ msgid "Company who uses the Asterisk server." msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:248 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:255 #, python-format msgid "Connection Test Failed!" msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:257 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:264 #, python-format msgid "Connection Test Successfull!" msgstr "" -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/wizard/open_calling_partner.py:82 -#, python-format -msgid "Could not get the calling number from Asterisk. Is your phone ringing or are you currently on the phone ? If yes, check your setup and look at the OpenERP debug logs." -msgstr "" - -#. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Create a new partner" -msgstr "" - -#. module: asterisk_click2dial -#: field:wizard.open.calling.partner,current_mobile:0 -msgid "Current mobile" -msgstr "" - -#. module: asterisk_click2dial -#: field:wizard.open.calling.partner,current_phone:0 -msgid "Current phone" -msgstr "" - #. module: asterisk_click2dial #: selection:res.users,asterisk_chan_type:0 msgid "DAHDI" msgstr "" #. module: asterisk_click2dial -#: view:asterisk.server:0 -msgid "Dialplan Parameters" +#: field:asterisk.server,context:0 +msgid "Dialplan Context" msgstr "" #. module: asterisk_click2dial -#: field:asterisk.server,context:0 -msgid "Dialplan context" -msgstr "" - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:88 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:90 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:92 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:94 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:100 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:198 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:217 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:221 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:233 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:288 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:346 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:369 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:395 -#: code:addons/asterisk_click2dial/wizard/open_calling_partner.py:81 -#: code:addons/asterisk_click2dial/wizard/open_calling_partner.py:95 -#: code:addons/asterisk_click2dial/wizard/open_calling_partner.py:189 -#, python-format -msgid "Error :" +#: view:asterisk.server:0 +msgid "Dialplan Parameters" msgstr "" #. module: asterisk_click2dial @@ -238,14 +195,34 @@ msgid "Error message in raise" msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:360 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:109 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:114 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:119 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:124 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:133 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:191 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:212 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:218 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:238 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:308 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:413 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:432 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:444 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:480 #, python-format msgid "Error:" msgstr "" #. module: asterisk_click2dial #: field:asterisk.server,extension_priority:0 -msgid "Extension priority" +msgid "Extension Priority" +msgstr "" + +#. module: asterisk_click2dial +#. openerp-web +#: code:addons/asterisk_click2dial/static/src/js/asterisk_click2dial.js:25 +#, python-format +msgid "Fail" msgstr "" #. module: asterisk_click2dial @@ -254,7 +231,7 @@ msgid "H323" msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:249 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:256 #, python-format msgid "Here is the error message: %s" msgstr "" @@ -270,19 +247,10 @@ msgid "IP address or DNS name of the Asterisk server." msgstr "" #. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:404 #: field:res.users,internal_number:0 -msgid "Internal number" -msgstr "" - -#. module: asterisk_click2dial -#: field:asterisk.server,international_prefix:0 -msgid "International prefix" -msgstr "" - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:118 #, python-format -msgid "Invalid phone number" +msgid "Internal Number" msgstr "" #. module: asterisk_click2dial @@ -301,98 +269,74 @@ msgid "MGCP" msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:361 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:433 #, python-format msgid "Missing phone number" msgstr "" #. module: asterisk_click2dial -#: field:asterisk.server,country_prefix:0 -msgid "My country prefix" -msgstr "" - -#. module: asterisk_click2dial -#: field:asterisk.server,national_prefix:0 -msgid "National prefix" -msgstr "" - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:198 +#. openerp-web +#: code:addons/asterisk_click2dial/static/src/js/asterisk_click2dial.js:45 #, python-format -msgid "No Asterisk server configured for the company '%s'." +msgid "Moving to %s ID %d" msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:410 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:192 #, python-format -msgid "No Partner Found" +msgid "No Asterisk server configured for the company '%s'." msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:369 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:445 #, python-format msgid "No callerID configured for the current user" msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:217 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:213 #, python-format msgid "No channel type configured for the current user." msgstr "" #. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "No partner found in OpenERP with this number" -msgstr "" - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:221 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:219 #, python-format msgid "No resource name configured for the current user" msgstr "" -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:88 -#, python-format -msgid "Only use digits for the '%s' on the Asterisk server '%s'" -msgstr "" - #. module: asterisk_click2dial #. openerp-web -#: code:addons/asterisk_click2dial/static/src/js/asterisk_click2dial.js:20 -#: code:addons/asterisk_click2dial/static/src/xml/asterisk_click2dial.xml:13 +#: code:addons/asterisk_click2dial/static/src/js/asterisk_click2dial.js:31 #, python-format -msgid "Open Calling Partner" -msgstr "" - -#. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Open Parent Partner form" +msgid "Number Not Found" msgstr "" #. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Open Partner form" +#: model:ir.model,name:asterisk_click2dial.model_number_not_found +msgid "Number not found" msgstr "" #. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Open Related Invoices" +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:111 +#, python-format +msgid "Only use digits for the '%s' on the Asterisk server '%s'" msgstr "" #. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Open Related Sale Orders" +#. openerp-web +#: code:addons/asterisk_click2dial/static/src/xml/asterisk_click2dial.xml:13 +#, python-format +msgid "Open Caller" msgstr "" #. module: asterisk_click2dial #: model:ir.model,name:asterisk_click2dial.model_wizard_open_calling_partner -#: view:wizard.open.calling.partner:0 msgid "Open calling partner" msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:258 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:265 #, python-format msgid "OpenERP can successfully login to the Asterisk Manager Interface." msgstr "" @@ -404,17 +348,7 @@ msgstr "" #. module: asterisk_click2dial #: field:asterisk.server,out_prefix:0 -msgid "Out prefix" -msgstr "" - -#. module: asterisk_click2dial -#: help:wizard.open.calling.partner,parent_partner_id:0 -msgid "Parent Partner related to the calling number." -msgstr "" - -#. module: asterisk_click2dial -#: field:wizard.open.calling.partner,parent_partner_id:0 -msgid "Parent partner" +msgid "Out Prefix" msgstr "" #. module: asterisk_click2dial @@ -423,23 +357,13 @@ msgid "Partner" msgstr "" #. module: asterisk_click2dial -#: field:wizard.open.calling.partner,partner_id:0 -msgid "Partner name" +#: help:number.not.found,to_update_partner_id:0 +msgid "Partner on which the phone number will be written" msgstr "" #. module: asterisk_click2dial -#: help:wizard.open.calling.partner,to_update_partner_id:0 -msgid "Partner on which the phone or mobile number will be written" -msgstr "" - -#. module: asterisk_click2dial -#: help:wizard.open.calling.partner,partner_id:0 -msgid "Partner related to the calling number." -msgstr "" - -#. module: asterisk_click2dial -#: field:wizard.open.calling.partner,to_update_partner_id:0 -msgid "Partner to update" +#: field:number.not.found,to_update_partner_id:0 +msgid "Partner to Update" msgstr "" #. module: asterisk_click2dial @@ -448,13 +372,8 @@ msgid "Password that OpenERP will use to communicate with the Asterisk Manager I msgstr "" #. module: asterisk_click2dial -#: help:wizard.open.calling.partner,calling_number:0 -msgid "Phone number of calling party that has been obtained from Asterisk." -msgstr "" - -#. module: asterisk_click2dial -#: help:asterisk.server,country_prefix:0 -msgid "Phone prefix of the country where the Asterisk server is located. For e.g. the phone prefix for France is '33'. If the phone number to dial starts with the 'My country prefix', OpenERP will remove the country prefix from the phone number and add the 'out prefix' followed by the 'national prefix'. If the phone number to dial doesn't start with the 'My country prefix', OpenERP will add the 'out prefix' followed by the 'international prefix'." +#: help:number.not.found,calling_number:0 +msgid "Phone number of calling party that has been obtained from Asterisk, in the format used by Asterisk (not E.164)." msgstr "" #. module: asterisk_click2dial @@ -462,19 +381,9 @@ msgstr "" msgid "Port" msgstr "" -#. module: asterisk_click2dial -#: help:asterisk.server,national_prefix:0 -msgid "Prefix for national phone calls (don't include the 'out prefix'). For e.g., in France, the phone numbers look like '01 41 98 12 42' : the National prefix is '0'." -msgstr "" - -#. module: asterisk_click2dial -#: help:asterisk.server,international_prefix:0 -msgid "Prefix to add to make international phone calls (don't include the 'out prefix'). For e.g., in France, the International prefix is '00'." -msgstr "" - #. module: asterisk_click2dial #: help:asterisk.server,out_prefix:0 -msgid "Prefix to dial to place outgoing calls. If you don't use a prefix to place outgoing calls, leave empty." +msgid "Prefix to dial to make outgoing calls. If you don't use a prefix to make outgoing calls, leave empty." msgstr "" #. module: asterisk_click2dial @@ -483,14 +392,16 @@ msgid "Priority of the extension in the Asterisk dialplan. Refer to /etc/asteris msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:233 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:239 #, python-format msgid "Problem in the request from OpenERP to Asterisk. Here is the error message: %s" msgstr "" #. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:403 #: field:res.users,resource:0 -msgid "Resource name" +#, python-format +msgid "Resource Name" msgstr "" #. module: asterisk_click2dial @@ -508,12 +419,6 @@ msgstr "" msgid "SIP" msgstr "" -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/wizard/open_calling_partner.py:189 -#, python-format -msgid "Select the partner to update." -msgstr "" - #. module: asterisk_click2dial #: view:asterisk.server:0 msgid "Server Name" @@ -544,6 +449,13 @@ msgstr "" msgid "Standard Asterisk Parameters" msgstr "" +#. module: asterisk_click2dial +#. openerp-web +#: code:addons/asterisk_click2dial/static/src/js/asterisk_click2dial.js:44 +#, python-format +msgid "Success" +msgstr "" + #. module: asterisk_click2dial #: help:asterisk.server,port:0 msgid "TCP port on which the Asterisk Manager Interface listens. Defined in /etc/asterisk/manager.conf on Asterisk." @@ -555,19 +467,19 @@ msgid "Test Connection to Asterisk" msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:346 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:414 #, python-format msgid "The '%s' for the user '%s' should only have ASCII caracters" msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:100 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:136 #, python-format msgid "The '%s' should only have ASCII caracters for the Asterisk server '%s'" msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:92 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:120 #, python-format msgid "The 'extension priority' must be a positive value for the Asterisk server '%s'" msgstr "" @@ -577,45 +489,6 @@ msgstr "" msgid "The active field allows you to hide the Asterisk server without deleting it." msgstr "" -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/wizard/open_calling_partner.py:95 -#, python-format -msgid "The object '%s' is not found in your OpenERP database, probably because the related module is not installed." -msgstr "" - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:121 -#, python-format -msgid "The phone number is not written in valid format." -msgstr "" - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:119 -#, python-format -msgid "The phone number is not written in valid international format. Example of valid international format : +33 1 41 98 12 42" -msgstr "" - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:120 -#, python-format -msgid "The phone number is not written in valid national format." -msgstr "" - -#. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Update an existing partner" -msgstr "" - -#. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Update mobile" -msgstr "" - -#. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Update phone" -msgstr "" - #. module: asterisk_click2dial #: help:res.users,internal_number:0 msgid "User's internal phone number." @@ -623,17 +496,17 @@ msgstr "" #. module: asterisk_click2dial #: field:res.users,alert_info:0 -msgid "User-specific Alert-Info SIP header" +msgid "User-specific Alert-Info SIP Header" msgstr "" #. module: asterisk_click2dial -#: field:res.users,variable:0 -msgid "User-specific Variable" +#: field:res.users,dial_suffix:0 +msgid "User-specific Dial Suffix" msgstr "" #. module: asterisk_click2dial -#: field:res.users,dial_suffix:0 -msgid "User-specific dial suffix" +#: field:res.users,variable:0 +msgid "User-specific Variable" msgstr "" #. module: asterisk_click2dial @@ -648,17 +521,17 @@ msgstr "" #. module: asterisk_click2dial #: field:asterisk.server,wait_time:0 -msgid "Wait time (sec)" +msgid "Wait Time (sec)" msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:90 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:115 #, python-format msgid "You should set a 'Wait time' value between 1 and 120 seconds for the Asterisk server '%s'" msgstr "" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:94 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:125 #, python-format msgid "You should set a TCP port between 1 and 65535 for the Asterisk server '%s'" msgstr "" @@ -678,13 +551,3 @@ msgstr "" msgid "phone.common" msgstr "" -#. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "with calling number as mobile" -msgstr "" - -#. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "with calling number as phone" -msgstr "" - diff --git a/asterisk_click2dial/i18n/fr.po b/asterisk_click2dial/i18n/fr.po index 70cbbdb11..995cfc9a4 100644 --- a/asterisk_click2dial/i18n/fr.po +++ b/asterisk_click2dial/i18n/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 7.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-08-21 16:22+0000\n" -"PO-Revision-Date: 2014-08-21 16:22+0000\n" +"POT-Creation-Date: 2014-08-25 21:43+0000\n" +"PO-Revision-Date: 2014-08-25 21:43+0000\n" "Last-Translator: Alexis de Lattre \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -17,12 +17,12 @@ msgstr "" #. module: asterisk_click2dial #: field:asterisk.server,login:0 -msgid "AMI login" +msgid "AMI Login" msgstr "Nom d'utilisateur AMI" #. module: asterisk_click2dial #: field:asterisk.server,password:0 -msgid "AMI password" +msgid "AMI Password" msgstr "Mot de passe AMI" #. module: asterisk_click2dial @@ -32,8 +32,8 @@ msgstr "Actif" #. module: asterisk_click2dial #: field:asterisk.server,alert_info:0 -msgid "Alert-Info SIP header" -msgstr "En-tête SIP Alert-Info SIP" +msgid "Alert-Info SIP Header" +msgstr "En-tête SIP Alert-Info" #. module: asterisk_click2dial #: help:asterisk.server,wait_time:0 @@ -45,16 +45,31 @@ msgstr "Temps (en secondes) pendant lequel Asterisk essayera de joindre le tél msgid "Asterisk CallerID" msgstr "Asterisk CallerID" +#. module: asterisk_click2dial +#: field:res.users,asterisk_chan_type:0 +msgid "Asterisk Channel Type" +msgstr "Type de canal Asterisk" + #. module: asterisk_click2dial #: field:asterisk.server,ip_address:0 -msgid "Asterisk IP addr. or DNS" -msgstr "Adr. IP ou DNS d'Asterisk" +msgid "Asterisk IP address or DNS" +msgstr "Adresse IP ou DNS d'Asterisk" #. module: asterisk_click2dial #: view:asterisk.server:0 msgid "Asterisk Manager Interface" msgstr "Asterisk Manager Interface" +#. module: asterisk_click2dial +#: field:res.users,asterisk_server_id:0 +msgid "Asterisk Server" +msgstr "Serveur Asterisk" + +#. module: asterisk_click2dial +#: field:asterisk.server,name:0 +msgid "Asterisk Server Name" +msgstr "Nom du serveur Asterisk" + #. module: asterisk_click2dial #: view:asterisk.server:0 msgid "Asterisk Server Search" @@ -68,11 +83,6 @@ msgstr "Recherche de serveur Asterisk" msgid "Asterisk Servers" msgstr "Serveurs Asterisk" -#. module: asterisk_click2dial -#: field:res.users,asterisk_chan_type:0 -msgid "Asterisk channel type" -msgstr "Type de canal Asterisk" - #. module: asterisk_click2dial #: help:res.users,asterisk_chan_type:0 msgid "Asterisk channel type, as used in the Asterisk dialplan. If the user has a regular IP phone, the channel type is 'SIP'." @@ -83,26 +93,18 @@ msgstr "Type de canal Asterisk, tel qu'utilisé dans le dialplan d'Asterisk. Si msgid "Asterisk dialplan context from which the calls will be made. Refer to /etc/asterisk/extensions.conf on your Asterisk server." msgstr "Contexte du dialplan d'Asterisk depuis lequel les appels seront initiés. Cf /etc/asterisk/extensions.conf sur le serveur Asterisk." -#. module: asterisk_click2dial -#: field:res.users,asterisk_server_id:0 -msgid "Asterisk server" -msgstr "Serveur Asterisk" - -#. module: asterisk_click2dial -#: field:asterisk.server,name:0 -msgid "Asterisk server name" -msgstr "Nom du serveur Asterisk" - -#. module: asterisk_click2dial -#: help:asterisk.server,name:0 -msgid "Asterisk server name." -msgstr "Nom du serveur Asterisk." - #. module: asterisk_click2dial #: help:res.users,asterisk_server_id:0 msgid "Asterisk server on which the user's phone is connected. If you leave this field empty, it will use the first Asterisk server of the user's company." msgstr "Serveur Asterisk sur lequel le téléphone de l'utilisateur est connecté. Si vous laissez ce champ vide, le premier serveur Asterisk de la société de l'utilisateur sera utilisé." +#. module: asterisk_click2dial +#. openerp-web +#: code:addons/asterisk_click2dial/static/src/js/asterisk_click2dial.js:26 +#, python-format +msgid "BIG PB" +msgstr "BIG PB" + #. module: asterisk_click2dial #: field:res.users,cdraccount:0 msgid "CDR Account" @@ -114,7 +116,9 @@ msgid "Call Detail Record (CDR) account used for billing this user." msgstr "Compte CDR utilisé pour facturer cet utilisateur (CDR = Journal d'appel détaillé)." #. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:405 #: field:res.users,callerid:0 +#, python-format msgid "Caller ID" msgstr "Identification de l'appelant" @@ -124,12 +128,12 @@ msgid "Caller ID used for the calls initiated by this user." msgstr "'Caller ID' des appels passés par l'utilisateur." #. module: asterisk_click2dial -#: field:wizard.open.calling.partner,calling_number:0 -msgid "Calling number" +#: field:number.not.found,calling_number:0 +msgid "Calling Number" msgstr "Numéro appelant" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:288 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:310 #, python-format msgid "Can't get calling number from Asterisk.\n" "Here is the error: '%s'" @@ -137,12 +141,7 @@ msgstr "Le numéro de l'appelant n'a pas pu être récupéré auprès d'Asterisk "Voilà l'erreur : '%s'" #. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Cancel" -msgstr "Annuler" - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:395 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:481 #, python-format msgid "Click to dial with Asterisk failed.\n" "Here is the error: '%s'" @@ -165,73 +164,31 @@ msgid "Company who uses the Asterisk server." msgstr "Société qui utilise le serveur Asterisk." #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:248 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:255 #, python-format msgid "Connection Test Failed!" -msgstr "Connection Test Failed!" +msgstr "Echec du test de connexion !" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:257 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:264 #, python-format msgid "Connection Test Successfull!" -msgstr "Connection Test Successfull!" - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/wizard/open_calling_partner.py:82 -#, python-format -msgid "Could not get the calling number from Asterisk. Is your phone ringing or are you currently on the phone ? If yes, check your setup and look at the OpenERP debug logs." -msgstr "OpenERP n'a pas pu obtenir le numéro de l'appelant auprès d'Asterisk. Votre téléphone est-il bien entrain de sonner ou êtes-vous bien au téléphone actuellement ? Si oui, vérifiez les paramètres de configuration et consultez les logs de debug d'OpenERP." - -#. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Create a new partner" -msgstr "Créer un nouveau partenaire" - -#. module: asterisk_click2dial -#: field:wizard.open.calling.partner,current_mobile:0 -msgid "Current mobile" -msgstr "Tél. portable actuel" - -#. module: asterisk_click2dial -#: field:wizard.open.calling.partner,current_phone:0 -msgid "Current phone" -msgstr "Tél. actuel" +msgstr "Test de connexion réussi !" #. module: asterisk_click2dial #: selection:res.users,asterisk_chan_type:0 msgid "DAHDI" msgstr "DAHDI" -#. module: asterisk_click2dial -#: view:asterisk.server:0 -msgid "Dialplan Parameters" -msgstr "Dialplan Parameters" - #. module: asterisk_click2dial #: field:asterisk.server,context:0 -msgid "Dialplan context" +msgid "Dialplan Context" msgstr "Contexte du dialplan" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:88 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:90 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:92 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:94 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:100 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:198 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:217 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:221 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:233 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:288 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:346 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:369 -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:395 -#: code:addons/asterisk_click2dial/wizard/open_calling_partner.py:81 -#: code:addons/asterisk_click2dial/wizard/open_calling_partner.py:95 -#: code:addons/asterisk_click2dial/wizard/open_calling_partner.py:189 -#, python-format -msgid "Error :" -msgstr "Erreur :" +#: view:asterisk.server:0 +msgid "Dialplan Parameters" +msgstr "Paramètres du dialplan" #. module: asterisk_click2dial #: constraint:asterisk.server:0 @@ -240,26 +197,46 @@ msgid "Error message in raise" msgstr "Error message in raise" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:360 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:109 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:114 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:119 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:124 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:133 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:191 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:212 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:218 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:238 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:308 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:413 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:432 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:444 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:480 #, python-format msgid "Error:" -msgstr "Error:" +msgstr "Erreur :" #. module: asterisk_click2dial #: field:asterisk.server,extension_priority:0 -msgid "Extension priority" +msgid "Extension Priority" msgstr "Priorité de l'extension" +#. module: asterisk_click2dial +#. openerp-web +#: code:addons/asterisk_click2dial/static/src/js/asterisk_click2dial.js:25 +#, python-format +msgid "Fail" +msgstr "Fail" + #. module: asterisk_click2dial #: selection:res.users,asterisk_chan_type:0 msgid "H323" msgstr "H323" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:249 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:256 #, python-format msgid "Here is the error message: %s" -msgstr "Here is the error message: %s" +msgstr "Voilà le message d'erreur : %s" #. module: asterisk_click2dial #: selection:res.users,asterisk_chan_type:0 @@ -272,20 +249,11 @@ msgid "IP address or DNS name of the Asterisk server." msgstr "Adresse IP ou DNS du serveur Asterisk." #. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:404 #: field:res.users,internal_number:0 -msgid "Internal number" -msgstr "Numéro interne" - -#. module: asterisk_click2dial -#: field:asterisk.server,international_prefix:0 -msgid "International prefix" -msgstr "Préfixe international" - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:118 #, python-format -msgid "Invalid phone number" -msgstr "Numéro de téléphone invalide" +msgid "Internal Number" +msgstr "Numéro interne" #. module: asterisk_click2dial #: selection:res.users,asterisk_chan_type:0 @@ -303,121 +271,87 @@ msgid "MGCP" msgstr "MGCP" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:361 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:433 #, python-format msgid "Missing phone number" -msgstr "Missing phone number" +msgstr "Numéro de téléphone manquant" #. module: asterisk_click2dial -#: field:asterisk.server,country_prefix:0 -msgid "My country prefix" -msgstr "Préfixe du pays" - -#. module: asterisk_click2dial -#: field:asterisk.server,national_prefix:0 -msgid "National prefix" -msgstr "Préfixe national" +#. openerp-web +#: code:addons/asterisk_click2dial/static/src/js/asterisk_click2dial.js:45 +#, python-format +msgid "Moving to %s ID %d" +msgstr "Moving to %s ID %d" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:198 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:192 #, python-format msgid "No Asterisk server configured for the company '%s'." msgstr "Aucun serveur Asterisk n'est associé à la société '%s'." #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:410 -#, python-format -msgid "No Partner Found" -msgstr "No Partner Found" - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:369 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:445 #, python-format msgid "No callerID configured for the current user" msgstr "Le callerID n'est pas configuré pour l'utilisateur courant" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:217 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:213 #, python-format msgid "No channel type configured for the current user." msgstr "Aucun type de canal n'est configuré pour l'utilisateur actuel." #. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "No partner found in OpenERP with this number" -msgstr "Aucun partenaire trouvé dans OpenERP avec ce numéro" - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:221 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:219 #, python-format msgid "No resource name configured for the current user" msgstr "Aucun nom de ressource n'a été renseigné pour l'utilisateur actuel" -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:88 -#, python-format -msgid "Only use digits for the '%s' on the Asterisk server '%s'" -msgstr "N'utilisez que des chiffres pour le '%s' du serveur Asterisk '%s'" - #. module: asterisk_click2dial #. openerp-web -#: code:addons/asterisk_click2dial/static/src/js/asterisk_click2dial.js:20 -#: code:addons/asterisk_click2dial/static/src/xml/asterisk_click2dial.xml:13 +#: code:addons/asterisk_click2dial/static/src/js/asterisk_click2dial.js:31 #, python-format -msgid "Open Calling Partner" -msgstr "Open Calling Partner" - -#. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Open Parent Partner form" -msgstr "Ouvrir la fiche du partenaire parent" +msgid "Number Not Found" +msgstr "Numéro introuvable" #. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Open Partner form" -msgstr "Ouvrir le fiche Partenaire" +#: model:ir.model,name:asterisk_click2dial.model_number_not_found +msgid "Number not found" +msgstr "Numéro introuvable" #. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Open Related Invoices" -msgstr "Ouvrir les factures associées" +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:111 +#, python-format +msgid "Only use digits for the '%s' on the Asterisk server '%s'" +msgstr "N'utilisez que des chiffres pour le '%s' du serveur Asterisk '%s'" #. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Open Related Sale Orders" -msgstr "Ouvrir les commandes associées" +#. openerp-web +#: code:addons/asterisk_click2dial/static/src/xml/asterisk_click2dial.xml:13 +#, python-format +msgid "Open Caller" +msgstr "Ouvrir l'appelant" #. module: asterisk_click2dial #: model:ir.model,name:asterisk_click2dial.model_wizard_open_calling_partner -#: view:wizard.open.calling.partner:0 msgid "Open calling partner" msgstr "Ouvrir le partenaire appelant" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:258 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:265 #, python-format msgid "OpenERP can successfully login to the Asterisk Manager Interface." -msgstr "OpenERP can successfully login to the Asterisk Manager Interface." +msgstr "OpenERP s'authentifie avec succès à l'Asterisk Manager Interface." #. module: asterisk_click2dial #: view:res.users:0 msgid "Optional Asterisk Parameters - for experts only, can be left empty" -msgstr "Optional Asterisk Parameters - for experts only, can be left empty" +msgstr "Paramètres Asterisk optionnels - pour les experts uniquement, peut être laissé vide" #. module: asterisk_click2dial #: field:asterisk.server,out_prefix:0 -msgid "Out prefix" -msgstr "Préfixe pour l'extérieur" - -#. module: asterisk_click2dial -#: help:wizard.open.calling.partner,parent_partner_id:0 -msgid "Parent Partner related to the calling number." -msgstr "Partenaire parent associé au numéro appelant." - -#. module: asterisk_click2dial -#: field:wizard.open.calling.partner,parent_partner_id:0 -msgid "Parent partner" -msgstr "Partenaire parent" +msgid "Out Prefix" +msgstr "Préfixe de sortie" #. module: asterisk_click2dial #: model:ir.model,name:asterisk_click2dial.model_res_partner @@ -425,23 +359,13 @@ msgid "Partner" msgstr "Partenaire" #. module: asterisk_click2dial -#: field:wizard.open.calling.partner,partner_id:0 -msgid "Partner name" -msgstr "Nom du Partenaire" - -#. module: asterisk_click2dial -#: help:wizard.open.calling.partner,to_update_partner_id:0 -msgid "Partner on which the phone or mobile number will be written" -msgstr "Partenaire sur lequel le numéro de téléphone fixe ou de téléphone portable sera écrit" - -#. module: asterisk_click2dial -#: help:wizard.open.calling.partner,partner_id:0 -msgid "Partner related to the calling number." -msgstr "Partenaire associé au numéro de téléphone appelant." +#: help:number.not.found,to_update_partner_id:0 +msgid "Partner on which the phone number will be written" +msgstr "Partenaire sur lequel le numéro de téléphone sera écrit" #. module: asterisk_click2dial -#: field:wizard.open.calling.partner,to_update_partner_id:0 -msgid "Partner to update" +#: field:number.not.found,to_update_partner_id:0 +msgid "Partner to Update" msgstr "Partenaire à mettre à jour" #. module: asterisk_click2dial @@ -450,34 +374,19 @@ msgid "Password that OpenERP will use to communicate with the Asterisk Manager I msgstr "Mot de passe qui sera utilisé par OpenERP pour communiquer avec l'Asterisk Manager Interface. Ce mot de passe est configuré dans le fichier /etc/asterisk/manager.conf sur votre serveur Asterisk." #. module: asterisk_click2dial -#: help:wizard.open.calling.partner,calling_number:0 -msgid "Phone number of calling party that has been obtained from Asterisk." -msgstr "Numéro de téléphone de l'appelant obtenu auprès d'Asterisk." - -#. module: asterisk_click2dial -#: help:asterisk.server,country_prefix:0 -msgid "Phone prefix of the country where the Asterisk server is located. For e.g. the phone prefix for France is '33'. If the phone number to dial starts with the 'My country prefix', OpenERP will remove the country prefix from the phone number and add the 'out prefix' followed by the 'national prefix'. If the phone number to dial doesn't start with the 'My country prefix', OpenERP will add the 'out prefix' followed by the 'international prefix'." -msgstr "Préfixe téléphonique du pays dans lequel est situé le serveur Asterisk. Par exemple, le préfixe téléphonique de la France est '33'. Si le numéro de téléphone à appeler commence par le préfixe du pays, OpenERP supprimera ce préfixe du numéro de téléphone à composer et ajoutera le préfixe pour l'extérieur suivi par le préfixe national. Si le numéro de téléphone à appeler ne commence pas par le préfixe du pays, OpenERP ajoutera le préfixe pour l'extérieur suivi par le préfixe international." +#: help:number.not.found,calling_number:0 +msgid "Phone number of calling party that has been obtained from Asterisk, in the format used by Asterisk (not E.164)." +msgstr "Phone number of calling party that has been obtained from Asterisk, in the format used by Asterisk (not E.164)." #. module: asterisk_click2dial #: field:asterisk.server,port:0 msgid "Port" msgstr "Port" -#. module: asterisk_click2dial -#: help:asterisk.server,national_prefix:0 -msgid "Prefix for national phone calls (don't include the 'out prefix'). For e.g., in France, the phone numbers look like '01 41 98 12 42' : the National prefix is '0'." -msgstr "Préfixe pour les appels nationaux (ne pas inclure le préfixe pour l'extérieur). Par exemple, en France, les numéros de téléphone sont du type '01 41 98 12 42' ; le préfixe national est '0'." - -#. module: asterisk_click2dial -#: help:asterisk.server,international_prefix:0 -msgid "Prefix to add to make international phone calls (don't include the 'out prefix'). For e.g., in France, the International prefix is '00'." -msgstr "Préfixe à ajouter pour passer des appels vers l'étranger (ne pas inclure le préfixe pour l'extérieur). Par exemple, en France, le préfixe pour l'international est '00'." - #. module: asterisk_click2dial #: help:asterisk.server,out_prefix:0 -msgid "Prefix to dial to place outgoing calls. If you don't use a prefix to place outgoing calls, leave empty." -msgstr "Préfixe à composer pour appeler vers l'extérieur. Si vous n'avez pas à composer un préfixe pour appeler vers l'extérieur, laissez vide." +msgid "Prefix to dial to make outgoing calls. If you don't use a prefix to make outgoing calls, leave empty." +msgstr "Préfixe à composer pour les appels vers l'extérieur. Si vous n'utilisez pas de préfixe pour les appels vers l'extérieur, laissez vide." #. module: asterisk_click2dial #: help:asterisk.server,extension_priority:0 @@ -485,14 +394,16 @@ msgid "Priority of the extension in the Asterisk dialplan. Refer to /etc/asteris msgstr "Priorité de l'extension dans le dialplan d'Asterisk. Cf /etc/asterisk/extensions.conf sur le serveur Asterisk." #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:233 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:239 #, python-format msgid "Problem in the request from OpenERP to Asterisk. Here is the error message: %s" -msgstr "Problem in the request from OpenERP to Asterisk. Here is the error message: %s" +msgstr "Problème dans la requête d'OpenERP vers Asterisk. Voilà le message d'erreur : %s" #. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:403 #: field:res.users,resource:0 -msgid "Resource name" +#, python-format +msgid "Resource Name" msgstr "Nom de la ressource" #. module: asterisk_click2dial @@ -510,12 +421,6 @@ msgstr "SCCP" msgid "SIP" msgstr "SIP" -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/wizard/open_calling_partner.py:189 -#, python-format -msgid "Select the partner to update." -msgstr "Sélectionnez le partenaire à mettre à jour." - #. module: asterisk_click2dial #: view:asterisk.server:0 msgid "Server Name" @@ -544,7 +449,14 @@ msgstr "Skinny" #. module: asterisk_click2dial #: view:res.users:0 msgid "Standard Asterisk Parameters" -msgstr "Standard Asterisk Parameters" +msgstr "Paramètres Asterisk standards" + +#. module: asterisk_click2dial +#. openerp-web +#: code:addons/asterisk_click2dial/static/src/js/asterisk_click2dial.js:44 +#, python-format +msgid "Success" +msgstr "Succès" #. module: asterisk_click2dial #: help:asterisk.server,port:0 @@ -557,19 +469,19 @@ msgid "Test Connection to Asterisk" msgstr "Test de connexion à Asterisk" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:346 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:414 #, python-format msgid "The '%s' for the user '%s' should only have ASCII caracters" msgstr "Le '%s' pour l'utilisateur '%s' ne devrait contenir que des caractères ASCII" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:100 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:136 #, python-format msgid "The '%s' should only have ASCII caracters for the Asterisk server '%s'" msgstr "Le '%s' ne doit contenir que des caractères ASCII pour le serveur Asterisk '%s'" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:92 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:120 #, python-format msgid "The 'extension priority' must be a positive value for the Asterisk server '%s'" msgstr "Le paramètre 'Priorité de l'extension' doit être un entier positif pour le serveur Asterisk '%s'" @@ -579,45 +491,6 @@ msgstr "Le paramètre 'Priorité de l'extension' doit être un entier positif po msgid "The active field allows you to hide the Asterisk server without deleting it." msgstr "Le champ Actif permet de cacher le serveur Asterisk sans le supprimer." -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/wizard/open_calling_partner.py:95 -#, python-format -msgid "The object '%s' is not found in your OpenERP database, probably because the related module is not installed." -msgstr "The object '%s' is not found in your OpenERP database, probably because the related module is not installed." - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:121 -#, python-format -msgid "The phone number is not written in valid format." -msgstr "Le numéro de téléphone n'est pas dans un format valide." - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:119 -#, python-format -msgid "The phone number is not written in valid international format. Example of valid international format : +33 1 41 98 12 42" -msgstr "Le numéro de téléphone n'est pas dans un format international valide. Exemple de numéro de téléphone dans un format international valide : +33 1 41 98 12 42" - -#. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:120 -#, python-format -msgid "The phone number is not written in valid national format." -msgstr "Le numéro de téléphone n'est pas dans un format national valide." - -#. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Update an existing partner" -msgstr "Mettre à jour un partenaire existant" - -#. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Update mobile" -msgstr "Mettre à jour le portable" - -#. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "Update phone" -msgstr "Mettre à jour le tél." - #. module: asterisk_click2dial #: help:res.users,internal_number:0 msgid "User's internal phone number." @@ -625,19 +498,19 @@ msgstr "Numéro de téléphone interne de l'utilisateur." #. module: asterisk_click2dial #: field:res.users,alert_info:0 -msgid "User-specific Alert-Info SIP header" +msgid "User-specific Alert-Info SIP Header" msgstr "En-tête SIP Alert-Info spécifique à l'utilisateur" +#. module: asterisk_click2dial +#: field:res.users,dial_suffix:0 +msgid "User-specific Dial Suffix" +msgstr "Suffixe d'appel spécifique à l'utilisateur" + #. module: asterisk_click2dial #: field:res.users,variable:0 msgid "User-specific Variable" msgstr "Variable spécifique à l'utilisateur" -#. module: asterisk_click2dial -#: field:res.users,dial_suffix:0 -msgid "User-specific dial suffix" -msgstr "Suffixe d'appel spécifique à l'utilisateur" - #. module: asterisk_click2dial #: help:res.users,dial_suffix:0 msgid "User-specific dial suffix such as aa=2wb for SCCP auto answer." @@ -650,17 +523,17 @@ msgstr "Utilisateurs" #. module: asterisk_click2dial #: field:asterisk.server,wait_time:0 -msgid "Wait time (sec)" +msgid "Wait Time (sec)" msgstr "Temps d'attente (sec)" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:90 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:115 #, python-format msgid "You should set a 'Wait time' value between 1 and 120 seconds for the Asterisk server '%s'" msgstr "Vous devez indiquer une valeur comprise entre 1 et 120 secondes pour le paramètre 'Temps d'attente' pour le serveur Asterisk '%s'" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:94 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:125 #, python-format msgid "You should set a TCP port between 1 and 65535 for the Asterisk server '%s'" msgstr "Vous devez mettre un port TCP entre 1 et 65535 pour le serveur Asterisk '%s'" @@ -680,13 +553,3 @@ msgstr "mISDN" msgid "phone.common" msgstr "phone.common" -#. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "with calling number as mobile" -msgstr "avec le numéro appelant comme portable" - -#. module: asterisk_click2dial -#: view:wizard.open.calling.partner:0 -msgid "with calling number as phone" -msgstr "avec le numéro appelant comme tél." - diff --git a/asterisk_click2dial/scripts/openerp_popup_timeout.sh b/asterisk_click2dial/scripts/openerp_popup_timeout.sh new file mode 100755 index 000000000..a5b2c3876 --- /dev/null +++ b/asterisk_click2dial/scripts/openerp_popup_timeout.sh @@ -0,0 +1,27 @@ +#! /bin/sh +# -*- encoding: utf-8 -*- +# +# Written by Alexis de Lattre + +# Example of wrapper for set_name_agi.py which makes sure that the +# script doesn't take too much time to execute + +# Limiting the execution time of set_name_agi.py is important because +# the script is designed to be executed at the beginning of each +# incoming or outgoing phone call... and if the script get stucks, the +# phone call will also get stucks ! + +# For Debian Lenny and Ubuntu Lucid, you need to install the package "timeout" +# For Ubuntu >= Maverick and Debian >= Squeeze, the "timeout" command is shipped +# in the "coreutils" package + +# The first argument of the "timeout" command is the maximum execution time +# In this example, we chose 2 seconds. + +# To test this script manually (i.e. outside of Asterisk), run : +# echo "agi_callerid:0141401242"|openerp_popup_timeout.sh +# where 0141401242 is a phone number that could be presented by the calling party + +PATH=/usr/local/sbin:/usr/local/bin:/var/lib/asterisk/agi-bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/share/asterisk/agi-bin + +timeout 2s set_name_agi.py --server openerp.mycompany.com --database erp_prod --user-id 12 --password "thepasswd" --notify admin demo diff --git a/asterisk_click2dial/scripts/set_name_agi.py b/asterisk_click2dial/scripts/set_name_agi.py index 40ca075d7..29983deb3 100755 --- a/asterisk_click2dial/scripts/set_name_agi.py +++ b/asterisk_click2dial/scripts/set_name_agi.py @@ -108,20 +108,66 @@ # Define command line options options = [ - {'names': ('-s', '--server'), 'dest': 'server', 'type': 'string', 'help': 'DNS or IP address of the OpenERP server. Default = none (will not try to connect to OpenERP)', 'action': 'store', 'default': False}, - {'names': ('-p', '--port'), 'dest': 'port', 'type': 'int', 'help': "Port of OpenERP's XML-RPC interface. Default = 8069", 'action': 'store', 'default': 8069}, - {'names': ('-e', '--ssl'), 'dest': 'ssl', 'help': "Use XML-RPC secure i.e. with SSL instead of clear XML-RPC. Default = no, use clear XML-RPC", 'action': 'store_true', 'default': False}, - {'names': ('-d', '--database'), 'dest': 'database', 'type': 'string', 'help': "OpenERP database name. Default = 'openerp'", 'action': 'store', 'default': 'openerp'}, - {'names': ('-u', '--user-id'), 'dest': 'user', 'type': 'int', 'help': "OpenERP user ID to use when connecting to OpenERP. Default = 2", 'action': 'store', 'default': 2}, - {'names': ('-w', '--password'), 'dest': 'password', 'type': 'string', 'help': "Password of the OpenERP user. Default = 'demo'", 'action': 'store', 'default': 'demo'}, - {'names': ('-a', '--ascii'), 'dest': 'ascii', 'help': "Convert name from UTF-8 to ASCII. Default = no, keep UTF-8", 'action': 'store_true', 'default': False}, - {'names': ('-n', '--notify'), 'dest': 'notify', 'help': "Notify OpenERP users via a pop-up (requires the OpenERP module 'base_phone_popup'). If you use this option, you must pass the logins of the OpenERP users to notify as argument to the script. Default = no", 'action': 'store_true', 'default': False}, - {'names': ('-g', '--geoloc'), 'dest': 'geoloc', 'help': "Try to geolocate phone numbers unknown to OpenERP. This features requires the 'phonenumbers' Python lib. To install it, run 'sudo pip install phonenumbers' Default = no", 'action': 'store_true', 'default': False}, - {'names': ('-l', '--geoloc-lang'), 'dest': 'lang', 'help': "Language in which the name of the country and city name will be displayed by the geolocalisation database. Use the 2 letters ISO code of the language. Default = 'en'", 'action': 'store', 'default': "en"}, - {'names': ('-c', '--geoloc-country'), 'dest': 'country', 'help': "2 letters ISO code for your country e.g. 'FR' for France. This will be used by the geolocalisation system to parse the phone number of the calling party. Default = 'FR'", 'action': 'store', 'default': "FR"}, - {'names': ('-o', '--outgoing'), 'dest': 'outgoing', 'help': "Update the Connected Line ID name on outgoing calls via a call to the Asterisk function CONNECTEDLINE(), instead of updating the Caller ID name on incoming calls. Default = no.", 'action': 'store_true', 'default': False}, - {'names': ('-i', '--outgoing-agi-variable'), 'dest': 'outgoing_agi_var', 'help': "Enter the name of the AGI variable (without the 'agi_' prefix) from which the script will get the phone number dialed by the user on outgoing calls. For example, with Xivo, you should specify 'dnid' as the AGI variable. Default = 'extension'", 'action': 'store', 'default': "extension"}, - {'names': ('-m', '--max-size'), 'dest': 'max_size', 'type': 'int', 'help': "If the name has more characters this maximum size, cut it to this maximum size. Default = 40", 'action': 'store', 'default': 40}, + {'names': ('-s', '--server'), 'dest': 'server', 'type': 'string', + 'action': 'store', 'default': False, + 'help': 'DNS or IP address of the OpenERP server. Default = none ' + '(will not try to connect to OpenERP)'}, + {'names': ('-p', '--port'), 'dest': 'port', 'type': 'int', + 'action': 'store', 'default': 8069, + 'help': "Port of OpenERP's XML-RPC interface. Default = 8069"}, + {'names': ('-e', '--ssl'), 'dest': 'ssl', + 'help': "Use XML-RPC secure i.e. with SSL instead of clear XML-RPC. " + "Default = no, use clear XML-RPC", + 'action': 'store_true', 'default': False}, + {'names': ('-d', '--database'), 'dest': 'database', 'type': 'string', + 'action': 'store', 'default': 'openerp', + 'help': "OpenERP database name. Default = 'openerp'"}, + {'names': ('-u', '--user-id'), 'dest': 'user', 'type': 'int', + 'action': 'store', 'default': 2, + 'help': "OpenERP user ID to use when connecting to OpenERP. " + "Default = 2"}, + {'names': ('-w', '--password'), 'dest': 'password', 'type': 'string', + 'action': 'store', 'default': 'demo', + 'help': "Password of the OpenERP user. Default = 'demo'"}, + {'names': ('-a', '--ascii'), 'dest': 'ascii', + 'action': 'store_true', 'default': False, + 'help': "Convert name from UTF-8 to ASCII. Default = no, keep UTF-8"}, + {'names': ('-n', '--notify'), 'dest': 'notify', + 'action': 'store_true', 'default': False, + 'help': "Notify OpenERP users via a pop-up (requires the OpenERP " + "module 'base_phone_popup'). If you use this option, you must pass " + "the logins of the OpenERP users to notify as argument to the " + "script. Default = no"}, + {'names': ('-g', '--geoloc'), 'dest': 'geoloc', + 'action': 'store_true', 'default': False, + 'help': "Try to geolocate phone numbers unknown to OpenERP. This " + "features requires the 'phonenumbers' Python lib. To install it, " + "run 'sudo pip install phonenumbers' Default = no"}, + {'names': ('-l', '--geoloc-lang'), 'dest': 'lang', 'type': 'string', + 'action': 'store', 'default': "en", + 'help': "Language in which the name of the country and city name " + "will be displayed by the geolocalisation database. Use the 2 " + "letters ISO code of the language. Default = 'en'"}, + {'names': ('-c', '--geoloc-country'), 'dest': 'country', 'type': 'string', + 'action': 'store', 'default': "FR", + 'help': "2 letters ISO code for your country e.g. 'FR' for France. " + "This will be used by the geolocalisation system to parse the phone " + "number of the calling party. Default = 'FR'"}, + {'names': ('-o', '--outgoing'), 'dest': 'outgoing', + 'action': 'store_true', 'default': False, + 'help': "Update the Connected Line ID name on outgoing calls via a " + "call to the Asterisk function CONNECTEDLINE(), instead of updating " + "the Caller ID name on incoming calls. Default = no."}, + {'names': ('-i', '--outgoing-agi-variable'), 'dest': 'outgoing_agi_var', + 'type': 'string', 'action': 'store', 'default': "extension", + 'help': "Enter the name of the AGI variable (without the 'agi_' " + "prefix) from which the script will get the phone number dialed by " + "the user on outgoing calls. For example, with Xivo, you should " + "specify 'dnid' as the AGI variable. Default = 'extension'"}, + {'names': ('-m', '--max-size'), 'dest': 'max_size', 'type': 'int', + 'action': 'store', 'default': 40, + 'help': "If the name has more characters this maximum size, cut it " + "to this maximum size. Default = 40"}, ] @@ -218,7 +264,8 @@ def main(options, arguments): stdinput.get('agi_calleridname') and not stdinput.get('agi_calleridname').isdigit() and stdinput.get('agi_calleridname').lower() - not in ['asterisk', 'unknown', 'anonymous']): + not in ['asterisk', 'unknown', 'anonymous'] + and not options.notify): stdout_write( 'VERBOSE "Incoming CallerID name is %s"\n' % stdinput.get('agi_calleridname')) diff --git a/asterisk_click2dial/static/src/css/asterisk_click2dial.css b/asterisk_click2dial/static/src/css/asterisk_click2dial.css index 652965be9..c56619664 100644 --- a/asterisk_click2dial/static/src/css/asterisk_click2dial.css +++ b/asterisk_click2dial/static/src/css/asterisk_click2dial.css @@ -4,13 +4,13 @@ The licence is in the file __openerp__.py */ -.openerp .oe_topbar_item.oe_topbar_open_calling_partner{ +.openerp .oe_topbar_item.oe_topbar_open_caller{ padding: 0px; width: 32px; height: 32px; } -.openerp .oe_topbar_item.oe_topbar_open_calling_partner button{ +.openerp .oe_topbar_item.oe_topbar_open_caller button{ position: relative; top: -3px; box-sizing: border-box; diff --git a/asterisk_click2dial/static/src/js/asterisk_click2dial.js b/asterisk_click2dial/static/src/js/asterisk_click2dial.js index 9cfe34eca..b403155ab 100644 --- a/asterisk_click2dial/static/src/js/asterisk_click2dial.js +++ b/asterisk_click2dial/static/src/js/asterisk_click2dial.js @@ -6,27 +6,55 @@ openerp.asterisk_click2dial = function (instance) { var _t = instance.web._t; - instance.web.OpenCallingPartner = instance.web.Widget.extend({ - template:'asterisk_click2dial.OpenCallingPartner', + instance.web.OpenCaller = instance.web.Widget.extend({ + template:'asterisk_click2dial.OpenCaller', start: function () { - this.$('#asterisk-open-calling-partner').on( - 'click', this.on_open_calling_partner); + this.$('#asterisk-open-caller').on( + 'click', this.on_open_caller); this._super(); }, - on_open_calling_partner: function (event) { + on_open_caller: function (event) { event.stopPropagation(); - var action = { - name: _t('Open Calling Partner'), - type: 'ir.actions.act_window', - res_model: 'wizard.open.calling.partner', - view_mode: 'form', - views: [[false, 'form']], - target: 'new', - context: {}, - }; - instance.client.action_manager.do_action(action); + var self = this; + self.rpc('/asterisk_click2dial/get_record_from_my_channel', {}).done(function(r) { + // console.log('RESULT RPC r='+r); + // console.log('RESULT RPC type r='+typeof r); + if (r === false) { + self.do_notify( + _t('Failure'), + _t('Problem in the connection to Asterisk')); + } + else if (typeof r == 'string') { + var action = { + name: _t('Number Not Found'), + type: 'ir.actions.act_window', + res_model: 'number.not.found', + view_mode: 'form', + views: [[false, 'form']], + target: 'new', + context: {'default_calling_number': r}, + }; + instance.client.action_manager.do_action(action); + + } + else if (typeof r == 'object' && r.length == 3) { + self.do_notify( // Not working + _t('Success'), + _t('Moving to %s ID %d', r[0], r[1])); + var action = { + type: 'ir.actions.act_window', + res_model: r[0], + res_id: r[1], + view_mode: 'form,tree', + views: [[false, 'form']], + target: 'current', + context: {}, + }; + instance.client.action_manager.do_action(action); + } + }); }, }); @@ -34,7 +62,7 @@ openerp.asterisk_click2dial = function (instance) { do_update: function(){ this._super.apply(this, arguments); this.update_promise.then(function() { - var asterisk_button = new instance.web.OpenCallingPartner(); + var asterisk_button = new instance.web.OpenCaller(); asterisk_button.appendTo(instance.webclient.$el.find('.oe_systray')); }); }, diff --git a/asterisk_click2dial/static/src/xml/asterisk_click2dial.xml b/asterisk_click2dial/static/src/xml/asterisk_click2dial.xml index bbd2a45b8..f8facb1a1 100644 --- a/asterisk_click2dial/static/src/xml/asterisk_click2dial.xml +++ b/asterisk_click2dial/static/src/xml/asterisk_click2dial.xml @@ -7,11 +7,11 @@ diff --git a/asterisk_click2dial/views/asterisk_server.xml b/asterisk_click2dial/views/asterisk_server.xml index d7305bcae..169d370a8 100644 --- a/asterisk_click2dial/views/asterisk_server.xml +++ b/asterisk_click2dial/views/asterisk_server.xml @@ -1,6 +1,7 @@ @@ -26,13 +27,7 @@ -
- -
+