Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
264 changes: 264 additions & 0 deletions voip_oca/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

========
Voip OCA
========

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

.. |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/license-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/19.0/voip_oca
: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-19-0/connector-telephony-19-0-voip_oca
: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=19.0
:alt: Try me on Runboat

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

This module allows the use of VOIP directly from Odoo.

It relies on SIP.js to connect to the PBX using a websocket directly
from the browser.

Odoo server will not connect directly to the PBX server, but will have
users and passwords stored.

In order to use this module, you need to have a PBX server that allows
websocket connection. Otherwise, you need to use a proxy that will be
the bridge between Odoo and PBX. Websocket connection is required
because browsers prefer this kind of connections. Also, this is an
standard connection defined on RFC 7118 by IETF. Several PBX servers
support this protocol.

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

This module is intended to integrate directly with a VOIP Provider.

The provider need to supply a WebRTC system where we will plug on it.

Currently, it has been tested with:

- `Zerovoz <https://zerovoz.com/>`__
- `Ringover <https://www.ringover.es/>`__

Theoretically, it should work with

- Axivox
- OnSIP

Configuration
=============

Create the PBX Connection
-------------------------

- Access in Debug mode.
- Go to ``Settings > Technical > Discuss > PBX Servers``.
- Create a PBX server and define the domain name and websocket link.

You can set it as ``Test`` or ``Production``. Test environment will
never contact the PBX server.

Configure users
---------------

For each user, we need to define their PBX server, user and password if
we want it to be able to access the PBX server and make calls. To do
this, we have two options:

1. Admin users can define the information directly in the user form for
each user. For this, go to Settings > Users & Companies > Users and
go to VOIP tab and set the information.
2. By other hand, each user can go to Preferences and modify the
information in the VOIP tab.

Usage
=====

Automatically the system will login into the PBX server once we enter
odoo with our user. If we are on a test environment, no login is made
and the libraries of SIP are not loaded.

Once we are logged, we can use the VOIP widget in order to call
directly. In order to open all the selectors, we can press the softphone
button on the top bar...

.. figure:: https://raw.githubusercontent.com/OCA/connector-telephony/19.0/voip_oca/static/description/softphone.png

...and the bottom widget will be opened.

.. figure:: https://raw.githubusercontent.com/OCA/connector-telephony/19.0/voip_oca/static/description/widget.png

The widget can be hidden by clicking on the top bar.

.. figure:: https://raw.githubusercontent.com/OCA/connector-telephony/19.0/voip_oca/static/description/hidden_widget.png

Clicking the top bar of the widget again will make it reappear.

We can make a call in 2 ways:

1. Clicking the partner's number in the partner view, which appears in
green. .. figure:: https://raw.githubusercontent.com/OCA/connector-telephony/19.0/voip_oca/static/description/partner.png

2. Opening the numpad located at the bottom left of the widget, entering
the desired number, and clicking the call button located at the
bottom right of the widget. .. figure:: https://raw.githubusercontent.com/OCA/connector-telephony/19.0/voip_oca/static/description/numpad.png

Inside a call, we can transfer the call, end the call, mute the call and
put the call on Hold.

The widget offers 3 sections:

1. Recent calls: Here we have a list of the last calls made, along with
additional call information such as call date and time, status, or
duration.
2. Call Activities: Here we have a list of call activities assigned to
us in any Odoo document(crm.lead, sale.order...) that has expired or
is about to expire and needs to be completed.
3. Contacts: Lastly, we have quick access to all stored partners in our
Odoo who have a telephone number set.

Clicking on any record in these three sections gives us access to the
related partner, allowing us to view their information and make a call.

In the partner view of the widget, we can perform three actions:

1. Send an email to the partner.
2. Access the partner's form in Odoo.
3. Schedule an activity.

.. figure:: https://raw.githubusercontent.com/OCA/connector-telephony/19.0/voip_oca/static/description/actions.png

If the partner is unknown and not stored in Odoo, some actions may not
be available. This can occur when accessing a recent call made to a
contact that is not stored for example. However, in this case, we allow
the action to store the contact in Odoo from recent calls, clicking on
the plus icon button.

.. figure:: https://raw.githubusercontent.com/OCA/connector-telephony/19.0/voip_oca/static/description/unknown_partner_actions.png

