Platform

Connect your phone numbers

Bring your own SIP trunk or phone system (PBX) and your own phone numbers. Attach a number to a voice agent and every call to that number is answered by the agent: the same instructions, voice, tools, knowledge, recording and Quality checks as any other call. Set a trunk to place calls too, and your call lists and calling workflows dial out through it with your own number as caller ID. The numbers, the carrier and the carrier's bill stay yours; InferexAI does not sell numbers or place calls on its own account.

How it works

  1. You add a trunk: the connection your calls arrive on, from your carrier or your own phone system.
  2. You add the phone numbers you hold on that trunk.
  3. You attach each number to a voice agent.
  4. Your carrier sends calls for those numbers to InferexAI, and the attached agent answers.

Everything is under Settings → Telephony in the portal. Telephony is switched on per account; if you do not see it, contact support. Owners, admins and developers can change it; everyone else in the organisation can see it. Phone numbers are one of an agent's channels; the same agent can also answer WhatsApp calls and calls from a website button (agent → Build → Channels).

Two kinds of trunk

When you chooseWhat happens
My carrier registers with a username and passwordWe sign in (register) to your carrier or PBX with the account it gave you, like a desk phone, and calls arrive over that sign-in. You enter the registrar address (such as sip:sip.example.net), the account address (such as sip:1001@sip.example.net), the password and, only if your carrier gave you a separate one, a username. The password is stored encrypted and is never shown again. Use this for most hosted carriers and for a PBX extension.
My carrier sends calls from fixed IP addressesAlso called IP peering. Your carrier or PBX sends calls straight to our address, with no sign-in. You enter the carrier's address, its port (5060 if left empty) and transport, and the IP addresses (or ranges such as 203.0.113.0/28) its calls come from. The carrier's own IP address always counts; the list is required when the carrier address is a host name. Calls from any other address are refused.

Both kinds also take the audio formats (codecs: PCMA, PCMU, G722 and opus) and whether to encrypt the call audio (SRTP: when the carrier offers it, which is the default; off; or always). If unsure, keep the defaults.

What to set up at your carrier

The Connection details card on the Telephony page shows exactly what to give your carrier or PBX, each with a copy button:

SIP hostThe address to send calls to.
PortThe SIP port, 5060.
TransportUDP on port 5060. For a carrier that needs TLS, use a sips: registrar address (sign-in trunks) or transport tls on port 5061 (IP trunks).
Public addressOur public IP address. Ask your carrier, and any firewall in between, to allow it for SIP and for audio, in both directions.
Audio portsThe UDP port range the call audio (RTP) uses, 30000–30499. Firewalls must let it through.
CodecsThe audio formats we accept.
  • Ask your carrier to route the numbers you will add to the SIP host and port above.
  • Numbers must reach us in international form (E.164, such as +918041234567) or as a 10-digit Indian number.
  • If your PBX sits behind a firewall, allow outgoing SIP and audio to our public address.

Add a trunk

  1. Open Settings → Telephony and choose Add trunk.
  2. Choose how your carrier connects, then fill in the details and choose Add trunk.
  3. Watch its status. A trunk that signs in should show Signed in within a few seconds; an IP trunk shows Readyonce your carrier answers our checks (every 30 seconds). Choose Check status to check again now.

Through the API, with a key that has the telephony scope:

bash
curl -X POST https://api.inferexai.in/v1/telephony/trunks \
  -H "Authorization: Bearer sk-live-your-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Main office line",
    "kind": "register",
    "registrar_uri": "sip:sip.example.net",
    "aor": "sip:1001@sip.example.net",
    "password": "your-sip-password"
  }'
bash
curl -X POST https://api.inferexai.in/v1/telephony/trunks \
  -H "Authorization: Bearer sk-live-your-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Office phone system",
    "kind": "ip_peer",
    "peer_host": "203.0.113.10",
    "peer_port": 5060,
    "transport": "udp",
    "allowed_ips": ["203.0.113.10", "203.0.113.11"]
  }'

Add numbers

Choose Add numbers, paste your numbers one per line or separated by commas, pick the trunk they arrive on and, if you like, a label such as "Support". Up to 500 numbers at a time. A number without a country code is taken as an Indian number; each is stored in international form (+918041234567). You see which numbers were added and which were not, with the reason for each: not a phone number, already added to your organisation, or connected by another account (a number can be connected by one account only).

bash
curl -X POST https://api.inferexai.in/v1/telephony/numbers \
  -H "Authorization: Bearer sk-live-your-key-here" \
  -H "Content-Type: application/json" \
  -d '{"numbers": ["+918041234567", "08041234568"], "trunk_id": "st_5c2e8a1f9b3d", "label": "Support"}'

The answer has added (the new numbers), already_added, refused (held by another account) and invalid (by position, with the reason). Add only numbers you hold: you are responsible for having the right to use them.

Attach a number to an agent

Open the agent, go to Build → Channels → Phone numbers, pick a free number and choose Attach number. You can also choose the agent next to each number on the Telephony page. A number belongs to one agent at a time; an agent can have many numbers. Attaching and detaching take effect at once and do not create a new agent version.

