# abstract-open-solutions/openvoip_click2dial architecture

> Architecture diagram of the GitHub repository abstract-open-solutions/openvoip_click2dial, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abstract-open-solutions/openvoip_click2dial
- Repository: https://github.com/abstract-open-solutions/openvoip_click2dial

## Overview

This Odoo add-on lets a user initiate an OpenVoip call from a partner or contact’s phone or mobile field. The partner actions pass the selected number to shared call logic, which normalizes it, obtains the user and company settings, builds a verification value and provider URL, then either requests the provider or logs debug details. The README documents these configuration and debug capabilities; the sampled sources show the call path and settings models, but not the view XML internals.

Main entry points: [`click2dial.py`](https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/click2dial.py) (Call preparation), [`model/res_users.py`](https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/model/res_users.py) (User VoIP settings), [`model/res_company.py`](https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/model/res_company.py) (Company VoIP settings), [`view/res_partner.xml`](https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/view/res_partner.xml) (Partner dial buttons)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Odoo interface"]
  node_partner_ui["Partner dial buttons<br/>[res_partner.xml]"]
  node_user_settings_ui["User settings form<br/>[res_users.xml]"]
  node_company_settings_ui["Company settings form<br/>[res_company.xml]"]
end

subgraph group_settings["VoIP settings"]
  node_user_model["User VoIP settings<br/>[res_users.py]"]
  node_company_model["Company VoIP settings<br/>[res_company.py]"]
end

subgraph group_calling["Call execution"]
  node_partner_actions["Partner dial actions<br/>[res_partner.py]"]
  node_call_logic["Call preparation<br/>[click2dial.py]"]
end

node_user(("Odoo user"))
node_odoo_store[("Odoo database")]
node_provider["OpenVoip service"]

node_user -->|"clicks dial"| node_partner_ui
node_partner_ui -->|"invokes action"| node_partner_actions
node_partner_actions -->|"passes number"| node_call_logic
node_call_logic -->|"reads credentials"| node_user_model
node_call_logic -->|"reads URL and debug"| node_company_model
node_user_settings_ui -->|"edits settings"| node_user_model
node_company_settings_ui -->|"edits settings"| node_company_model
node_user_model -->|"persists settings"| node_odoo_store
node_company_model -->|"persists settings"| node_odoo_store
node_call_logic -.->|"requests call"| node_provider

click node_partner_ui "https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/view/res_partner.xml"
click node_partner_actions "https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/model/res_partner.py"
click node_call_logic "https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/click2dial.py"
click node_user_settings_ui "https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/view/res_users.xml"
click node_user_model "https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/model/res_users.py"
click node_company_settings_ui "https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/view/res_company.xml"
click node_company_model "https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/model/res_company.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_partner_ui,node_user_settings_ui,node_company_settings_ui,node_user toneBlue
class node_user_model,node_company_model,node_odoo_store toneAmber
class node_partner_actions,node_call_logic toneMint
class node_provider toneIndigo
```

## Components

### Odoo interface

- [Partner dial buttons](https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/view/res_partner.xml): `view/res_partner.xml`
- [User settings form](https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/view/res_users.xml): `view/res_users.xml`
- [Company settings form](https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/view/res_company.xml): `view/res_company.xml`

### VoIP settings

- [User VoIP settings](https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/model/res_users.py): `model/res_users.py`
- [Company VoIP settings](https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/model/res_company.py): `model/res_company.py`

### Call execution

- [Partner dial actions](https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/model/res_partner.py): `model/res_partner.py`
- [Call preparation](https://github.com/abstract-open-solutions/openvoip_click2dial/blob/master/click2dial.py): `click2dial.py`

### Other components

- **Odoo user**
- **Odoo database**
- **OpenVoip service**

## Connections

- Odoo user → Partner dial buttons: clicks dial
- Partner dial buttons → Partner dial actions: invokes action
- Partner dial actions → Call preparation: passes number
- Call preparation → User VoIP settings: reads credentials
- Call preparation → Company VoIP settings: reads URL and debug
- User settings form → User VoIP settings: edits settings
- Company settings form → Company VoIP settings: edits settings
- User VoIP settings → Odoo database: persists settings
- Company VoIP settings → Odoo database: persists settings
- Call preparation → OpenVoip service: requests call