Additionally, if we access a contact through the activity section, we
have four more available actions:

1. Go to the related document, such as a lead or a sale.
2. Mark the activity as done.
3. Edit the activity.
4. Cancel the activity.

.. figure:: https://raw.githubusercontent.com/OCA/connector-telephony/19.0/voip_oca/static/description/activity_actions.png

In any tab, we can perform a search by typing a keyword in the search
bar, such as the contact's name or phone number.

.. figure:: https://raw.githubusercontent.com/OCA/connector-telephony/19.0/voip_oca/static/description/search.png

Also, the system allows to receive call. In that case, the system will
try to find the related partner and will open the widget automatically.

.. figure:: https://raw.githubusercontent.com/OCA/connector-telephony/19.0/voip_oca/static/description/received_call.png

Known issues / Roadmap
======================

The following options are interesting but are not implemented right now:

- Allow to enable or disable the VOIP as a user (Login / Logout)
- Create a call system where the calls are done automatically according
to tasks

Not contempled behavior
-----------------------

We are not supporting setting two configuration for user. Not even a
different configuration for company in the user.

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:%20voip_oca%0Aversion:%2019.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
-------

* Dixmit

Contributors
------------

- `Dixmit <https://www.dixmit.com>`__:

- Enric Alomar
- Luis Rodríguez

- `Tecnativa <https://www.tecnativa.com>`__:

- Carlos Roca

Other credits
-------------

The development of this module has been financially supported by:

- Associacion Española de Odoo (`AEODOO <https://www.aeodoo.org/>`__)

The tones provided by default comes from Pixabay:

- Ringback tone: Sound Effect by freesound_community from Pixabay
- Call tone: Sound Effect by Jeremay Jimenez from Pixabay
- Dial tone: Sound Effect by freesound_community from Pixabay

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-etobella| image:: https://github.com/etobella.png?size=40px
:target: https://github.com/etobella
:alt: etobella

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

|maintainer-etobella|

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions voip_oca/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
34 changes: 34 additions & 0 deletions voip_oca/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2025 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Voip OCA",
"summary": "Provides the use of Voip",
"version": "19.0.1.0.0",
"author": "Dixmit, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/connector-telephony",
"license": "AGPL-3",
"category": "Productivity/VOIP",
"excludes": ["voip"],
"depends": ["mail"],
"maintainers": ["etobella"],
"data": [
"security/ir.model.access.csv",
"views/res_users.xml",
"views/voip_call.xml",
"views/voip_pbx.xml",
"views/menus.xml",
],
"demo": ["demo/demo_data.xml"],
"assets": {
"web.assets_backend": [
"voip_oca/static/src/**/*",
],
"voip_oca.agent_assets": [
"voip_oca/static/lib/*.js",
],
"web.assets_unit_tests": [
"voip_oca/static/tests/**/*",
],
},
}
4 changes: 4 additions & 0 deletions voip_oca/data/neutralize.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- disable VOIP module by default

UPDATE voip_pbx SET mode = 'test';
UPDATE res_users SET voip_username = NULL, voip_password = NULL WHERE voip_username IS NOT NULL;
23 changes: 23 additions & 0 deletions voip_oca/demo/demo_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<odoo>
<record id="voip_call_1" model="voip.call">
<field name="partner_id" ref="base.res_partner_1" />
<field name="user_id" ref="base.user_admin" />
<field name="phone_number">+1234567890</field>
<field name="type_call">outgoing</field>
<field name="state">terminated</field>
<field name="activity_name">Call to +1234567890</field>
<field name="end_date">2020-01-01 10:15:00</field>
<field name="start_date">2020-01-01 10:00:00</field>
</record>

<record id="voip_call_2" model="voip.call">
<field name="partner_id" ref="base.res_partner_2" />
<field name="user_id" ref="base.user_admin" />
<field name="phone_number">+1234567842</field>
<field name="type_call">incoming</field>
<field name="state">missed</field>
<field name="activity_name">Call to +1234567890</field>
<field name="end_date">2020-01-01 15:37:00</field>
<field name="start_date">2020-01-01 14:00:00</field>
</record>
</odoo>
Loading