hooks does something at a moment of the call, up to 10 rules: on: "silence" (the caller has said nothing for seconds, 3–600, since the agent finished; once until they speak again), on: "time_elapsed" (seconds into the call, 10–3600) or on: "call_ending". Each does up to 3 of {type: "say", text}, {type: "transfer", destination?}, {type: "end_call", text?} and {type: "tool", name, args?}; a rule for the call's end only runs functions. A call a rule ends has ended_reason rule_ended.
On phone calls the keys a caller presses reach the agent as their answer: an entry ends with # or a two-second pause. On outbound calls the agent can also press keys to get through a company's phone menu.
transfer_number is the agent's main number for handing a caller to a person, and the number rung when the workspace is out of credits. transfer_destinations adds named numbers, each with a note on when to use it ("Billing: questions about invoices and refunds"), and the agent chooses. With transfer_briefing on, the agent writes a short summary as it transfers; the person who picks up hears it, in an EvaSay voice and in the agent's summary language, before the caller is put through. A call's ended_reason is then transferred.
With handoffs, an agent can pass a call to another published agent of your workspace, such as a front desk passing a booking to a booking agent. The agent chooses by when. The other agent takes over the same call with everything said so far, and speaks with its own instructions, voice, knowledge, tools and handoffs. The call stays listed, analyzed and billed under the first agent; its transcript notes each handoff.
On a phone call through your own carrier, the agent can text the caller what it would show as cards on a web call: up to three items (a title, a line, a link) in one text, from the number of the call. It asks the caller first. Turn it on with sms in send_to_caller; the websites and ready-made cards are the same as for cards. Your carrier charges you for texts.
"send_to_caller": {
"enabled": true,
"allowed_hosts": ["shop.example.com"],
"sms": { "enabled": true, "signature": "Acme Salon", "countries": ["CA"] }
}
signature opens every text (the agent's name when empty). Texts go to numbers in the country of your number and in the countries you add.call.message_sent (channel is sms, with its status), and what became of it as call.message_status (delivered, failed with a reason, or unconfirmed). GET /calls/{id} lists the call's texts.