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

[17.0] [MIG] asterisk_click2dial: Migration to 17.0 #317

Merged
merged 187 commits into from
May 18, 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
d062934
Initial import.
Sep 22, 2010
dfb4fcb
- smaller "Dial" button on partner contact
Oct 1, 2010
8b0b1c4
Vianney changed the name of the 'alert-info' field to 'alert_info'...
Oct 1, 2010
8589f99
[FIX] WaitTime parameter is now really taken into account
Oct 7, 2010
20576ed
Make error messages displayed on screen translatable.
Oct 27, 2010
a59b11d
- Add copyright headers in XML files
Oct 30, 2010
afbcb72
Country_prefix is now a "required" field.
Nov 15, 2010
0620cb2
Check that the user has a callerID.
Dec 13, 2010
b0faa57
First implementation of get_name_from_phone_number function
Dec 28, 2010
ff323e0
Much better function get_name_from_phone_number :
Dec 28, 2010
2924da4
Add AGI script and its wrapper to manage timeout.
Dec 29, 2010
86a59e1
Don't put the admin user by default, it's not a good example.
Dec 29, 2010
0aa366f
Add a group "Asterisk CallerID" decidated to the CallerID name lookup…
Dec 29, 2010
f8e4f46
Better context handling
Dec 29, 2010
db5b6ec
Update URL of the module documentation.
Dec 29, 2010
20396fa
[FIX] There shouldn't be any space between the name and the phone num…
Jan 5, 2011
ebfd02b
- Send CallerID to Asterisk as UTF-8 by default
Jan 6, 2011
d4805e7
Networking code is now IPv6-ready
Jan 13, 2011
8d6447b
[FIX] Avoid a view conflict with the "base_contact" module by adding …
Apr 2, 2011
2dd3efe
[FIX] Base_contact also inherit the view base.view_partner_address_fo…
Apr 2, 2011
77a02cd
[FIX] Wrong if condition fixed
Apr 2, 2011
a4cc1ba
Avoid code duplication in views : the full tree/form view for Asteris…
May 2, 2011
cbf7ddd
Changed author name to Akretion
May 2, 2011
c3cc854
Add support for XML-RPC secure with SSL.
Sep 29, 2011
87e90b8
Fallback to utf-8 if sys.stdout.encoding fails.
Sep 29, 2011
032355e
Create a dedicated Tab in the res_users view.
Apr 5, 2012
414eade
Start to clean the networking code :
Apr 9, 2012
f1aba1b
Large code cleanup :
Apr 16, 2012
e690928
Cosmetic changes.
Apr 17, 2012
997dacf
Convert to new logger API of OpenERP 6.1
Apr 17, 2012
26b1734
Add translations from extra-trunk
Apr 17, 2012
bf04a7f
[FIX] Fix issue in constraint function for res_users.
Apr 27, 2012
ea1b328
[IMP] Better AGI script :
May 7, 2012
85de844
New feature : add wizard that opens the partner form of the calling p…
May 7, 2012
d8d5dfb
Remove purchase menu entry, because it would require a dependancy on …
May 7, 2012
213b5ed
Update the module description to add the new feature "open calling pa…
May 9, 2012
f0bc739
Improve (and fixes) the 'Open calling partner' function : better usab…
May 13, 2012
805fe74
Add 2 screenshots.
May 13, 2012
e96279d
For the feature "Open calling party", if the phone number is not in O…
May 24, 2012
d99f7a8
Add user-specific alert-info option.
May 26, 2012
163f383
Add logo that will appear in the list of modules in web client
May 26, 2012
32a2b69
Convert the phone number to international format before writing it on…
May 27, 2012
59c1222
Works even if national_prefix is empty.
May 27, 2012
9245993
Update translation file.
May 27, 2012
95de37c
Add 'variable' field on res.users
May 28, 2012
d346de7
[FIX] avoid a crash when emptying "contact to update"
May 28, 2012
b324155
Better error message.
May 28, 2012
4aeafad
Port asterisk_click2dial_crm to version 6.1 :
Jun 2, 2012
8c7cc42
asterisk_click2dial_crm :
Jun 2, 2012
0ef8c3d
Patch courtesy of daemon dog :
Jun 5, 2012
7704dde
Fix crahes when using the Web interface (these crashes did not occur …
Jun 22, 2012
b935119
Don't set readonly fields in the "open calling partner" wizard, to av…
Jul 31, 2012
2fab60e
Add Local/ as possible channel type
Sep 14, 2012
34c2f92
Now uses the phonenumber lib to reformat numbers in "clean" format an…
Sep 21, 2012
269d658
Add support for geolocalisation via the phonenumbers lib in the get_c…
Sep 22, 2012
1489486
Display the country name only when it's not my own country. This make…
Sep 22, 2012
ad77477
Add debug log, to help a user.
Oct 3, 2012
363ce86
More debug and warning messages, to help a user in its debug.
Oct 4, 2012
b7924b8
[FIX] open calling partner should work again.
Oct 4, 2012
4573d50
Now use a PATH variable in get_cid_name_timeout.sh
Nov 20, 2012
17a81eb
Use py-asterisk from http://code.google.com/p/py-asterisk/ (up-to-dat…
Nov 20, 2012
130635d
Add some exclusion on CallerID for which we don't query openerp or tr…
Nov 26, 2012
0b75933
Remove the import of the socket lib, that we don't use any more.
Dec 23, 2012
790ffd2
Port to OpenERP 7.0
Jan 1, 2013
09198f5
Oups, fix my previous commit.
Jan 1, 2013
2588b62
In the wizards, Instead of creating a new record and opening it, I op…
Jan 1, 2013
61e8012
Add a country to "Your company" in demo data (required for this module).
Jan 1, 2013
31b1367
[FIX] res.partner.address -> res.partner
Jan 1, 2013
4084631
Update views to take advantage of the new styles provided by OpenERP …
Jan 1, 2013
4b1d8a3
Remove <field name="type">form/tree</field> in `ir.ui.view` model (de…
Feb 6, 2013
3bf4260
Cosmetic changes.
Mar 21, 2013
b0be615
The number of digits to match from the end of the phone number is now…
Apr 12, 2013
489febd
Country prefix now has an intelligent default value.
Apr 12, 2013
f9217c6
Update version number of the script get_cid_name.py, to make it easie…
Apr 12, 2013
86be77b
Remove Local/ from the list of chan types, because Originate doesn't …
Apr 15, 2013
800226e
Add encoding in the shell script get_cid_name_timeout.sh
Apr 17, 2013
7feaf33
Add read rights on asterisk.server for group "Asterisk CallerID"
May 5, 2013
f6b9cb3
Avoid a crash when the answer to the "Status" query doesn't contain w…
May 5, 2013
cabba3d
[FIX] Adapt view inheritance of res.partner form to post-v7.0-release…
May 5, 2013
18be6b2
Add compatibility with Asterisk 1.4 for the function "Open calling pa…
May 7, 2013
f681dad
[IMP] Add Dial button in Lead and Opportunity views
May 10, 2013
fa851e4
Move the generic code from res.partner to a new object asterisk.common.
May 12, 2013
d0fe0eb
[IMP] move generic_reformat_phonenumbers function to asterisk.common
May 14, 2013
0ff9cb3
[IMP] Add Dial button in Claim Form View
May 23, 2013
d1ff3e9
Add back "Local" as channel type.
May 28, 2013
a2c4db4
Fix a few strings.
Jun 1, 2013
eaa4220
The regular "phone", "mobile" and "fax" fields now store the phone nu…
Jul 10, 2013
9b2b6bd
No need for ilike to match numbers !
Jul 11, 2013
89ffc46
Add 'external_dependencies' in __openerp__.py
Sep 7, 2013
b07927d
FIX to make the script work with the latest version of the phonenumbe…
Oct 1, 2013
c028bb7
Use RFC 2806 : add a fax: URL and convert callto: URLs to tel: URLs
Oct 12, 2013
7fec1b7
Update my script to make it work with the latest versions of the phon…
Dec 8, 2013
e41888f
Long-awaited feature : automatic pop-up on incoming calls in the Open…
Feb 1, 2014
9e626cb
Extract Asterisk-independant code (the widget="phone" + phone number …
Mar 13, 2014
963f970
Add option try_parent in open_filtered_object
Apr 23, 2014
359d7ed
Very large changes in the structure of the project :
Jul 27, 2014
a452a30
Add support for update of the name on OUTGOING calls (for far, it was…
Aug 1, 2014
212dd52
Fix documentation.
Aug 1, 2014
1586068
Add a "Test Connection to Asterisk" button on the asterisk.server for…
Aug 18, 2014
3abfb13
The "Dial" button is now inside the phone widget : this is great beca…
Aug 20, 2014
5cb454c
Update POT file and partial update of FR translation
Aug 21, 2014
6c3478f
Port to OpenERP v8.0
Aug 21, 2014
672fb88
Better button for Open Calling Partner
Aug 22, 2014
86cac55
Add href="#", so that the mouse cursor has the right aspect when over…
Aug 22, 2014
0261448
Feature "Open Calling Partner" replaced by "Open Caller", with a comp…
Aug 25, 2014
406cdd1
FIX remplace debug stuff by real code !
Aug 29, 2014
842afc8
Use =like instead of like in phone number search, because I add the '…
Nov 4, 2014
d4cc81a
Fix code style
Nov 5, 2014
3039d92
Don't fail if Asterisk and asterisk_click2dial aren't installed
Nov 5, 2014
32d7ad8
Ability to avoid the 'Not found in Odoo' as callerID name when phone …
Dec 16, 2014
a2e8ff8
[FIX] Bug #11 AMI test: success is now only reported when it really w…
Jan 1, 2015
38b1298
PEP8 fix
Feb 5, 2015
bcd8b08
Update screenshots
Feb 21, 2015
3ef17fa
Highlight dial button in screenshot
Feb 22, 2015
66131d3
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
e79cb84
Move module icon in static/description
yvaucher Mar 3, 2015
8ad90b2
Add support for "Create CRM phonecall" on leads (and not only partners)
Mar 12, 2015
3c626da
Remove an import that is not needed any more
Mar 12, 2015
7788c6d
new: pkg: adds requirements.txt to explicit dependencies and ease scr…
vaab Mar 25, 2015
5662ed0
FIX old/new API call
Mar 25, 2015
a1d52b9
Please welcome the new module ovh_telephony_connector !
May 20, 2015
1838e56
set_name_agi.py: add support for JSON-RPC and JSON-RPC SSL
alexis-via Jun 24, 2015
c9039c8
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
f8cee6a
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
c06f4e3
Port asterisk_click2dial to new API
alexis-via May 19, 2016
70380bf
Port JS and controller code of asterisk_click2dial to v9
May 19, 2016
c2bbf83
Port crm_phone to v9
alexis-via May 19, 2016
3400d17
Restore the object crm.phonecall that was dropped in v9 community
alexis-via May 23, 2016
0a78156
Add notes about a workaround to make the phone logo in top bar work w…
alexis-via May 26, 2016
28e5c58
Fix bug #93... but it seems do_notify() is not working in v9 in this …
alexis-via Jul 20, 2016
a2ba723
[MIG] Make modules uninstallable
pedrobaeza Oct 6, 2016
2c5e65f
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
3e31a45
Port crm_phone, hr_phone, hr_recruitment_phone, event_phone to v10
alexis-via Oct 28, 2016
210ff30
[FIX] base_phone: Fixed click2dial feature
Nov 4, 2016
b09942e
Port opencaller to v10
alexis-via Nov 8, 2016
71f133b
PEP8 fix
alexis-via Nov 23, 2016
ce9ba61
OCA Transbot updated translations from Transifex
oca-transbot Jan 28, 2017
5747584
OCA Transbot updated translations from Transifex
oca-transbot Jun 17, 2017
e075c2b
[10.0][ADD] asterisk_click2dial: PJSIP channel type
Jul 6, 2017
f0173ff
Allow to work with asterisk server not company-related
alexis-via Sep 1, 2017
54efac1
OCA Transbot updated translations from Transifex
oca-transbot Dec 2, 2017
9c25d70
Improve AGI script using a dedicated lib
alexis-via Feb 10, 2018
d444d01
OCA Transbot updated translations from Transifex
oca-transbot Mar 31, 2018
fbbfd7c
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
507ac59
[UPD] Update asterisk_click2dial.pot
oca-travis Jun 23, 2018
47d8fd9
Port to v12 base_phone, asterisk_click2dial, crm_phone, hr_phone, eve…
alexis-via Nov 15, 2018
590f5c0
Improve script: better default port, works when incoming phone number…
alexis-via Nov 15, 2018
0bb320a
[UPD] Update asterisk_click2dial.pot
oca-travis Nov 16, 2018
9676a8e
Update translation files
oca-transbot Dec 9, 2018
9b0c996
Forward port dial button refactor from v11 to v12
alexis-via May 28, 2019
9c12eeb
[UPD] Update asterisk_click2dial.pot
oca-travis Jun 11, 2019
84fe668
Update translation files
oca-transbot Jun 11, 2019
83107bf
[FIX] asterisk_click2dial: Travis errors
max3903 Jul 10, 2019
c3d1c1e
Translated using Weblate (Portuguese (Brazil))
Sep 2, 2019
8226266
Translated using Weblate (Portuguese (Brazil))
Sep 2, 2019
ecf5e8f
Translated using Weblate (Portuguese (Brazil))
Sep 2, 2019
5da514e
[UPD] Update asterisk_click2dial.pot
oca-travis Jul 22, 2020
c9b2ad0
Update translation files
oca-transbot Jul 22, 2020
d7fdfcb
CO-3343 Open caller button works properly again
Theyiot Jul 7, 2020
8ee28c2
Added translation using Weblate (Flemish)
mimusica Aug 3, 2020
26155b2
Translated using Weblate (Flemish)
mimusica Aug 3, 2020
880e23b
Update translation files
oca-transbot Aug 16, 2020
1d08e6a
[UPD] Update asterisk_click2dial.pot
oca-travis Dec 18, 2020
92b5f23
asterisk_click2dial 12.0.1.0.1
OCA-git-bot Dec 18, 2020
5051c6f
Update translation files
oca-transbot Dec 19, 2020
0613a2b
[MIG] asterisk_click2dial from v12 to v14
alexis-via May 18, 2021
db90064
asterisk_click2dial: black, isort, ...
alexis-via May 18, 2021
1db0d77
asterisk_click2dial: migrate AGI script to python3
alexis-via Nov 25, 2021
23e3ed2
[UPD] Update asterisk_click2dial.pot
oca-travis Nov 26, 2021
b699f5e
[UPD] README.rst
OCA-git-bot Nov 26, 2021
d10d78a
Translated using Weblate (Portuguese (Brazil))
Feb 1, 2022
35a37d8
Added translation using Weblate (Spanish (Argentina))
nimarosa Aug 5, 2022
71a19c4
Translated using Weblate (Spanish (Argentina))
nimarosa Aug 5, 2022
2fb763e
[FIX] fixed pre-commit faild issues
Urvisha-OSI Oct 28, 2022
a6e9f00
asterisk_click2dial: AMI -> ARI transition
alexis-via Feb 20, 2023
21a7485
Translated using Weblate (Italian)
mymage Mar 30, 2023
bdf7ef0
Translated using Weblate (Slovenian)
sysadminmatmoz Mar 31, 2023
0ce0435
[UPD] Update asterisk_click2dial.pot
Apr 14, 2023
7471392
asterisk_click2dial 14.0.2.0.0
OCA-git-bot Apr 14, 2023
fe84561
Update translation files
weblate Apr 14, 2023
fcf962f
[UPD] README.rst
OCA-git-bot Sep 3, 2023
f69016c
Translated using Weblate (Spanish)
Ivorra78 Dec 20, 2023
abe1b9a
[IMP] asterisk_click2dial: pre-commit auto fixes
luisDIXMIT Apr 11, 2024
d789aee
[MIG] asterisk_click2dial: Migration to 16.0
luisDIXMIT Apr 12, 2024
cdf4b73
[UPD] Update asterisk_click2dial.pot
May 5, 2024
9a47a5c
[IMP] asterisk_click2dial: pre-commit auto fixes
luisDIXMIT May 6, 2024
c45252d
[MIG] asterisk_click2dial: Migration to 17.0
luisDIXMIT May 7, 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
145 changes: 145 additions & 0 deletions asterisk_click2dial/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
==================
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/17.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-17-0/connector-telephony-17-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=17.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:%2017.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/17.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": "17.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

Check warning on line 15 in asterisk_click2dial/controller.py

View check run for this annotation

Codecov / codecov/patch

asterisk_click2dial/controller.py#L14-L15

Added lines #L14 - L15 were not covered by tests
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