Mahimai Raja
04/07/2025, 6:33 AMVapi Support Bot
04/07/2025, 6:34 AMVapi Support Bot
04/07/2025, 6:34 AMpython
@app.post("/twilio/inbound_call", response_class=PlainTextResponse)
async def receive_call_data(
AccountSid: str = Form(...),
# Other parameters...
):
# Process the call data
# ...
# Forward to Vapi
# ...
## Implementing the Delay Logic
For the 10-second delay and inactivity check, you would need to implement a timer or delay function in your Custom LLM's backend logic. According to [this source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333783762579755020), the general approach would be:
1. Play the initial message to the user
2. Start a timer (10 seconds in your case)
3. Listen for a response
4. If no response is detected within the specified time, send the follow-up message
## Configuring Idle Messages
While you mentioned you don't want to use idle messages specifically, the configuration approach is similar. In Vapi, you can configure message plans with parameters like:
```python
class MessagePlan(BaseModel):
idleMessages: List[str] = ["Are you still there?"]
idleMessageMaxSpokenCount: float = 3Pigeon
04/07/2025, 7:38 AMShubham Bajaj
04/07/2025, 8:04 AMPigeon
04/07/2025, 8:07 AMPigeon
04/07/2025, 8:08 AMPigeon
04/07/2025, 8:10 AMaccca80e-11ac-418d-b82a-718501f04021
Pigeon
04/07/2025, 8:11 AMShubham Bajaj
04/07/2025, 3:54 PMMahimai Raja
04/08/2025, 2:31 AMMahimai Raja
04/08/2025, 2:32 AMKings_big💫
04/08/2025, 2:43 AMMahimai Raja
04/08/2025, 2:50 AMMahimai Raja
04/08/2025, 2:55 AMKings_big💫
04/08/2025, 3:00 AMMahimai Raja
04/08/2025, 3:15 AMMahimai Raja
04/08/2025, 3:16 AMpy
curl -X POST 'https://aws-us-west-2-production1-phone-call-websocket.vapi.ai/7420f27a-30fd-4f49-a995-5549ae7cc00d/control'
-H 'content-type: application/json'
--data-raw '{
"type": "add-message",
"message": {
"role": "system",
"content": "New message added to conversation"
},
"triggerResponseEnabled": true
}'
Can do the same to add message for user
to simulate?Kings_big💫
04/08/2025, 3:20 AMMahimai Raja
04/08/2025, 3:22 AMShubham Bajaj
04/08/2025, 11:08 PMKings_big💫
04/09/2025, 5:26 AMMahimai Raja
04/09/2025, 6:16 AMShubham Bajaj
04/10/2025, 11:30 PM