The three phases
You assign functions to phases from the agent’s Functions tab, under Call Lifecycle for the before and after phases, and under the tool list for during-call functions.
Before the call
Use this for anything the agent should already know when it picks up — an account record, a delivery status, whether this caller is on a list. The function runs once at the start of the call. Whatever it returns becomes available to the agent as context and as variables the workflow can use, so the agent can greet the caller with the information already in hand rather than looking it up mid-sentence.During the call
This is the default. The function is exposed to the agent as a tool, and the agent calls it when the conversation calls for it — looking up an order, checking availability, creating a ticket. Because the caller is waiting, keep these fast. If an operation is slow and the result is not needed for the agent’s next sentence, mark it async instead.After the call
Use this to push an outcome somewhere once the call is over. The function runs after the call ends, when the transcript, the summary, and any structured analysis are available. Typical uses:- Writing a record into an internal system
- Notifying a team about an outcome
- Triggering a follow-up process
Post-call functions and webhooks cover similar ground. Use a webhook when you want the call data delivered to a system you control; use a post-call function when you want to act on the call from inside VoiceInfra’s function system.
Choosing a phase
Use before the call when
The agent should know something from the first word, and the value does not change during the call.
Use during the call when
The caller’s own words decide whether the action is needed, or the data must be current at that moment.
Use after the call when
The action needs the finished conversation — the transcript, summary, or extracted fields.
Use a webhook instead when
You want the raw call record pushed to your own endpoint rather than acting on it inside VoiceInfra.
Frequently asked questions
Can I assign more than one function to a phase?
Can I assign more than one function to a phase?
Yes. You can assign multiple functions to the before and after phases, and as many tools to the during-call phase as you need.
What can a before-the-call function return?
What can a before-the-call function return?
Its response becomes context the agent can use, exposed to prompts and workflows as variables. Return structured JSON with clearly named fields so the agent can reference specific values.
What information is available to an after-the-call function?
What information is available to an after-the-call function?
The call has finished, so the transcript, the AI-generated summary, and any structured analysis are all available alongside the call’s basic details.
Can a before or after function be used as a tool in a workflow?
Can a before or after function be used as a tool in a workflow?
No. Workflow tool nodes run mid-conversation, so they only accept during-call functions. Publishing tells you when this is the problem.
Do lifecycle functions count against plan limits?
Do lifecycle functions count against plan limits?
Assigning them does not. Any API calls they make are yours, and any calls or messages they trigger are metered normally.