Asterisk Calls

Odoo 5


v 10.0 v 11.0 v 12.0 Third Party 55
Included Dependencies
Technical Name asterisk_calls
Also available in version v 13.0 v 12.0 v 10.0
You bought this module and need support? Click here!
Included Dependencies
Technical Name asterisk_calls
Also available in version v 13.0 v 12.0 v 10.0

Asterisk Calls

Manage your Asterisk calls from Odoo!



  • SIP client agnostic - you can connect Odoo VoIP WebRTC client or any other SIP softphone or hardphone.
  • Partners calls history with consolidation on parent company with grouping by partner employees.
  • One click Partner creation from phone number.
  • Top-10 callers (incoming / outgoing / partners / staff).
  • Active calls management: pickup, spy, hangup, mute.
  • Advanced call routing by Partners segments.
  • Direct call connection to patrner's manager extension.
  • Direct call connection to last manager talked.
  • Advanced call history analytics.
  • Keep missed calls from partners under your control.
  • Call recording, sharing and discussion.
  • One click opening of partner form.
  • Auto open partner's form on partner's call.
  • Dashboards with top callers, company missed calls, daily traffic and more.
  • Automatic arhiving.
  • All Odoo installation types are supported! (community, enterprise and
  • Works with any Asterisk distribution (only AMI connection used)!
  • Asterisk support is available. See Support section below.
  • More features coming....
  • Custom development available....


Demo server is available here:

You can dial number +1-470-809-9548 from your mobile phone and see this in action in Calls menu.

You can connect your SIP phones and trunks to make real calls. Please contact for individual demo setup.


Calls popup widget


Active calls widget available from any place.

Users can manage only own calls. Managers can manage all calls.

If Partner is not found create a new Contact with one click on partner column.

Call monitor

When you click Calls top menu you are immediately sent to Active Calls view.

Accroding to your permissions set by Calls Administrator you can pickup an active call, spy on it, whisper privately to your collegue, or even barge into active call and talk to both parties.

User directory

User directory - this is your company internal phone book with click to call feature.

Map your Asterisk phone extensions to Odoo users to allow dialing features.

Partner calls

You can see partner calls.

You can call your partners with one click.


Call history

Search and filter calls:

  • Answered
  • Missed
  • Incoming
  • Outgoing
  • Call from Partners
  • More...
Group calls by:
  • Partner
  • From user
  • To user
  • Date
  • Call Dispostion (status)

Visualize your phone traffic by your own criterias. Amount of calls per month can give you an idea on how your company grows.

Add your favorite graphs to your dashboard and keep an eye on the phone traffic.

Special Calls Dashboard shows you special call statistics where you will see top blabbers, top partners and phone traffic distribution.

Deeply analize calls traffic using Odoo's pivot view.


Bugs, feature requests

For bugs and feature requests please send email to

Tips & tricks

To talk about Asterisk & Odoo integration join our chats at:

Asterisk / FreePBX support

This module requires running Astrerisk instance (docker deploy included for new installations).
Network connection between Asterisk and Odoo instance is requied.
Please refer to Asterisk documentaion for Asterisk configuration.
Asterisk installation and support are not included in price of this module.

If you are a novice in Asterisk/FreePBX and do not know how to complete Asterisk part of installation you can request paid support to help you setup your PBX. Please submit a request here.

Asterisk! Enjoy with Odoo!

Asterisk Calls Odoo Application documentation


Here is the architecture of the solution:


Installation check list

  • Configure Asterisk:
    • Set system name.
    • Create manager (AMI) account for the Agent.
    • Activate CDR manager module.
    • Configure dialplan to set caller id name from Odoo (or external callerid source for FreePBX).
  • Install asterisk_calls Odoo addon on Odoo server.
  • Deploy the Agent service on Asterisk server or nearby.
  • Configure Asterisk Calls application (in Odoo):
    • Map Asterisk extensions to Odoo users.
    • Decide on call recording storage: db or Odoo data's folder (default).
    • Set Asterisk IP address to restrict caller ID name query.

For more details see below.


You need is to allow the Agent to connect to your Asterisk server AMI port (usually 5038). This app does not use asterisk database connection to Odoo.

Here are the examples of required configuration options.


systemname = asterisk ; Set Asterisk system name here.


unanswered = yes
congestion = yes


enabled = yes

start => started
answer => answered
end => ended
linkedid => linkedid
sequence => sequence


enabled = yes
webenabled = no ; Asterisk calls does not use HTTP interface
port = 5038
bindaddr =

displayconnects = yes

Important! For security reasons always use deny/permit options in your manager.conf. Change permit option to IP address of your Asterisk server if agent is not started on the same box.

Dialplan configuration

Here is the example dialplan demonstration integration levels:



; Set connection options for curl.
exten => _X.,1,Set(CURLOPT(conntimeout)=3)
exten => _X.,n,Set(CURLOPT(dnstimeout)=3)
exten => _X.,n,Set(CURLOPT(httptimeout)=3)
exten => _X.,n,Set(CURLOPT(ssl_verifypeer)=0)
exten => _X.,n,Return

; Get caller ID name from Odoo, replace odoo to your Odoo's hostname / IP address
; Arguments:
; - number: calling number, strip + if comes with +.
; - db: Odoo's database name, ommit if you have one db or use dbfilter.
; - country: 2 letters country code, See
; If country code is omitted Asterisk Agent's Odoo account's country code will be used for phonenumbers parsing.
exten => _X.,1,Gosub(sub-setcurlopt,${EXTEN},1)
;   You need to cut leading + on numbers incoming from trunks before passing it to get_caller_name.
exten => _X.,n,Set(CALLERID(name)=${CURL(http://odoo:8069/asterisk_calls/get_caller_name?number=${CALLERID(number)})})
exten => _X.,n,Return

; Get partner's manager channel if set.
exten => _X.,1,Set(manager_channel=${CURL(http://odoo:8072/asterisk_calls/get_partner_manager?number=${CALLERID(number)})})
exten => _X.,n,ExecIf($["${manager_channel}" != ""]?Dial(${manager_channel}/${EXTEN},60,t))
exten => _X.,n,Return

; Call from DID numbers e.g. PSTN numbers connected to Asterisk box.
; Set partner's caller name
exten => _X.,1,Gosub(sub-setcallerid,${EXTEN},1)
; Record call
exten => _X.,n,MixMonitor(${UNIQUEID}.wav)
; Try to connect to manager
exten => _X.,n,Gosub(sub-dialmanager,${EXTEN},1)
; Put in the Queue.
exten => _X.,n,Queue(sales)

; This macro is used to send DTMF digits on outgoing calls to partner if exten is specified.
exten => s,1,NoOp(DTMF digits: ${dtmf_digits})
same => n,ExecIf($["${dtmf_digits}" = ""]?Return)
same => n,Wait(${dtmf_delay})
same => n,SendDTMF(${dtmf_digits})
same => n,Return

; Activate call recording.
exten => _X.,1,MixMonitor(${UNIQUEID}.wav)
; Local users calling
exten => _XXXX,2,Dial(SIP/${EXTEN},30)
; Outgoing calls pattern
exten => _XXXXX.,2,Dial(SIP/provider/${EXTEN},30,TU(post-dial-send-dtmf))

FreePBX setup

Setup and configuration videos are available here.


The Agent connects to Asterisk Manager Interface (AMI) and listen for events like Newchannel, Cdr, Hangup, etc. These events are sent to Odoo using odoorpc library.

The Agent home page is located here.

The Agent is based on Nameko framework and requires a local AMQP broker running. RabbitMQ is recommended.

Agent can be run in any place. But the prefereable one is the same server where Asterisk is installed. In this case Agent can have access to call recording files and can forward them to Odoo.


Docker compose deploy is the official installation method. Make sure that your docker service is set to run on boot.

Please refer to your Linux distribution documentaion on how to install docker and docker-compose.

Follow the guide below to get the Agent working.

Installation steps:

  • Install docker and docker-compose system packages.
  • Download docker-compose.yml. Adjust this file to your environment.
  • Create addons folder in the curent directory and put there asterisk_calls, remote_agent, kv_cache and other asterisk modules you have.

The above steps as shell commands:

curl -o docker-compose.yml
mkdir addons

Test run

To test start first RabbitMQ in background and Agent in foreground:

docker-compose up -d rabbitmq
docker-compose up agent

CTRL+C to interrupt.

docker-compose down

Production run

For production start the Agent as follows:

docker-compose up -d installation

The Agent uses long polling to receive call originate command from Odoo. does not allow polling from remote script so special Agent configuration is required.

Your should set the following configuration variables:


Now your should make the Agent's port 40000 accessible from Odoo as Odoo will make HTTP requests to connect to the Agent.

Also it is strictly recommended to run a HTTPS proxy server in front of the Agent's builtin WEB server to be protected from traffic sniffing.


Do a database backup before installation (just in case :-P).

Required modules

  • K/V Cache - this addon is included when you download Asterisk Calls from the market. But if you copy Asterisk Calls module from another place make sure you have also kv_cache installed.
  • Remote Agent - same as above.

Long polling

Be sure to enable Odoo long polling feature and make sure it is working.

If You see in your Odoo logs Exception: bus.Bus unavailable message it means you did not configure it correctly.

To activate long polling and have enougth workers for this app start Odoo with at least --workers=4 or set it in odoo.conf:

workers = 4
longpolling_port = 8072

Attention! This is just an example of conf file options that must be set! Don't throw away your own options!!!

Be sure to have the following record in your Odoo startup logs:

astcall_odoo | 2018-09-10 15:37:58,920 18 INFO ? odoo.service.server: Evented Service (longpolling) running on

Asterisk system account

The Asterisk Agent needs an odoo system account to work on.

During the asterisk_calls module installation a new Odoo account asterisk is created.

This is a special Odoo account with very limited access rights and of portal type to save a license on Odoo Enterprise.

It is recommented to change asterisk account password in Odoo and also adjust the Agent ODOO_PASS setting.

Set account time zone

Asterisk sends call records in its server's time zone. You should set asterisk_service account time zone in user's preferences to value set in Asterisk server.

To see time zone settings for account you should activate Odoo developer mode.

Configure users and groups

Map Odoo users with Asterisk user's extensions.

Users who use Asterisk Calls must have Asterisk Calls User permission.

For SIP users you can specify SIP alert-info header to enable auto answer feature. Check you SIP phone manuals for that.

After you mapped Odoo users with Asterisk extensions users can use click to call feature.

When you map Odoo user to Asterisk extensions in Asterisk Calls -> Users menu user is automatically added to Asterisk Calls group.

When you delete Asterisk user mapping Asterisk call permission is automatically removed from Odoo user.

Notice! After you change user extensions mapping reload the WEB client (press F5) to catch the change!


Upgrade steps:

  • Update Odoo addon:
    • Backup previous version of this module.
    • Copy a new version of this module.
    • Update Asterisk Calls application in Odoo Apps menu.
    • Restart Odoo.
  • Update the Agent:
    • Edit your docker-compose.yml and set a new image version (see Changelog section of this manual).
    • Run docker-compose pull
    • Update RabbitMQ first docker-compose up -d rabbitmq
    • Run docker-compose stop agent; docker-compose rm agent; docker-compose up -d
    • See the log docker-compose logs --tail=100 agent

If something goes wrong during the upgrade process replace module folder with the previous one and contact support.


Module price DOES cover support on installation :-)

Please get in contact if you have any issue on getting it to work.

If you need more features or found some bugs please send your requests to

You can also visit the project open list of issues and new features and submit your ideas of votes on Gitlab.

This module requires running Astrerisk instance (docker deploy included for new installations).

Network connection between Asterisk and Odoo instance is requied. Please refer to Asterisk documentaion for Asterisk configuration.

Asterisk installation and support is not included in the price of this module.

If you are a novice in Asterisk/FreePBX and do not know how to complete Asterisk part of installation you can request paid support to help you setup your PBX. Please submit a request here.

Change Log


  • Active calls and calls history permissions fix. Now users have access to all calls of their partners event done by other users. Before users had access only to their own originated or taken calls.
  • /asterisk_calls/get_caller_tags - now your can get partner tags in Asterisk dialplan for advanced call routing. See docs above.


This release finalizes the Agent refactoring and deploy.

It is strictly recommended to re-install agent using docker style described in the documentaion.

Also it is recommended to contact the author in support chat group or email before upgrade.


  • Click2call buttons got bigger so it's more easy to click on them :-)
  • AMI messages order fix (update your config.yml file, see EVENT_MAP delays).
  • Calls are now consolidated on company account with grouping by contacts.
  • Popup widget with basic functionality implemented.
  • Click2call calls are 100% matched by passing back model / res_id.
  • Active calls management operations fix.
  • Dial partner extension as DTMF ported from 12.0.


  • Call recording implemented. See config.yml from deploy/agent (Hangup event save_call_recording added).
  • Small fixes and optimizations.

Update both Odoo and Asterisk Agent.


Work still in progress.... Update both Odoo and Asterisk Agent.

  • Call notification fixes.
  • Nameko-odoo now supports calling Nameko services.

See config.yml for changes, added OriginateResponse handler, do not copy-paste from example, see config.yml in deploy/agent folder.


As 13.0 is not just a port from 12.0 but a complete Agent refactoring the work is in progress :-)

  • Get partner name bug fix.
  • Asterisk diaplan examples look nice.
  • Asterisk Calls Agent refactoring (Update your config.yml!)
  • Events now are defined on Agent level (removed event model from Odoo).
  • Some minor changes.


Initial fork from 12.0 v2.3.

  • Removed remote_agent dependency,
  • Asterisk calls agent full refactoring (and new way of installation via pypi).
Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.


Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Majeed AL-Waisi
on 3/13/19, 11:29 AM

the most useful and amazing integration with Asterisk right now I'm listening to all calls and i can search call records by partner

The best App I have bought here
Andrii Verstiak
on 4/1/19, 10:06 AM

I had many attempts to ingrate Odoo and Asterisck before. BUT now I am very happy about this APP! This is the best (the only one) way to implement VoiP service in Odoo. The developer is very kind and helpful and provides support!!!!