<h1>odoo-asterisk-dialer</h1>
<p>Asterisk dialer for Odoo. </p>
<p><strong>Work in progress. Pls don't use it yet.</strong></p>
<h2>Documentation</h2>
<h3>Asterisk settings</h3>
<h4>Dialplan</h4>
<p>Dialer operates using ARI originate request.
It connects each call to Asterisk dialplan with the following contents:</p>
<p><code>
[dialer]
exten => _X.,1,Dial(SIP/${EXTEN}@peer_name,30,A(silence/2)); wait 2 sec for RTP to align.
; Update unconnected call stats, connected calls are handled by Odoo Stasis app.
exten => _X.,n,Set(res=${CURL(http://localhost:8069/dialer/channel_update/?channel_id=${UNIQUEID}&status=${DIALSTATUS})})
</code></p>
<p>So you must add the above snippet to your extensions.conf.</p>
<p>Also set your own peer_name to provider's peer from your sip.conf :-)</p>
<h4>ARI settings</h4>
<p>ARI is configured in ari.conf. Example of configuration:</p>
<p><code>
allowed_origins = *
[username]
type = user
read_only = no
password = $6$GPX.W2HVNvy9Bo$EeHySUu89U8.Wg6BvJCWNv51bDhu82t8gNz1u5n83MH1qWK282G2zV4V4neFldBRNb.nVchmRq28EGFTYl4QH.
password_format = crypt
</code>
Password is generated with mkpasswd -m sha-512 or just use password_format = plain at your risk ;-) and put plain password here. </p>
<p>Remember it will be transfered over the network in plain text and if Asterisk is in internet using plain is a security hole. </p>
<p>Imagine a phone bill for $40,000 for calls to Inmarsat because Asterisk ARI access is sniffed.</p>