Developer Needed: Fix Concurrent Dialing Connection Issue in Twilio web app
Budget: $50 – $0 USD
Summary
We have a power dialer platform built with Next.js and Twilio that implements concurrent
dialing (calling multiple leads simultaneously, connecting the first to answer). Currently,
when a lead picks up, they hear an error message and the call disconnects instead of connecting
to the agent.
The Problem
Our concurrent dialing feature fails at the critical moment of connection:
- Multiple calls are placed successfully to different leads
- When a lead answers, instead of bridging to the agent or connecting the user to the conference call with the lead, the call errors out
- The lead hears an error message and the call ends
- This happens consistently across all concurrent dial attempts
Current (Broken) Flow:
1. Agent clicks "Start Calling"
2. System dials 2-10 leads simultaneously via Supabase Edge Functions
3. Lead answers → System attempts to connect to agent
4. FAILURE: Connection fails with error message to lead
Tech Stack:
- Frontend: Next.js 14, React 18, TypeScript, Tailwind CSS
- Backend: Supabase (Postgres + Edge Functions)
- Voice: Twilio Client SDK (browser) + Twilio REST API
- State Management: React Query + Zustand
- Database: PostgreSQL with real-time subscriptions
Current Architecture:
- Server-side concurrent dialing via Supabase Edge Functions
- TwiML webhooks handling call flow
- Attempting to bridge calls from server to browser-based Twilio Client
- Race condition handling with atomic database updates
Key Files/Components:
- supabase/functions/concurrent_dial/ - Initiates multiple calls
- supabase/functions/twiml_handler/ - Handles call flow/bridging
- src/hooks/useDialerQueueV2.ts - Client-side dialing logic
- src/lib/voice.ts - Twilio Client SDK integration
Primary Goal:
Fix the connection issue so that when a lead answers during concurrent dialing, they are
successfully connected to the agent without errors.
Potential Solutions to Explore:
1. Client-Side Concurrent Dialing: Move concurrent dialing logic to browser using Twilio Client
SDK
2. Conference Bridge Approach: Use Twilio conferences instead of direct bridging
3. Fix Current Server-Side Implementation: Debug and fix the existing TwiML handler
Deliverables:
1. Working concurrent dial feature where leads connect to agents successfully
2. Clean, maintainable code following our existing patterns
3. Documentation of the solution and any architectural changes
4. Test cases demonstrating the fix works reliably
Required Skills:
- Strong Twilio experience (Client SDK, REST API, TwiML)
- WebRTC/VoIP debugging experience
- TypeScript/Node.js proficiency
- Supabase/PostgreSQL experience
- Experience with concurrent/parallel call handling
- Understanding of race conditions in distributed systems
Nice to Have:
- Previous experience with power dialers or call centers
- Familiarity with Next.js App Router
- Experience with real-time systems
Additional Context:
- We have detailed logs and can provide full access to debug
- Previous attempts involved both direct bridging and conference approaches
- The system works perfectly for single calls, only fails with concurrent dialing
- Agent must remain on their browser (no SIP phones)
We have a power dialer platform built with Next.js and Twilio that implements concurrent
dialing (calling multiple leads simultaneously, connecting the first to answer). Currently,
when a lead picks up, they hear an error message and the call disconnects instead of connecting
to the agent.
The Problem
Our concurrent dialing feature fails at the critical moment of connection:
- Multiple calls are placed successfully to different leads
- When a lead answers, instead of bridging to the agent or connecting the user to the conference call with the lead, the call errors out
- The lead hears an error message and the call ends
- This happens consistently across all concurrent dial attempts
Current (Broken) Flow:
1. Agent clicks "Start Calling"
2. System dials 2-10 leads simultaneously via Supabase Edge Functions
3. Lead answers → System attempts to connect to agent
4. FAILURE: Connection fails with error message to lead
Tech Stack:
- Frontend: Next.js 14, React 18, TypeScript, Tailwind CSS
- Backend: Supabase (Postgres + Edge Functions)
- Voice: Twilio Client SDK (browser) + Twilio REST API
- State Management: React Query + Zustand
- Database: PostgreSQL with real-time subscriptions
Current Architecture:
- Server-side concurrent dialing via Supabase Edge Functions
- TwiML webhooks handling call flow
- Attempting to bridge calls from server to browser-based Twilio Client
- Race condition handling with atomic database updates
Key Files/Components:
- supabase/functions/concurrent_dial/ - Initiates multiple calls
- supabase/functions/twiml_handler/ - Handles call flow/bridging
- src/hooks/useDialerQueueV2.ts - Client-side dialing logic
- src/lib/voice.ts - Twilio Client SDK integration
Primary Goal:
Fix the connection issue so that when a lead answers during concurrent dialing, they are
successfully connected to the agent without errors.
Potential Solutions to Explore:
1. Client-Side Concurrent Dialing: Move concurrent dialing logic to browser using Twilio Client
SDK
2. Conference Bridge Approach: Use Twilio conferences instead of direct bridging
3. Fix Current Server-Side Implementation: Debug and fix the existing TwiML handler
Deliverables:
1. Working concurrent dial feature where leads connect to agents successfully
2. Clean, maintainable code following our existing patterns
3. Documentation of the solution and any architectural changes
4. Test cases demonstrating the fix works reliably
Required Skills:
- Strong Twilio experience (Client SDK, REST API, TwiML)
- WebRTC/VoIP debugging experience
- TypeScript/Node.js proficiency
- Supabase/PostgreSQL experience
- Experience with concurrent/parallel call handling
- Understanding of race conditions in distributed systems
Nice to Have:
- Previous experience with power dialers or call centers
- Familiarity with Next.js App Router
- Experience with real-time systems
Additional Context:
- We have detailed logs and can provide full access to debug
- Previous attempts involved both direct bridging and conference approaches
- The system works perfectly for single calls, only fails with concurrent dialing
- Agent must remain on their browser (no SIP phones)