Documentation Index
Fetch the complete documentation index at: https://docs.spn.wtf/llms.txt
Use this file to discover all available pages before exploring further.
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.
| Reason | Meaning |
|---|---|
rejected | Caller rejected or disconnected before usable conversation |
unanswered | Call was not answered |
dispatch_failed | LiveKit SIP participant creation failed |
startup_failed | Agent could not start or find the call context |
stale_timeout | Call stayed in calling for too long |
no_answers | Call connected but no useful qualification data was captured |
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.