bash
curl -X PATCH https://api.inferexai.in/v1/telephony/numbers/pn_7a1b2c3d4e5f \
  -H "Authorization: Bearer sk-live-your-key-here" \
  -H "Content-Type: application/json" \
  -d '{"agent_id": "va_3f2a9c1b7d5e4f608a12"}'

Send {"agent_id": null} to detach it. The agent's own details list its numbers under phone_numbers.

Place calls through your trunk

Open the trunk on the Telephony page and choose Outbound calls. Pick one of the trunk's numbers to show as caller ID and how your carrier wants numbers written: +919876543210, 919876543210, 09876543210 or 9876543210. Some carriers want your SIP account, not a number, as the caller; choose that if calls are refused. One trunk per organisation places calls at a time.

While a trunk is set, every call list and calling workflow call is dialled through it. Without one, calls go to your own telephony as the routine.call.requested webhook, as before.

  • An answered call is handled by the call list's agent exactly like an incoming call, with the result, transcript and follow-ups as usual.
  • No answer, busy and failed calls are reported back to the call list, so its retry rules apply. A call rings for up to 40 seconds.
  • Voicemail detection: when an answering machine or voicemail picks up, the call is hung up at once and counted as not answered (outcome voicemail), so it is retried instead of the agent talking to a recording.
bash
curl -X PUT https://api.inferexai.in/v1/telephony/trunks/st_5c2e8a1f9b3d/outbound \
  -H "Authorization: Bearer sk-live-your-key-here" \
  -H "Content-Type: application/json" \
  -d '{"enabled": true, "number_id": "pn_7a1b2c3d4e5f", "number_format": "e164", "caller_id": "number"}'

Send {"enabled": false} to stop. number_format is e164, intl, national0 or national; caller_id is number or account.

Call audio

  • Noise suppression: background noise on the caller's side (traffic, fans, a busy office) is reduced before the agent hears it, on incoming, outgoing and WhatsApp calls. It runs on our side, at no extra cost.
  • Line echo: on lines that echo the agent's own voice back, the agent ignores its own words instead of answering them, and a call stuck repeating itself is ended.
  • Audio is smoothed for the small timing jumps phone lines have, and calls can use encrypted audio (SRTP) when your carrier offers it.
  • Background sound: an agent can play a quiet contact-centre background under its voice (agent → Call behavior → Background sound, or ambience and ambience_volume in the API). It plays from the moment the call connects until it ends, through pauses, and dips while the agent speaks. It is off by default, is not added to recordings, and is not charged. It applies to phone, WhatsApp and website-widget calls.
  • Keyboard activity: choose short typing bursts during agent pauses or at occasional random intervals, with an independent volume (API: keyboard_sound and keyboard_volume). It works with or without ambience, is off by default, and is mixed only into what callers hear. During agent pauses means the agent is not speaking; it does not depend on the caller muting their microphone.

What callers experience

  • The call is answered straight away by the agent's live version: its greeting (if it speaks first), its voice and its instructions.
  • Callers hear the agent's disclosure as on any call, and recording follows the agent's and your account's settings.
  • Keypad presses reach the agent as text, so it can handle "press 1" style answers.
  • When the agent ends the call, the line hangs up; when the caller hangs up, the session ends.
  • The call shows in the agent's Calls with the channel phone and the dialled number, and is charged like any agent call. Your carrier bills you for the line as usual.
  • A call is not answered when the number is disabled or has no agent, the agent is paused, the trunk is disabled, your wallet is empty or the agent is at its limit of calls at once. The caller hears the carrier's busy or unavailable tone.

Limits

  • An organisation can have up to 10 trunks and 500 phone numbers, and add up to 500 numbers at a time. Contact support if you need more.
  • Calls at once per agent follow the agent's usual limit.
  • One trunk per organisation places outbound calls at a time. Outbound calls follow your account's calling hours (09:00 to 21:00 IST by default) and the do-not-call list.
  • Deleting a trunk deletes its phone numbers too. Calls already in progress are not cut off.

Troubleshooting

Each trunk shows a status and, when something is wrong, the reason in plain words.

StatusMeaning and what to do
Setting upSaved and being set up on our side. It normally changes within a few seconds and is retried every minute; choose Check status to try now.
Signing inWe are registering with your carrier. If it stays here, check the registrar address and that your carrier allows our public address.
Signed inRegistered with your carrier and ready for calls.
ReadyAn IP trunk that is ready for calls from its allowed addresses.
Not workingCalls cannot arrive. Common causes: a wrong account address, username or password, a wrong registrar address, a carrier that does not answer our checks, or a firewall blocking our public address. The reason is shown on the trunk. Fix it or ask your carrier, then choose Check status.
DisabledYou turned it off; calls on it are refused. Choose Enable to turn it back on.
  • The phone rings but nobody answers, or the call fails at once: check that the number is attached to an agent, the number is active, the agent is active and your wallet has credit.
  • Calls never arrive: check that your carrier routes the number to our SIP host and port, and, for an IP trunk, that the carrier's address is in the allowed addresses.
  • One-way or no audio: a firewall is usually blocking the audio ports. Allow UDP audio to and from our public address.
Telephony changes are recorded in the Activity log. See also Voice agents and Webhooks: the call.started and call.completed events carry channel: "phone" and the dialled number.