Skip to content
QwryAI
Documentation
Pages

Integrations

Answer phone calls with your AI agent using a SIP trunk

Connect a number you already own from a PBX, SIP provider or GSM gateway so your QwryAI agent answers its calls

The SIP trunk phone method connects a phone number you already own, on your own PBX, SIP provider or GSM gateway, to a QwryAI agent. You enter the number, QwryAI creates a SIP URI for it, and you route the number's inbound calls to that URI. Your agent then answers those calls with its voice settings, instructions, data sources and Actions.

Before you start

  • An existing phone number on a PBX, SIP provider or GSM gateway.
  • Access to that trunk's inbound call routing (origination), so you can point it at an external SIP URI. Where this setting lives depends on your provider.
  • A QwryAI agent with the voice you want callers to hear. Set the voice, language and greeting on the agent's Voice page.
  • A plan that includes voice: Starter, Growth or Enterprise.

How to connect a SIP trunk

  1. Open the Phone channel
    1. Open your agent and select Channels in the sidebar.
    2. On the Phone card, Let your AI agent handle inbound phone calls, select Setup (or Manage if numbers are already assigned).
    Channels › Phone.
  1. Go to the Connections tab. This is where you assign phone numbers to the agent.
Connections › Assign a new number.
  1. Choose the SIP trunk method
    1. Under Assign phone numbers, select Assign a new number.
    2. In Assign a new number, choose SIP trunk: Connect an existing number from your PBX, SIP provider or GSM gateway.
    3. Select Continue.
    Choose SIP trunk.
  1. Enter the number details

    In the Connect SIP trunk dialog, Enter a name and phone number for the SIP trunk you want to connect:

    1. Enter a Name, a label to recognise the number later, such as "Main office trunk".
    2. Enter the Phone number in E.164 format, with the country code, such as +15550100123.
    3. Select Connect SIP trunk.
    Name and number in E.164 format.

If the number isn't valid E.164, the form shows Enter a valid phone number in E.164 format (e.g. +15550000000). A number already connected to an agent shows This phone number is already in use.

  1. Copy the SIP URI

    The SIP trunk created dialog says Copy the SIP URI below and add it to your PBX or SIP provider configuration. Select the copy button, then Done. The URI looks like this, with QwryAI's SIP host after the @:

    Example conversation
    sip:+15550100123@<QwryAI SIP host>:5061;transport=tls
  2. Point your carrier at the SIP URI

    In your carrier, PBX, SIP provider or GSM gateway, route inbound calls for this number to the SIP URI you copied. This is usually the trunk's origination, inbound route or SIP destination for the number. In general:

    1. Open your provider's trunk or number settings.
    2. Set the inbound call destination (origination URI or SIP endpoint) to the copied SIP URI, over TLS.
    3. Turn off digest authentication and registration for this destination. QwryAI uses neither.
    4. Save the configuration.

How calls work

Once a SIP trunk number is connected and on:

  • Inbound calls to that number go through your carrier to QwryAI and are answered by the agent.
  • The agent speaks with the voice settings on its Voice page and greets the caller with its first message.
  • The conversation follows the agent's instructions, data sources and Actions, just like a chat.
  • Each call is saved as a conversation in the Inbox.
  • If the caller asks for a person, the Transfer to phone number Action can hand the call over.
  • To get each call's summary in your own system, add a URL under Call summary webhook on the Connections tab.

Each call uses 6 credits per minute, plus the voice model's credits for each reply. Every started minute counts as a full minute. Your carrier bills you separately for the line. See Voice.

Managing phone numbers

Copy the SIP URI again

  1. On the Connections tab, open the number's menu.
  2. Select Copy SIP URI. QwryAI shows SIP URI copied.

Turn a number on or off

Use the switch on the number. Turning it off shows Phone number unassigned and the number shows Paused: it stops taking calls but stays on the agent, and the SIP URI doesn't change, so you can turn it back on without touching your carrier.

Delete a number

  1. Open the number's menu and select Delete.
  2. Confirm in the Delete phone number? dialog.

Limitations

  • Routing happens at your carrier. QwryAI creates the SIP URI, but calls only reach your agent once your provider sends them there.
  • The SIP URI must match exactly, including the port, the transport and the + in the number, or calls won't connect.
  • No keypad input. The agent doesn't act on keypad presses (DTMF), so don't rely on "press 1" menus after the call reaches it.
  • A voice plan is required. Starter, Growth or Enterprise.

Troubleshooting

Calls ring but the agent never answers

Check that:

  1. The number's switch is on.
  2. Your plan includes voice.
  3. Your workspace has enough credits for the first minute.
  4. No concurrent or daily call limit has been reached. See Limits on the Voice page.
  5. Your carrier sends the call to the exact SIP URI, over TLS on port 5061, without authentication.

Frequently asked questions

Does QwryAI need SIP credentials or registration?

No. There's no digest authentication and no registration. Calls are accepted only for numbers connected in QwryAI.

Is a new SIP number active right away?

Yes. New SIP trunk numbers start Active. Turn off the switch if you want to stop calls while you finish setting up your carrier.

How much does a SIP call cost in QwryAI?

6 credits per minute, plus the voice model's credits for each reply. Every started minute counts as a full minute. Your carrier bills you separately for the line.

Next steps

Explore the documentation