Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing from upstream OCA/connector-telephony (16.0) #170

Merged
merged 187 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
51faab4
Initial import.
Sep 22, 2010
c5e98b0
- smaller "Dial" button on partner contact
Oct 1, 2010
97ca6f1
Vianney changed the name of the 'alert-info' field to 'alert_info'...
Oct 1, 2010
688d92d
[FIX] WaitTime parameter is now really taken into account
Oct 7, 2010
7496ea9
Make error messages displayed on screen translatable.
Oct 27, 2010
12d1b78
- Add copyright headers in XML files
Oct 30, 2010
a9b6810
Country_prefix is now a "required" field.
Nov 15, 2010
e3f4451
Check that the user has a callerID.
Dec 13, 2010
80e9f09
First implementation of get_name_from_phone_number function
Dec 28, 2010
0882242
Much better function get_name_from_phone_number :
Dec 28, 2010
6960720
Add AGI script and its wrapper to manage timeout.
Dec 29, 2010
ff3fad2
Don't put the admin user by default, it's not a good example.
Dec 29, 2010
00f2040
Add a group "Asterisk CallerID" decidated to the CallerID name lookup…
Dec 29, 2010
dbab71a
Better context handling
Dec 29, 2010
f85322a
Update URL of the module documentation.
Dec 29, 2010
d81682e
[FIX] There shouldn't be any space between the name and the phone num…
Jan 5, 2011
262ba88
- Send CallerID to Asterisk as UTF-8 by default
Jan 6, 2011
5c70c70
Networking code is now IPv6-ready
Jan 13, 2011
2c778c1
[FIX] Avoid a view conflict with the "base_contact" module by adding …
Apr 2, 2011
15a07b5
[FIX] Base_contact also inherit the view base.view_partner_address_fo…
Apr 2, 2011
0a0a977
[FIX] Wrong if condition fixed
Apr 2, 2011
81fe673
Avoid code duplication in views : the full tree/form view for Asteris…
May 2, 2011
8fe8471
Changed author name to Akretion
May 2, 2011
42963df
Add support for XML-RPC secure with SSL.
Sep 29, 2011
5f10e07
Fallback to utf-8 if sys.stdout.encoding fails.
Sep 29, 2011
5f3f7ed
Create a dedicated Tab in the res_users view.
Apr 5, 2012
86e005f
Start to clean the networking code :
Apr 9, 2012
d9d15d8
Large code cleanup :
Apr 16, 2012
e31f4c4
Cosmetic changes.
Apr 17, 2012
24cd10a
Convert to new logger API of OpenERP 6.1
Apr 17, 2012
5eb93a3
Add translations from extra-trunk
Apr 17, 2012
c980973
[FIX] Fix issue in constraint function for res_users.
Apr 27, 2012
07c5cfd
[IMP] Better AGI script :
May 7, 2012
3fb7b0a
New feature : add wizard that opens the partner form of the calling p…
May 7, 2012
6b10693
Remove purchase menu entry, because it would require a dependancy on …
May 7, 2012
581b581
Update the module description to add the new feature "open calling pa…
May 9, 2012
0c916cc
Improve (and fixes) the 'Open calling partner' function : better usab…
May 13, 2012
40147fd
Add 2 screenshots.
May 13, 2012
565b731
For the feature "Open calling party", if the phone number is not in O…
May 24, 2012
2c6632d
Add user-specific alert-info option.
May 26, 2012
8fa464c
Add logo that will appear in the list of modules in web client
May 26, 2012
439e79e
Convert the phone number to international format before writing it on…
May 27, 2012
e27ee4b
Works even if national_prefix is empty.
May 27, 2012
963b41d
Update translation file.
May 27, 2012
cacee9f
Add 'variable' field on res.users
May 28, 2012
022aa4e
[FIX] avoid a crash when emptying "contact to update"
May 28, 2012
627ac0c
Better error message.
May 28, 2012
b57943a
Port asterisk_click2dial_crm to version 6.1 :
Jun 2, 2012
72631a3
asterisk_click2dial_crm :
Jun 2, 2012
d358768
Patch courtesy of daemon dog :
Jun 5, 2012
192175c
Fix crahes when using the Web interface (these crashes did not occur …
Jun 22, 2012
909483f
Don't set readonly fields in the "open calling partner" wizard, to av…
Jul 31, 2012
0785bdc
Add Local/ as possible channel type
Sep 14, 2012
54bd66c
Now uses the phonenumber lib to reformat numbers in "clean" format an…
Sep 21, 2012
d9bffca
Add support for geolocalisation via the phonenumbers lib in the get_c…
Sep 22, 2012
447016d
Display the country name only when it's not my own country. This make…
Sep 22, 2012
ce5022e
Add debug log, to help a user.
Oct 3, 2012
fbc4206
More debug and warning messages, to help a user in its debug.
Oct 4, 2012
a85ce32
[FIX] open calling partner should work again.
Oct 4, 2012
8de3cf9
Now use a PATH variable in get_cid_name_timeout.sh
Nov 20, 2012
ef2953e
Use py-asterisk from http://code.google.com/p/py-asterisk/ (up-to-dat…
Nov 20, 2012
97f1fa1
Add some exclusion on CallerID for which we don't query openerp or tr…
Nov 26, 2012
a1e0f70
Remove the import of the socket lib, that we don't use any more.
Dec 23, 2012
b4f153b
Port to OpenERP 7.0
Jan 1, 2013
0c7aeb6
Oups, fix my previous commit.
Jan 1, 2013
bd865ae
In the wizards, Instead of creating a new record and opening it, I op…
Jan 1, 2013
94ef95a
Add a country to "Your company" in demo data (required for this module).
Jan 1, 2013
59c8058
[FIX] res.partner.address -> res.partner
Jan 1, 2013
3aaf17c
Update views to take advantage of the new styles provided by OpenERP …
Jan 1, 2013
9707ac8
Remove <field name="type">form/tree</field> in `ir.ui.view` model (de…
Feb 6, 2013
a60e07c
Cosmetic changes.
Mar 21, 2013
6e06b2b
The number of digits to match from the end of the phone number is now…
Apr 12, 2013
aaf55ee
Country prefix now has an intelligent default value.
Apr 12, 2013
ff82add
Update version number of the script get_cid_name.py, to make it easie…
Apr 12, 2013
7ce2d6c
Remove Local/ from the list of chan types, because Originate doesn't …
Apr 15, 2013
7d951cb
Add encoding in the shell script get_cid_name_timeout.sh
Apr 17, 2013
43eef72
Add read rights on asterisk.server for group "Asterisk CallerID"
May 5, 2013
10930b7
Avoid a crash when the answer to the "Status" query doesn't contain w…
May 5, 2013
817db64
[FIX] Adapt view inheritance of res.partner form to post-v7.0-release…
May 5, 2013
a17277d
Add compatibility with Asterisk 1.4 for the function "Open calling pa…
May 7, 2013
cb0787b
[IMP] Add Dial button in Lead and Opportunity views
May 10, 2013
1402c71
Move the generic code from res.partner to a new object asterisk.common.
May 12, 2013
f7d8a9a
[IMP] move generic_reformat_phonenumbers function to asterisk.common
May 14, 2013
5e52c40
[IMP] Add Dial button in Claim Form View
May 23, 2013
deb8b4b
Add back "Local" as channel type.
May 28, 2013
e26c347
Fix a few strings.
Jun 1, 2013
7a8bb7a
The regular "phone", "mobile" and "fax" fields now store the phone nu…
Jul 10, 2013
39b22bf
No need for ilike to match numbers !
Jul 11, 2013
c71436a
Add 'external_dependencies' in __openerp__.py
Sep 7, 2013
d21ed3a
FIX to make the script work with the latest version of the phonenumbe…
Oct 1, 2013
27d57c0
Use RFC 2806 : add a fax: URL and convert callto: URLs to tel: URLs
Oct 12, 2013
49ebb41
Update my script to make it work with the latest versions of the phon…
Dec 8, 2013
52fabd0
Long-awaited feature : automatic pop-up on incoming calls in the Open…
Feb 1, 2014
1335ec3
Extract Asterisk-independant code (the widget="phone" + phone number …
Mar 13, 2014
16767b1
Add option try_parent in open_filtered_object
Apr 23, 2014
48e51bd
Very large changes in the structure of the project :
Jul 27, 2014
b58cd25
Add support for update of the name on OUTGOING calls (for far, it was…
Aug 1, 2014
2583481
Fix documentation.
Aug 1, 2014
907bb66
Add a "Test Connection to Asterisk" button on the asterisk.server for…
Aug 18, 2014
7dac5c7
The "Dial" button is now inside the phone widget : this is great beca…
Aug 20, 2014
d77d348
Update POT file and partial update of FR translation
Aug 21, 2014
bff8696
Port to OpenERP v8.0
Aug 21, 2014
8d53c3c
Better button for Open Calling Partner
Aug 22, 2014
3f5365d
Add href="#", so that the mouse cursor has the right aspect when over…
Aug 22, 2014
4458359
Feature "Open Calling Partner" replaced by "Open Caller", with a comp…
Aug 25, 2014
1fcceed
FIX remplace debug stuff by real code !
Aug 29, 2014
450c233
Use =like instead of like in phone number search, because I add the '…
Nov 4, 2014
a57b99b
Fix code style
Nov 5, 2014
23f6b9e
Don't fail if Asterisk and asterisk_click2dial aren't installed
Nov 5, 2014
993ac55
Ability to avoid the 'Not found in Odoo' as callerID name when phone …
Dec 16, 2014
239b0da
[FIX] Bug #11 AMI test: success is now only reported when it really w…
Jan 1, 2015
def5064
PEP8 fix
Feb 5, 2015
2341c18
Update screenshots
Feb 21, 2015
a638a66
Highlight dial button in screenshot
Feb 22, 2015
5d0cc15
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
b98df8d
Move module icon in static/description
yvaucher Mar 3, 2015
7351278
Add support for "Create CRM phonecall" on leads (and not only partners)
Mar 12, 2015
75c7a2a
Remove an import that is not needed any more
Mar 12, 2015
290ea29
new: pkg: adds requirements.txt to explicit dependencies and ease scr…
vaab Mar 25, 2015
4ea1d9e
FIX old/new API call
Mar 25, 2015
a060f78
Please welcome the new module ovh_telephony_connector !
May 20, 2015
f4def3c
set_name_agi.py: add support for JSON-RPC and JSON-RPC SSL
alexis-via Jun 24, 2015
a9c2625
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
08e8b32
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
e7b8ce9
Port asterisk_click2dial to new API
alexis-via May 19, 2016
f0821ba
Port JS and controller code of asterisk_click2dial to v9
May 19, 2016
98c8670
Port crm_phone to v9
alexis-via May 19, 2016
33355ad
Restore the object crm.phonecall that was dropped in v9 community
alexis-via May 23, 2016
3d92c8e
Add notes about a workaround to make the phone logo in top bar work w…
alexis-via May 26, 2016
66e918a
Fix bug #93... but it seems do_notify() is not working in v9 in this …
alexis-via Jul 20, 2016
37527ef
[MIG] Make modules uninstallable
pedrobaeza Oct 6, 2016
41d15a5
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
438218b
Port crm_phone, hr_phone, hr_recruitment_phone, event_phone to v10
alexis-via Oct 28, 2016
d516e5c
[FIX] base_phone: Fixed click2dial feature
Nov 4, 2016
787bd4a
Port opencaller to v10
alexis-via Nov 8, 2016
56cdb9b
PEP8 fix
alexis-via Nov 23, 2016
c547ad0
OCA Transbot updated translations from Transifex
oca-transbot Jan 28, 2017
6ab2d87
OCA Transbot updated translations from Transifex
oca-transbot Jun 17, 2017
1dfad53
[10.0][ADD] asterisk_click2dial: PJSIP channel type
Jul 6, 2017
7d25715
Allow to work with asterisk server not company-related
alexis-via Sep 1, 2017
01608b7
OCA Transbot updated translations from Transifex
oca-transbot Dec 2, 2017
963ef5b
Improve AGI script using a dedicated lib
alexis-via Feb 10, 2018
864809d
OCA Transbot updated translations from Transifex
oca-transbot Mar 31, 2018
e651c43
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
54eed9a
[UPD] Update asterisk_click2dial.pot
oca-travis Jun 23, 2018
9640d5a
Port to v12 base_phone, asterisk_click2dial, crm_phone, hr_phone, eve…
alexis-via Nov 15, 2018
ee39be8
Improve script: better default port, works when incoming phone number…
alexis-via Nov 15, 2018
e33277d
[UPD] Update asterisk_click2dial.pot
oca-travis Nov 16, 2018
31fc78b
Update translation files
oca-transbot Dec 9, 2018
4e12dfa
Forward port dial button refactor from v11 to v12
alexis-via May 28, 2019
6090c9f
[UPD] Update asterisk_click2dial.pot
oca-travis Jun 11, 2019
c84132d
Update translation files
oca-transbot Jun 11, 2019
4f8ba43
[FIX] asterisk_click2dial: Travis errors
max3903 Jul 10, 2019
26789ae
Translated using Weblate (Portuguese (Brazil))
Sep 2, 2019
16394c7
Translated using Weblate (Portuguese (Brazil))
Sep 2, 2019
84182c1
Translated using Weblate (Portuguese (Brazil))
Sep 2, 2019
64e560c
[UPD] Update asterisk_click2dial.pot
oca-travis Jul 22, 2020
4f9c8aa
Update translation files
oca-transbot Jul 22, 2020
f26e5e6
CO-3343 Open caller button works properly again
Theyiot Jul 7, 2020
1fb00cf
Added translation using Weblate (Flemish)
mimusica Aug 3, 2020
a94db30
Translated using Weblate (Flemish)
mimusica Aug 3, 2020
281ac21
Update translation files
oca-transbot Aug 16, 2020
173811e
[UPD] Update asterisk_click2dial.pot
oca-travis Dec 18, 2020
214f54e
asterisk_click2dial 12.0.1.0.1
OCA-git-bot Dec 18, 2020
b5ff40e
Update translation files
oca-transbot Dec 19, 2020
a87a96d
[MIG] asterisk_click2dial from v12 to v14
alexis-via May 18, 2021
11e7d60
asterisk_click2dial: black, isort, ...
alexis-via May 18, 2021
5a9ef8e
asterisk_click2dial: migrate AGI script to python3
alexis-via Nov 25, 2021
bae9d4e
[UPD] Update asterisk_click2dial.pot
oca-travis Nov 26, 2021
cfab3a3
[UPD] README.rst
OCA-git-bot Nov 26, 2021
dcc80b0
Translated using Weblate (Portuguese (Brazil))
Feb 1, 2022
f000f0b
Added translation using Weblate (Spanish (Argentina))
nimarosa Aug 5, 2022
cd7be54
Translated using Weblate (Spanish (Argentina))
nimarosa Aug 5, 2022
b5db975
[FIX] fixed pre-commit faild issues
Urvisha-OSI Oct 28, 2022
205bb94
asterisk_click2dial: AMI -> ARI transition
alexis-via Feb 20, 2023
3fb56ba
Translated using Weblate (Italian)
mymage Mar 30, 2023
e3dbd4e
Translated using Weblate (Slovenian)
sysadminmatmoz Mar 31, 2023
331dc91
[UPD] Update asterisk_click2dial.pot
Apr 14, 2023
b7610a9
asterisk_click2dial 14.0.2.0.0
OCA-git-bot Apr 14, 2023
65f4941
Update translation files
weblate Apr 14, 2023
5a5f7bb
[UPD] README.rst
OCA-git-bot Sep 3, 2023
428da4b
Translated using Weblate (Spanish)
Ivorra78 Dec 20, 2023
6bd81eb
[IMP] asterisk_click2dial: pre-commit auto fixes
luisDIXMIT Apr 11, 2024
0295aec
[MIG] asterisk_click2dial: Migration to 16.0
luisDIXMIT Apr 12, 2024
8212ea0
Merge PR #319 into 16.0
OCA-git-bot May 5, 2024
64d3e3f
[UPD] Update asterisk_click2dial.pot
May 5, 2024
8b3a393
[BOT] post-merge updates
OCA-git-bot May 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[asterisk_click2dial](asterisk_click2dial/) | 16.0.1.0.0 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Asterisk-Odoo connector
[base_phone](base_phone/) | 16.0.1.0.0 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Validate phone numbers

[//]: # (end addons)
Expand Down
144 changes: 144 additions & 0 deletions asterisk_click2dial/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
==================
Asterisk connector
==================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:70c4fbe57dbcfd18cf15685ed8361c0af932e8f5c65668c39a947eeccfd1cc1e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fconnector--telephony-lightgray.png?logo=github
:target: https://github.com/OCA/connector-telephony/tree/16.0/asterisk_click2dial
:alt: OCA/connector-telephony
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/connector-telephony-16-0/connector-telephony-16-0-asterisk_click2dial
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/connector-telephony&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

The technical name of this module is **asterisk_click2dial**, but this module
implements much more than a simple *click2dial* ! This module adds 3
functionalities:

1. It adds a *Dial* button in the partner form view so that users can directly
dial a phone number through Asterisk. This feature is usually known as
*click2dial*. Here is how it works :

* In Odoo, the user clicks on the *Dial* button next to a phone number
field in the partner form view (or any form view with a phone number).

* Odoo connects to the Asterisk Manager Interface and Asterisk makes the
user's phone ring.

* The user answers his own phone (if he doesn't, the process stops here).

* Asterisk dials the phone number found in Odoo in place of the user.

* If the remote party answers, the user can talk to his correspondent.

2. It adds the ability to show the name of the calling party on the screen of
your IP phone on incoming phone calls if the presented phone number is
present in the partner/leads/employees/... of Odoo. Here is how it works:

* On incoming phone calls, the Asterisk dialplan executes an AGI script
**set_name_incoming_timeout.sh**.

* The *set_name_incoming_timeout.sh* script calls the *set_name_agi.py*
script with a short timeout.

* The *set_name_agi.py* script will make an XML-RPC request on the Odoo
server to try to find the name of the person corresponding to the phone
number presented by the calling party.

* If it finds the name, it is set as the CallerID name of the call, so as
to be presented on the IP phone of the user.

It also works on outgoing calls, so as to display the name of the callee on
the SIP phone of the caller. For that, you should use the script
*set_name_outgoing_timeout.sh*.

3. It adds a phone icon (*Open Caller*) in the top menu bar
to get the partner/lead/candidate/event registrations
corresponding to the calling party in one click. Here is how it works :

* When the user clicks on the phone icon, Odoo sends a query to the
Asterisk Manager Interface to get a list of the current phone calls.

* If it finds a phone call involving the user's phone, it gets the phone
number of the calling party.

* It searches the phone number of the calling party in the
Partners/Leads/Candidates/Event Registrations of Odoo. If a record matches,
it takes you to the form view of this record. If no record matchs, it
opens a wizard which proposes to create a new Partner with the presented
phone number as *Phone* or *Mobile* number or update an existing Partner.

It is possible to get a pop-up of the record corresponding to the calling
party without any action from the user via the module *base_phone_popup*.

A detailed documentation for this module is available on `this page <http://www.akretion.com/products-and-services/openerp-asterisk-voip-connector>`_ of Akretion's Web site.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/connector-telephony/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/connector-telephony/issues/new?body=module:%20asterisk_click2dial%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Akretion

Contributors
~~~~~~~~~~~~

* Alexis de Lattre <[email protected]>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px
:target: https://github.com/alexis-via
:alt: alexis-via

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-alexis-via|

This module is part of the `OCA/connector-telephony <https://github.com/OCA/connector-telephony/tree/16.0/asterisk_click2dial>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions asterisk_click2dial/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import controller
33 changes: 33 additions & 0 deletions asterisk_click2dial/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2010-2021 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Asterisk connector",
"version": "16.0.1.0.0",
"category": "Phone",
"license": "AGPL-3",
"summary": "Asterisk-Odoo connector",
"author": "Akretion,Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/connector-telephony",
"depends": ["base_phone"],
"external_dependencies": {"python": ["requests"]},
"data": [
"views/asterisk_server.xml",
"views/res_users.xml",
"security/ir.model.access.csv",
"security/asterisk_security.xml",
],
"demo": ["demo/asterisk_click2dial_demo.xml"],
"qweb": ["static/src/xml/asterisk_click2dial.xml"],
"application": True,
"installable": True,
"assets": {
"web.assets_backend": [
"asterisk_click2dial/static/src/scss/*.scss",
"asterisk_click2dial/static/src/components/**/*.js",
"asterisk_click2dial/static/src/components/**/*.xml",
],
},
}
15 changes: 15 additions & 0 deletions asterisk_click2dial/controller.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2014-2021 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <[email protected]>
# Copyright 2015-2018 Juris Malinens (port to v9)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import http


class AsteriskClick2dialController(http.Controller):
@http.route(
"/asterisk_click2dial/get_record_from_my_channel", type="json", auth="user"
)
def get_record_from_my_channel(self, **kw):
res = http.request.env["asterisk.server"].get_record_from_my_channel()
return res
35 changes: 35 additions & 0 deletions asterisk_click2dial/demo/asterisk_click2dial_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2010-2021 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <[email protected]>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">


<record id="demo_ast_server" model="asterisk.server">
<field name="name">My Asterisk</field>
<field name="ip_address">localhost</field>
<field name="login">odoo</field>
<field name="password">mypassword</field>
<field name="context">from-internal</field>
<field name="alert_info">info=&lt;Bellcore-dr5&gt;</field>
<field name="company_id" ref="base.main_company" />
</record>

<record id="base.user_admin" model="res.users">
<field name="internal_number">11</field>
<field name="resource">11</field>
<field name="callerid">Administrator &lt;0141981242&gt;</field>
<field name="asterisk_server_id" ref="demo_ast_server" />
</record>

<record id="base.user_demo" model="res.users">
<field name="internal_number">12</field>
<field name="resource">12</field>
<field name="callerid">Demo user &lt;0141984212&gt;</field>
<field name="asterisk_server_id" ref="demo_ast_server" />
</record>


</odoo>
Loading
Loading