Lead Lifecycle
scheduler.py only selects leads where:
dispatched.
Call Lifecycle
calls row. This means one lead can have multiple call attempts over time.
Successful Call Flow
- Lead starts as
new. - Scheduler validates call window and phone number.
- Scheduler creates a
callsrow withstatus='calling'. - Scheduler calls LiveKit
create_sip_participant. - LiveKit uses the configured outbound SIP trunk to call the lead through Vobiz.
- Agent joins
ignitech-lead-{lead_id}. - Lead answers and speaks with the agent.
- Agent extracts structured qualification.
db.save_qualification()stores JSON and marks the callcalled.talkingshops_pusher.pypushes the record to Talking Shops.db.set_call_pushed()marks the callpushed.
Failure Reasons
Thecalls.failure_reason field is machine-readable.
Retry Behavior
Retry scheduling is centralized indb.py.
Default:
retry_count exceeds MAX_CALL_RETRIES, the lead is marked failed.
Phone Validation
Outbound dialing is India-mobile focused. The scheduler accepts:98765XXXXX098765XXXXX9198765XXXXX+9198765XXXXX
6, 7, 8, or 9.