Skip to content

feat(dialer): volunteer caller backend - #205

Merged
sukhada merged 3 commits into
dialer-campaign-typefrom
dialer-backend-2
Jun 16, 2026
Merged

feat(dialer): volunteer caller backend #205
sukhada merged 3 commits into
dialer-campaign-typefrom
dialer-backend-2

Conversation

@sukhada

@sukhada sukhada commented Jun 10, 2026

Copy link
Copy Markdown

Backend for the volunteer dialer, stacked on dialer-campaign-type:

  • GraphQL schema, resolvers, and Telnyx WebRTC token route
  • dialer lib: shift assignment, contact-hours-aware serving, atomic call_status claim, disposition + attempt tracking
  • forward migrations (campaign-type's create migrations left untouched):
    • 000009: drop call_campaigns_no_autoassign (call campaigns use autoassign for shifts)
    • 000010: add call_status/attempt_count/last_attempted_at to dialer_campaign_contact and disposition to dialer_call

Backend for the volunteer dialer, stacked on dialer-campaign-type:
- GraphQL schema, resolvers, and Telnyx WebRTC token route
- dialer lib: shift assignment, contact-hours-aware serving, atomic
  call_status claim, disposition + attempt tracking
- forward migrations (campaign-type's create migrations left untouched):
  - 000009: drop call_campaigns_no_autoassign (call campaigns use autoassign
    for shifts)
  - 000010: add call_status/attempt_count/last_attempted_at to
    dialer_campaign_contact and disposition to dialer_call

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sukhada
sukhada requested a review from ajohn25 June 10, 2026 22:08
Comment thread migrations/20260601000005_create-dialer-campaign-contact-tag.js

@ajohn25 ajohn25 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just flagging the 1 down migration, otherwise all suggestions! Review workout 😆

Comment thread libs/gql-schema/schema.ts Outdated
Comment thread migrations/20260601000002_create-dialer-campaign-contact.js
Comment thread migrations/20260601000005_create-dialer-campaign-contact-tag.js
Comment thread migrations/20260601000007_campaign-view-add-type.js Outdated
Comment on lines +18 to +19
table.integer("attempt_count").notNullable().defaultTo(0);
table.timestamp("last_attempted_at").nullable();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Intentional choice to put these back in?

Comment on lines +185 to +188
await trx.query(
`update campaign set external_system_id = null, landlines_filtered = false where id = $1`,
[campaignId]
);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: See question above about this happening for dialer too

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: do filtered out contacts make it to filtered_contact ?

optOutCount
});

// Always set a result message to mark the job as complete

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Intentional delete?

Comment thread src/config.js
Comment on lines +780 to +784
DIALER_SHIFT_SIZE: num({
desc:
"Number of contacts assigned to a volunteer per call shift when they request calls.",
default: 10
}),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Think we should just make a follow up issue for doing something similar to the texting flow to give admins greater control over this

r
.reader("dialer_campaign_contact")
.where({ campaign_id: campaign.id })
.where("attempt_count", ">", 0)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: I think a join to dialer_call with an EXISTS would be faster since this isn't indexed. Or we could index the column (but that might be overkill if this is the only place its used)

sukhada and others added 2 commits June 14, 2026 07:18
* chore(tool-versions): update node version (#195)

* feat(dialer): volunteer caller frontend (Telnyx WebRTC UI)

Frontend for the volunteer dialer, stacked on dialer-backend:
- VolunteerDialer container: WebRTC call controls, timer, status bar,
  disposition form, contact flow
- TexterTodoList: call-shift request entry point (CallRequest) and
  call-aware assignment summary
- AdminCampaignStats: call-campaign stat tweaks
- dialer GraphQL operations (hooks) and @telnyx/webrtc dependency

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(dialer): add canned responses + tags to calling (#208)

* feat(dialer): add canned responses + tags to calling

* feat(dialer): allow releasing calls (#209)

* feat(dialer): allow releasing calls

* feat(dialer): add texting history to call screen (#210)

* feat(dialer): add texting history to call screen

* chore: update seeds to not use logger.info

* chore(dialer): fix variable interpolation in script

---------

Co-authored-by: Aashish John <aashishjohn25@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@sukhada
sukhada merged commit 50b2306 into dialer-campaign-type Jun 16, 2026
5 checks passed
@sukhada
sukhada deleted the dialer-backend-2 branch June 16, 2026 17:14
sukhada added a commit that referenced this pull request Jun 17, 2026
* feat(campaigns): add campaign type (SMS/Call) to campaign editor

* feat(admin): add campaign type to admin UI

* feat(admin): add new dialer tables

* chore(admin): address feedback

* chore(dialer): address new table feedback

* chore(dialer): address feedback

* chore(dialer): regenerate schema dump

* chore(dialer): address feedback

* feat(dialer): volunteer caller backend  (#205)

* feat(dialer): volunteer caller backend (Design-B call tracking)

Backend for the volunteer dialer, stacked on dialer-campaign-type:
- GraphQL schema, resolvers, and Telnyx WebRTC token route
- dialer lib: shift assignment, contact-hours-aware serving, atomic
  call_status claim, disposition + attempt tracking
- forward migrations (campaign-type's create migrations left untouched):
  - 000009: drop call_campaigns_no_autoassign (call campaigns use autoassign
    for shifts)
  - 000010: add call_status/attempt_count/last_attempted_at to
    dialer_campaign_contact and disposition to dialer_call

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore(dialer): address feedback

* feat(dialer): volunteer caller frontend (Telnyx WebRTC UI)  (#207)

* chore(tool-versions): update node version (#195)

* feat(dialer): volunteer caller frontend (Telnyx WebRTC UI)

Frontend for the volunteer dialer, stacked on dialer-backend:
- VolunteerDialer container: WebRTC call controls, timer, status bar,
  disposition form, contact flow
- TexterTodoList: call-shift request entry point (CallRequest) and
  call-aware assignment summary
- AdminCampaignStats: call-campaign stat tweaks
- dialer GraphQL operations (hooks) and @telnyx/webrtc dependency

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(dialer): add canned responses + tags to calling (#208)

* feat(dialer): add canned responses + tags to calling

* feat(dialer): allow releasing calls (#209)

* feat(dialer): allow releasing calls

* feat(dialer): add texting history to call screen (#210)

* feat(dialer): add texting history to call screen

* chore: update seeds to not use logger.info

* chore(dialer): fix variable interpolation in script

---------

Co-authored-by: Aashish John <aashishjohn25@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Aashish John <aashishjohn25@gmail.com>

* chore(dialer): fix down migration for campaign type campaign view

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Aashish John <aashishjohn25@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants