Stop sending after-hours callers to voicemail: an AI receptionist on the Asterisk you already run
Put a Skysay AI agent behind your existing Asterisk dialplan so callers after hours, at peak and at the "press 1" menu are answered, booked or routed, on the same numbers and trunk. Three dialplan recipes and what to check before go-live.

It is 19:10 on a Tuesday. A patient calls your clinic to move tomorrow's appointment. Your Asterisk plays the closed message and offers voicemail. They hang up, and tomorrow's 9:00 slot stays empty.
The same call, with an AI agent on that after-hours branch:
Caller: Hi, I need to move my appointment tomorrow, something came up.
Agent: Of course. Can I have your name and date of birth?
Caller: Maria Lopez, 3 March 1988.
Agent: Thanks, Maria. I can move you from 9:00 tomorrow to Thursday at 11:30 or Friday at 8:45. Which suits you?
Caller: Thursday, please.
Agent: So I move your appointment from tomorrow at 9:00 to Thursday at 11:30. Shall I do that?
Caller: Yes.
Agent: Done. You are booked for Thursday at 11:30.
The agent did the booking through your own booking system, and only after Maria said yes to the change it read back.
You can add an AI receptionist to Asterisk without changing numbers, trunk or carrier. Skysay connects to Asterisk through chan_websocket: for each call your dialplan sends, Asterisk opens an encrypted WebSocket to the Skysay AI agent, so you open no inbound port. Setup takes four steps across Skysay and your PBX, and any branch of your dialplan can go to the agent: after hours, queue overflow, or the main line instead of a "press 1" menu.
Which calls should an AI receptionist answer?
Keep your people on the calls they handle well. Give the Skysay AI agent the calls that today end in voicemail, in a queue nobody picks up, or in a menu the caller gives up on.
| Call today | What the caller gets now | What the AI agent does instead |
|---|---|---|
| After hours | Closed message, voicemail | Answers, takes the reason, and books, reschedules or logs a callback through the tools you connect |
| Queue overflow at peak | Hold music, then voicemail | Picks up when your team cannot, handles the simple requests, and requests a transfer or logs a callback for the rest |
| "Press 1 for sales, 2 for support" | A menu that does not fit their question | Asks what they need and requests a transfer to an allowed department through your PBX, after the caller confirms |
The agent only does what you give it: the instructions you publish, the departments you allow, and the tools you connect, such as a booking or ticketing endpoint that you sign and control. Every change it makes is read back to the caller and confirmed first.
How to connect an AI agent to Asterisk
Connect the agent
- In Skysay, open a hosted AI agent and choose PBX. Publish its voice setup, instructions, tools and any call variables it needs.
- Under Connection keys, create a key for this PBX. Copy its password now: it is shown once.
- Paste the generated
websocket_client.confblock and dialplan contexts into Asterisk. Fill in the password, keep certificate verification on, and on RHEL-based systems change the CA bundle path as the guide shows. Reload. - Place a test call. Recent connections shows whether Skysay took the call or refused it, and why.
Connect your PBX names the Asterisk version we qualify. The generated block has a context called skysay_<agent_id> (the generated block shows your agent's ID). The recipes below set the caller's number (SKYSAY_REMOTE) and the number they dialled (SKYSAY_LINE), then enter that context.
Recipe 1: after hours
Keep your open-hours branch (open-hours below stands for your own context). Send every other call to the agent instead of voicemail:
exten => _X.,1,GotoIfTime(08:00-18:00,mon-fri,*,*?open-hours,${EXTEN},1)
same => n,Set(SKYSAY_REMOTE=${CALLERID(num)})
same => n,Set(SKYSAY_LINE=${EXTEN})
same => n,Goto(skysay_<agent_id>,s,1)
Change _X. to match how your numbers arrive, for example _+X. for numbers with a leading +.
Recipe 2: overflow at peak
Let the queue ring your team first, with a 25-second timeout. When Queue returns without a team member answering, the call goes to the agent:
exten => _X.,1,Set(SKYSAY_REMOTE=${CALLERID(num)})
same => n,Set(SKYSAY_LINE=${EXTEN})
same => n,Queue(support,,,,25)
same => n,Goto(skysay_<agent_id>,s,1)
Depending on your queue's join and leave settings, Queue can also return before the timeout, for example when nobody is logged in. Check ${QUEUESTATUS} first if only timeouts should go to the agent.
Recipe 3: replace the menu
Point the main line at the agent instead of the menu:
exten => _X.,1,Set(SKYSAY_REMOTE=${CALLERID(num)})
same => n,Set(SKYSAY_LINE=${EXTEN})
same => n,Goto(skysay_<agent_id>,s,1)
Then give the agent the department transfer. Under Tools, the department preset adds an action to a signed integration you already have. You list the departments your PBX knows and provide an HTTPS endpoint. Save the agent and publish again. The agent picks one of your departments, reads it back, and sends the request only after the caller says yes:
Caller: My invoice charged me twice this month.
Agent: I will put you through to Billing. Is that right?
Caller: Yes.
Your endpoint checks the signature, skips an action ID it has already seen, finds the caller's original Asterisk channel from the call ID it receives, and transfers that channel with your own PBX controller. The agent never dials a raw extension or a number it chose itself. If Billing does not answer, your PBX decides what happens next.
Before you switch it on
Plan for a call the agent cannot take
Skysay checks the agent's setup, your balance and your capacity before it takes a call. A refused call that has not been answered yet stays unanswered, and the generated context hangs up. To send those callers to voicemail instead, replace the Hangup() right after the generated Dial line with:
same => n,GotoIf($["${DIALSTATUS}"="ANSWER"]?done)
same => n,VoiceMail(100@default,u)
same => n(done),Hangup()
ANSWER means the agent took the call; anything else goes to voicemail. Use your own mailbox in place of 100@default. Keep the n option in the generated Dial line, and do not add an Answer() before it. This covers calls Skysay refuses; the generated reject branch, for call details too long to send, still hangs up.
Check the rest
- Pass the context the agent needs. The generated dialplan sends the caller's number, the dialled line and Asterisk's own call ID. Required business values, such as a customer or site ID, come from your dialplan; Skysay never fills them in itself.
- Give each PBX its own key. Two PBXs can produce the same call IDs; separate keys keep them apart.
- Know what you pay for. A PBX call uses the AI agent's components and your plan's live-call capacity. Skysay adds no carrier leg: your numbers, trunk and carrier stay as they are, and your carrier bills its own usage. Estimate a month on the pricing page.
- Find the calls afterwards. On Calls, the PBX filter shows these calls as "PBX call · Asterisk", with the original Asterisk call ID.
Questions
Do I need a new number or a new carrier?
No. The Skysay AI agent answers on the numbers that already reach your Asterisk, over your existing SIP trunk. Skysay adds no carrier leg to a PBX call: you pay for the AI agent's components, and your carrier bills its own usage as before.
Can the AI receptionist put the caller through to a person?
Yes, through your PBX. The Skysay AI agent requests a transfer to one of the departments you allow, after the caller confirms. Your endpoint verifies the request and transfers the original Asterisk channel; your PBX handles a department that does not answer.
What if my phone system is not Asterisk?
The direct PBX connection works with Asterisk through chan_websocket. A phone system that only speaks SIP can connect to Skysay as a SIP trunk instead.
Start with one branch
Pick the branch that loses the most callers today, usually after hours, and send only that one to the agent for a week. Read those calls on Calls, then add the overflow branch.
Setup, the generated configuration and what Skysay checks before it takes a call are in Connect your PBX. A refused attempt shows its reason under Recent connections.


