# gudge25/ndialer architecture

> Architecture diagram of the GitHub repository gudge25/ndialer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gudge25/ndialer
- Repository: https://github.com/gudge25/ndialer

## Overview

Newfies-Dialer is a multi-tenant voice-broadcast and contact-center platform. Users manage campaigns, phonebooks, subscribers, audio, and IVR surveys through its interfaces or API; campaigns then create call work, which is processed through messaging workers and a telephony engine, with delivery and call reporting available afterward. The repository also includes SMS campaigns and appointment reminders. The README documents the broad product workflow and integrations; sampled task excerpts and the SOURCE INDEX clarify some campaign, call-request, and reminder operations, but most subsystem internals were not sampled.

Main entry points: [`newfies/dialer_campaign/models.py`](https://github.com/gudge25/ndialer/blob/main/newfies/dialer_campaign/models.py) (Campaigns), [`newfies/dialer_campaign/tasks.py`](https://github.com/gudge25/ndialer/blob/main/newfies/dialer_campaign/tasks.py) (Campaign dispatch), [`newfies/appointment/tasks.py`](https://github.com/gudge25/ndialer/blob/main/newfies/appointment/tasks.py) (Reminder dispatch), [`newfies/dialer_cdr/tasks.py`](https://github.com/gudge25/ndialer/blob/main/newfies/dialer_cdr/tasks.py) (Call processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_campaign["Campaign management"]
  node_campaigns["Campaigns<br/>[models.py]"]
  node_phonebooks[("Contacts<br/>[models.py]")]
  node_subscriber_import["Subscriber import<br/>[tasks.py]"]
  node_surveys["IVR surveys<br/>[models.py]"]
  node_audio["Audio applications<br/>[views.py]"]
end

subgraph group_delivery["Call delivery"]
  node_campaign_tasks["Campaign dispatch<br/>[tasks.py]"]
  node_call_requests[("Call requests<br/>[models.py]")]
  node_workers["Messaging workers"]
  node_freeswitch{{"FreeSWITCH"}}
  node_call_tasks["Call processing<br/>[tasks.py]"]
  node_call_reports["Call reporting<br/>[views.py]"]
end

subgraph group_engagement["Customer engagement"]
  node_sms_campaigns[("SMS campaigns<br/>[models.py]")]
  node_sms_tasks["SMS delivery<br/>[tasks.py]"]
  node_appointments[("Appointments<br/>[events.py]")]
  node_reminder_tasks["Reminder dispatch<br/>[tasks.py]"]
  node_mailer["Email delivery<br/>[tasks.py]"]
end

subgraph group_platform["Platform access"]
  node_admin_ui["Admin interface<br/>[views.py]"]
  node_customer_ui["Customer frontend<br/>[views.py]"]
  node_rest_api["REST API"]
  node_profiles[("User profiles<br/>[models.py]")]
  node_settings[("Dialer settings<br/>[models.py]")]
end

node_users(("Campaign users"))

node_users -->|"manage campaigns"| node_customer_ui
node_users -->|"administer"| node_admin_ui
node_users -->|"integrate through"| node_rest_api
node_customer_ui -->|"configure"| node_campaigns
node_admin_ui -->|"control"| node_campaigns
node_rest_api -->|"manage"| node_campaigns
node_campaigns -->|"use contacts"| node_phonebooks
node_campaign_tasks -->|"import subscribers"| node_subscriber_import
node_campaign_tasks -->|"create call work"| node_call_requests
node_campaign_tasks -->|"copy survey"| node_surveys
node_campaigns -->|"dispatch campaign"| node_campaign_tasks
node_campaign_tasks -.->|"enqueue tasks"| node_workers
node_workers -->|"process calls"| node_freeswitch
node_freeswitch -.->|"return call results"| node_call_tasks
node_call_tasks -->|"update requests"| node_call_requests
node_call_tasks -.->|"record call data"| node_call_reports
node_customer_ui -->|"view reporting"| node_call_reports
node_campaigns -.->|"launch SMS"| node_sms_campaigns
node_sms_campaigns -->|"dispatch messages"| node_sms_tasks
node_sms_tasks -.->|"enqueue delivery"| node_workers
node_appointments -->|"schedule reminders"| node_reminder_tasks
node_reminder_tasks -->|"create call requests"| node_call_requests
node_reminder_tasks -.->|"send SMS reminders"| node_sms_tasks
node_reminder_tasks -.->|"send email reminders"| node_mailer
node_campaigns -->|"apply limits"| node_settings
node_campaigns -->|"scope by user"| node_profiles

click node_admin_ui "https://github.com/gudge25/ndialer/blob/main/newfies/agent/views.py"
click node_customer_ui "https://github.com/gudge25/ndialer/blob/main/newfies/frontend/views.py"
click node_rest_api "https://github.com/gudge25/ndialer/tree/main/newfies/apirest"
click node_campaigns "https://github.com/gudge25/ndialer/blob/main/newfies/dialer_campaign/models.py"
click node_phonebooks "https://github.com/gudge25/ndialer/blob/main/newfies/dialer_contact/models.py"
click node_subscriber_import "https://github.com/gudge25/ndialer/blob/main/newfies/dialer_contact/tasks.py"
click node_surveys "https://github.com/gudge25/ndialer/blob/main/newfies/survey/models.py"
click node_audio "https://github.com/gudge25/ndialer/blob/main/newfies/dialer_audio/views.py"
click node_campaign_tasks "https://github.com/gudge25/ndialer/blob/main/newfies/dialer_campaign/tasks.py"
click node_call_requests "https://github.com/gudge25/ndialer/blob/main/newfies/dialer_cdr/models.py"
click node_call_tasks "https://github.com/gudge25/ndialer/blob/main/newfies/dialer_cdr/tasks.py"
click node_call_reports "https://github.com/gudge25/ndialer/blob/main/newfies/dialer_cdr/views.py"
click node_sms_campaigns "https://github.com/gudge25/ndialer/blob/main/newfies/mod_sms/models.py"
click node_sms_tasks "https://github.com/gudge25/ndialer/blob/main/newfies/mod_sms/tasks.py"
click node_appointments "https://github.com/gudge25/ndialer/blob/main/newfies/appointment/models/events.py"
click node_reminder_tasks "https://github.com/gudge25/ndialer/blob/main/newfies/appointment/tasks.py"
click node_mailer "https://github.com/gudge25/ndialer/blob/main/newfies/mod_mailer/tasks.py"
click node_profiles "https://github.com/gudge25/ndialer/blob/main/newfies/user_profile/models.py"
click node_settings "https://github.com/gudge25/ndialer/blob/main/newfies/dialer_settings/models.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_campaigns,node_phonebooks,node_subscriber_import,node_surveys,node_audio,node_users toneBlue
class node_campaign_tasks,node_call_requests,node_workers,node_freeswitch,node_call_tasks,node_call_reports toneAmber
class node_sms_campaigns,node_sms_tasks,node_appointments,node_reminder_tasks,node_mailer toneMint
class node_admin_ui,node_customer_ui,node_rest_api,node_profiles,node_settings toneRose
```

## Components

### Campaign management

- [Campaigns](https://github.com/gudge25/ndialer/blob/main/newfies/dialer_campaign/models.py): `newfies/dialer_campaign/models.py`
- [Contacts](https://github.com/gudge25/ndialer/blob/main/newfies/dialer_contact/models.py): `newfies/dialer_contact/models.py`
- [Subscriber import](https://github.com/gudge25/ndialer/blob/main/newfies/dialer_contact/tasks.py): `newfies/dialer_contact/tasks.py`
- [IVR surveys](https://github.com/gudge25/ndialer/blob/main/newfies/survey/models.py): `newfies/survey/models.py`
- [Audio applications](https://github.com/gudge25/ndialer/blob/main/newfies/dialer_audio/views.py): `newfies/dialer_audio/views.py`

### Call delivery

- [Campaign dispatch](https://github.com/gudge25/ndialer/blob/main/newfies/dialer_campaign/tasks.py): `newfies/dialer_campaign/tasks.py`
- [Call requests](https://github.com/gudge25/ndialer/blob/main/newfies/dialer_cdr/models.py): `newfies/dialer_cdr/models.py`
- **Messaging workers**
- **FreeSWITCH**
- [Call processing](https://github.com/gudge25/ndialer/blob/main/newfies/dialer_cdr/tasks.py): `newfies/dialer_cdr/tasks.py`
- [Call reporting](https://github.com/gudge25/ndialer/blob/main/newfies/dialer_cdr/views.py): `newfies/dialer_cdr/views.py`

### Customer engagement

- [SMS campaigns](https://github.com/gudge25/ndialer/blob/main/newfies/mod_sms/models.py): `newfies/mod_sms/models.py`
- [SMS delivery](https://github.com/gudge25/ndialer/blob/main/newfies/mod_sms/tasks.py): `newfies/mod_sms/tasks.py`
- [Appointments](https://github.com/gudge25/ndialer/blob/main/newfies/appointment/models/events.py): `newfies/appointment/models/events.py`
- [Reminder dispatch](https://github.com/gudge25/ndialer/blob/main/newfies/appointment/tasks.py): `newfies/appointment/tasks.py`
- [Email delivery](https://github.com/gudge25/ndialer/blob/main/newfies/mod_mailer/tasks.py): `newfies/mod_mailer/tasks.py`

### Platform access

- [Admin interface](https://github.com/gudge25/ndialer/blob/main/newfies/agent/views.py): `newfies/agent/views.py`
- [Customer frontend](https://github.com/gudge25/ndialer/blob/main/newfies/frontend/views.py): `newfies/frontend/views.py`
- [REST API](https://github.com/gudge25/ndialer/tree/main/newfies/apirest): `newfies/apirest`
- [User profiles](https://github.com/gudge25/ndialer/blob/main/newfies/user_profile/models.py): `newfies/user_profile/models.py`
- [Dialer settings](https://github.com/gudge25/ndialer/blob/main/newfies/dialer_settings/models.py): `newfies/dialer_settings/models.py`

### Other components

- **Campaign users**

## Connections

- Campaign users → Customer frontend: manage campaigns
- Campaign users → Admin interface: administer
- Campaign users → REST API: integrate through
- Customer frontend → Campaigns: configure (evidence: `newfies/frontend/views.py`)
- Admin interface → Campaigns: control
- REST API → Campaigns: manage (evidence: `newfies/apirest/campaign_serializers.py`)
- Campaigns → Contacts: use contacts (evidence: `newfies/dialer_campaign/models.py`)
- Campaign dispatch → Subscriber import: import subscribers (evidence: `newfies/dialer_campaign/tasks.py`)
- Campaign dispatch → Call requests: create call work (evidence: `newfies/dialer_campaign/tasks.py`)
- Campaign dispatch → IVR surveys: copy survey (evidence: `newfies/dialer_campaign/tasks.py`)
- Campaigns → Campaign dispatch: dispatch campaign (evidence: `newfies/dialer_campaign/tasks.py`)
- Campaign dispatch → Messaging workers: enqueue tasks
- Messaging workers → FreeSWITCH: process calls
- FreeSWITCH → Call processing: return call results
- Call processing → Call requests: update requests (evidence: `newfies/dialer_cdr/tasks.py`)
- Call processing → Call reporting: record call data
- Customer frontend → Call reporting: view reporting
- Campaigns → SMS campaigns: launch SMS (evidence: `newfies/mod_sms/models.py`)
- SMS campaigns → SMS delivery: dispatch messages (evidence: `newfies/mod_sms/tasks.py`)
- SMS delivery → Messaging workers: enqueue delivery
- Appointments → Reminder dispatch: schedule reminders (evidence: `newfies/appointment/tasks.py`)
- Reminder dispatch → Call requests: create call requests (evidence: `newfies/appointment/tasks.py`)
- Reminder dispatch → SMS delivery: send SMS reminders
- Reminder dispatch → Email delivery: send email reminders
- Campaigns → Dialer settings: apply limits (evidence: `newfies/dialer_campaign/models.py`)
- Campaigns → User profiles: scope by user (evidence: `newfies/dialer_campaign/models.py`)
