Provider integration
Connect Asterisk
Asterisk integration for Oduist Connect.
Connects an Asterisk PBX you already run — FreePBX, Issabel, or plain Asterisk — to the shared Odoo call ledger. No PBX image is shipped and no dialplan edits are required: a thin sidecar agent holds the AMI connection, streams call events to Odoo, uploads recordings, and executes click-to-call requests, all authenticated with one shared token carried as a bearer header in both directions.
The agent carries no business logic and no database of its own. Direction, status mapping, user matching and everything that becomes a connect.call happen in Odoo, which keeps the piece running next to a customer’s PBX small enough to reason about and lets an upgrade be an Odoo module upgrade. The web phone is equally direct: JsSIP registers over WebSocket against your Asterisk, so the agent never touches signaling or audio.
It behaves like any other Connect provider, so an existing PBX can run in the same database as a cloud backend while a migration is under way — each user’s Originate Provider decides which one places their calls. The trade is deliberate: your dialplan stays authoritative, and Odoo observes and enriches it rather than taking it over.
What it offers
-
AMI events without dialplan changes
A sidecar agent holds the AMI connection and forwards a fixed allowlist of events —
Newchannel,Newstate,Hangup,NewConnectedLine, failedOriginateResponseandVarSet MIXMONITOR_FILENAME— to/asterisk/webhook/eventsin batches. Your existing dialplan keeps working untouched. -
Endpoints map channels to users
Each Connect user gets one or more endpoints carrying the Asterisk channel of their phone, such as
PJSIP/101, which is what matches AMI events to a user and is dialed first on click-to-call. Per-endpoint settings cover the originate context, the auto-answer SIP header and the SIP transport. -
Click-to-call over Originate
Odoo posts to the agent's
/originateroute, which runs the AMI Originate in the configured dialplan context —from-internalon FreePBX — so calls placed from any Odoo record ring the user's own desk phone first. -
Recording upload after hangup
The agent uploads finished MixMonitor files to
/asterisk/webhook/recording/<uniqueid>.<ext>however MixMonitor was invoked, because the filename arrives on theVarSet MIXMONITOR_FILENAMEevent. The originals stay on the PBX: deleting after upload is off by default. -
JsSIP web phone straight to the PBX
The browser phone speaks SIP over WebSocket directly to your Asterisk, so the agent is in neither the signaling nor the media path. It needs TLS in
http.confand a pjsip WebRTC transport; the browser registers with the endpoint's own SIP credentials. -
Generated PBX config you can edit
Odoo renders the AMI account for
manager.confat/asterisk/api/manager_confand a full pjsip wizard config for every endpoint at/asterisk/api/sip_peers, both from Jinja2 templates (manager_conf,sip_peer_header,sip_peer) that are editable in Odoo and have a Reset to Default button. -
Odoo lookups from the dialplan
Token-authenticated HTTP routes let the dialplan ask Odoo who is calling and where to send them:
get_caller_namesetsCALLERID(name)from the contact,get_partner_managerroutes a caller to their salesperson, andget_user_data_by_didturns a DID into a user dialstring. -
Self-healing call state
The agent heartbeats every 60 seconds, so the settings form shows its version and whether AMI is connected, and a
PING AGENTbutton checks on demand. ACoreShowChannelsreconciliation once a minute closes stale active calls with synthetic hangups.
Scope of the current version
- You run the sidecar: the
oduist/asterisk-agentcontainer has to sit next to Asterisk, with the MixMonitor directory mounted read-only if you want recording upload. - Numbering, the dialplan, IVR and queues stay in your PBX — this module observes calls and originates them, it does not replace PBX configuration.
- SMS is not supported on this backend.
- Click-to-call needs Odoo to reach the agent URL over LAN, VPN or a port forward; event and recording flow only needs outbound HTTPS from the agent and works behind NAT.
- Asterisk 13–21, as FreePBX, Issabel or plain Asterisk. The AMI account is granted
call,dialplan,userreads andoriginate,call,reportingwrites — thesystemandcommandclasses are deliberately excluded, which also bounds the generic/ami_actionpassthrough. - The web phone requires WebRTC support on the Asterisk side: TLS enabled in
http.confand a pjsip WebSocket transport.
Installs with full features free for 30 days; buy the license inside the module.