页面简介
Build an AI receptionist that answers your phone line: create it, write the prompt, add booking and transfers, connect your number, and test.
正文摘录
Back to AI AgentsVoiceHow to build an AI receptionist that answers real callsSix steps to an AI receptionist on a real phone line, in the Telnyx portal or through the API, with a sample prompt and a cost model.By Osman HusainThe Telnyx Voice AI agent platform connects an AI receptionist to Telnyx phone numbers, call transfer, and SIP on Telnyx's own carrier network. To build an AI receptionist:Create the assistant in the portal or through the API.Write the receptionist prompt.Add booking and transfer tools.Connect your phone line.Test it on real calls.Go live and review the first week.Pick your build pathTelnyx offers three ways to build an AI receptionist: the no-code portal, the API, or an agent framework the team already runs, connected to Telnyx phone numbers.The portal and the API both build on Telnyx's voice AI agents, a voice AI agent platform with telephony built in.Three ways to build an AI receptionist on Telnyx.PathBest forWhat the builder makesWhat Telnyx runsTelnyx portal, the no-code AI receptionist builderBusiness owners and agencies building for clientsThe prompt, the tools and the choice of numberSpeech recognition, the language model, the voice, the phone line and testingTelnyx APIDevelopers adding a receptionist to a productCode, webhooks and call logicThe same layers as the portalAn existing agent framework on Telnyx numbers and SIPTeams already running LiveKit or VapiThe agent and its hostingPhone numbers, SIP trunking and portingThe third path keeps the agent on the same platform where it lives today and moves only the phone line to Telnyx. Read connection guides for LiveKit and Vapi.Teams leaving Vapi, Retell, or ElevenLabs can also import their agents into Telnyx. The import brings the prompt and settings across; knowledge bases stay behind and need uploading again.Key components of an AI receptionistRegardless of the build path chosen, an AI receptionist runs on the same six layers: telephony, speech-to-text, a language model, text-to-speech, tools and orchestration.Together, the layers answer a business's inbound calls the way a front-desk receptionist would. For example, let's take a caller who says "I need to move my appointment to next Tuesday."Telephony answers the call and speech-to-text turns the request into text. The language model decides to check the calendar, a tool finds the open slot, and text-to-speech confirms the new time.The six layers of an AI receptionist and where each runs on Telnyx.LayerIts job on the callOn TelnyxTelephonyOwns the number, answers the call and transfers itTelnyx phone numbers, SIP trunking and the Voice APISpeech-to-textTurns the caller's speech into textA choice of streaming transcription modelsLanguage modelDecides what to say next and which tool to callTelnyx-hosted open models such as Kimi, or third-party models such as those from Anthropic and OpenAIText-to-speechTurns the reply into a voiceTelnyx voices, or voices from AWS, Azure, ElevenLabs and InworldToolsBooks, looks up and transfersWebhook, transfer, SIP REFER and MCP tools, plus native integrationsOrchestrationManages turn-taking, interruptions and handoffsThe Telnyx voice engineWhen those layers come from different providers, every hop between them adds round-trip time. A caller hears that time as a pause.Telnyx co-locates its GPUs with its telephony network, so the number, the voice engine and a Telnyx-hosted model form one end to end voice AI stack. Telnyx states response times under 200 milliseconds for its voice AI agents.A third-party model runs outside Telnyx's network and adds a hop back.How to build an AI receptionist, step by stepBuilding an AI receptionist on Telnyx takes six steps, from creating the assistant to reviewing its first week of calls. If you're building the receptionist, each step shows the portal path first and the API path after it.Step 1: Create the assistantAn AI receptionist starts as an assistant: the object that holds the receptionist's instructions, greeting, voice and tools. In the Telnyx portal, open AI Assistants and start from a template or a blank assistant.The default language model is Kimi, which Telnyx hosts on its own GPUs. The no-code setup guide walks through each screen.On a phone line, three settings matter most: the language, which a supported transcription model can detect; the voice; and noise suppression, worth turning on for callers on speakerphone or in a car.For developers, building an AI voice agent through the API takes one request. The create assistant reference lists every field.Bashcurl -X POST https://api.telnyx.com/v2/ai/assistants \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Front desk", "model": "moonshotai/Kimi-K2.6", "instructions": "You are the receptionist for [Business name]...", "greeting": "Thanks for calling [Business name]. How can I help?", "voice_settings": { "voice": "Telnyx.KokoroTTS.af_heart" }, "transcription": { "model": "deepgram/flux", "language": "en" } }'The response returns the assistant's ID. Every later API call uses that ID. The assistant also appears in the portal, so a developer and a business owner can work on the same receptionist.Step 2: Write the receptionist promptThe receptionist prompt decides what the receptionist answers, books, transfers and refuses. Start from the calls the business gets most: questions about hours and location, bookings and changes, and calls that need a person.The prompt below covers those three kinds of call and adds the rules that keep the receptionist from guessing. Copy it and replace the bracketed fields.CodeYou are the receptionist for [Business name], a [type of business] in [city].On every call, find out why the person is calling, then do one of three things: answer from the business information below, book or change an appointment, or transfer the call to a person.Business information- Hours: [hours]. Closed [days].- Address: [address]. Parking: [details].- Services and prices: [list].How to talk- Keep replies to one or two sentences. Ask one question at a time.- Read back names, dates and phone numbers to confirm them.Booking- Call check_availability before offering a time. Offer two options.- Call book_appointment once the caller picks a time, then read back the day, time and service.Transfers- Transfer to the front desk when the caller asks for a person, is upset, or has a billing question.- Outside business hours, do not transfer. If a transfer can't happen or nobody picks up, take a name, number and reason, and say someone will call back.Rules- If the answer is not in the business information, say you don't know and offer to take a message. Never guess prices, availability or policies.- Never give medical, legal or financial advice.Business information that runs long, such as a full service list or an FAQ document, belongs in the assistant's knowledge base instead of the prompt. The assistant's Knowledge Bases tab takes uploaded files or a website URL.Step 3: Add booking and transfer toolsTools let the receptionist act on a call: one books the appointment, another hands the caller to a person. Native integrations connect the assistant to Calendly and Outlook for booking and to CRMs such as Salesforce and HubSpot.Any other calendar, Google Calendar included, connects through a webhook tool that calls an endpoint the builder hosts to read open slots and write bookings back.For transfers, name each target (the front desk, a manager, an on-call line) with its number. Warm transfer lets the receptionist brief the staff member on who is calling and why before it connects the caller.Two safeguards bring the caller back to the receptionist, where the prompt's fallback rule takes over.Both are off by default, so a transfer that reaches voicemail leaves the caller in silence while the target's voicemail greeting plays on the other end.Voicemail detection ends a transfer that reaches voicemail and brings the caller back.Transfer acceptance asks whoever picks up to accept the call. A decline, a hang-up or two minutes without a decision brings the caller back too.The docs limit acceptance to calls started with the ai_assistant_start command and don't say whether portal-assigned numbers count, so confirm it on a test call.The docs also don't say what the transfer tool does when a call rings out with no voicemail. Targets that roll to voicemail avoid that gap, because voicemail detection then catches the call.The tools array below adds two booking webhooks (check and book) and a warm transfer to the Step 1 request:JSON"tools": [ { "type": "webhook", "webhook": { "name": "check_availability", "description": "Returns open appointment slots for a date", "url": "https://example.com/availability", "method": "POST", "body_parameters": { "type": "object", "properties": { "date": { "type": "string", "description": "Date as YYYY-MM-DD" } }, "required": ["date"] } } }, { "type": "webhook", "webhook": { "name": "book_appointment", "description": "Books a slot returned by check_availability", "url": "https://example.com/book", "method": "POST", "body_parameters": { "type": "object", "properties": { "slot": { "type": "string", "description": "Start time from check_availability" }, "name": { "type": "string", "description": "Caller's name" }, "phone": { "type": "string", "description": "Caller's phone number" } }, "required": ["slot", "name", "phone"] } } }, { "type": "transfer", "transfer": { "targets": [{ "name": "Front desk", "to": "+15555550100" }], "warm_transfer_instructions": "Tell the staff member the caller's name and why they called." } }]Step 4: Connect your phone lineA business can put an AI receptionist on its phone line in four ways. Telnyx's carrier network provisions, ports and routes the business phone numbers an AI receptionist answers.A new Telnyx number is the fastest start: buy phone numbers in the portal and assign one to the assistant.Number porting moves the business's existing number to Telnyx. FastPort-el