Skip to main content
If you already have a SIP trunk with Indian numbers on it, you can connect it to Mirai. Your agents answer calls to the trunk’s numbers and place calls from them. Your carrier keeps billing you for the numbers and the minutes, and we bill only for your agents’ minutes. Once it’s added, a number on your trunk works like any other number here. An agent answers it, it can sit in a pool, and you can pick it under Calls come from for a campaign or an agent.

What you need

  • A SIP trunk from a carrier, with one or more Indian numbers on it.
  • These details from your carrier: their SIP address and port, UDP or TCP, the IP addresses they send calls from, and how they write phone numbers. Some carriers also give you a dial prefix, or a username and password.
  • A published agent to answer the calls.

What a trunk can do today

Not supported yet: encrypted calls (TLS and SRTP), registering with your carrier (SIP REGISTER), keypad tones (DTMF relay), call transfer, and numbers outside India. If your carrier insists on one of these, the trunk won’t work with Mirai yet.

Step 1: Connect the trunk

  1. Open Phone numbers in the console and click Get a number.
  2. Choose Connect your SIP trunk.
  3. Pick your carrier: Plivo, VoiceLink or Other. A preset fills in what it can. Check every value against what your carrier gave you.
  4. Fill in the rest of the form and click Connect SIP trunk.
You can change any of this later with Edit on the trunk’s card. Leave the password blank to keep the saved one. Changes apply from the next call.

Step 2: Give your carrier our details

After you connect, the trunk’s card opens at Point your trunk at us. You’ll find the card later under Phone numbers → Accounts → Your SIP trunks. Each value has a Copy button, and Copy all copies them together, ready to paste into an email to your carrier. The card is the source of truth. If it ever differs from this page, use the card. Today it shows: Ask your carrier to:
  • Send calls for your numbers to sip.miraiminds.co, port 5060, over the transport you chose.
  • Accept calls and audio from 168.220.248.249.
  • Send and receive audio on UDP ports 20000 to 29999 at that address, as PCMU or PCMA without encryption.
If you run a firewall or a session border controller between your carrier and us, open the same address and ports there.

Step 3: Add your numbers

A SIP trunk has no number list for us to read, so you type each number in.
  1. On the trunk’s card, click Add a number.
  2. Enter the number: an Indian number, +91 and 10 digits, such as +91 98765 43210.
  3. Under Who answers, choose the agent that answers calls to it.
  4. Click Add number.
The number is ready straight away. There’s nothing to turn on, so calls reach the agent as soon as your carrier sends them to us. A number can belong to only one Mirai workspace. On incoming calls, your carrier can write the number you were called on in any of the four formats above. We read them all.

Step 4: Test both directions

  1. Call one of the numbers from another phone. You should hear your agent’s greeting.
  2. Call out from it. Click Call my phone on the trunk’s card, pick the number under Calls come from in a small test campaign, or place an API call with its phone_number_id.
  3. On each call, check that both sides hear each other. Hang up once from each end.
  4. Look at the trunk’s card. It shows the last call in and the last call out, with the reason if one failed. It also lists calls we turned away because they came from an address that isn’t on your list.
Test before you print the number anywhere or start a real campaign on it.

Billing

Calls on your own trunk carry no Mirai line charge. Your carrier bills you for the numbers and the minutes. Your agents’ minutes are billed at your plan’s rate, the same as any other call. See Billing & tiers.

Carrier walkthroughs

Plivo

Plivo calls its SIP trunking Zentrunk. In the Plivo console, open SIP Trunking and:
  1. Create an IP access list with our IP address, 168.220.248.249.
  2. Create an outbound trunk that uses that list. Plivo gives the trunk a domain that looks like 123456789.zt.plivo.com. You’ll enter it in Mirai.
  3. Create an origination URI, sip.miraiminds.co:5060, and an inbound trunk that uses it.
  4. Attach your Plivo number to the inbound trunk.
Your Plivo account must be in Plivo’s India region to use Indian numbers.
Then connect the trunk in Mirai and choose Plivo: Then add the number you attached to the inbound trunk, as in Step 3. Mirai can also use a Plivo number without a trunk: connect your Plivo account with its Auth ID and Auth Token instead. See Receive inbound phone calls. In the VoiceLink panel:
  1. Open Voice Services → SIP Trunk Management and click Add SIP Trunk.
  2. Set BOT provider to Custom, and enter our SIP address and IP address from Step 2.
  3. Tick the numbers (DIDs) that should come to Mirai.
  4. Note the Tech Prefix the panel shows for your trunk.
Then connect the trunk in Mirai and choose VoiceLink:

Other carriers

Choose Other and ask your carrier for:
  • The SIP address and port to send calls to, and UDP or TCP.
  • Every IP address they send calls from.
  • How they want numbers written, and their tech prefix if they use one.
  • A username and password, if they want our calls to sign in.
Send them the values from Point your trunk at us. Check that they can use G.711 (PCMU or PCMA) without encryption, and that they don’t need us to register with them.

Troubleshooting

Set it up through the API

The API takes the same steps. Use your workspace’s API host and key, and the id of the published agent that should answer:

1. Read what to give your carrier

GET /v2/telephony/options carries sip only when SIP trunks are on for your workspace. These are the values the console shows under Point your trunk at us.

2. Connect the trunk

The answer is 201 with the trunk. Its state is verified at once, because nothing is checked with your carrier. Its sip holds the settings, with has_password in place of the password.

3. Add a number and choose who answers

The number is ready as soon as it’s added. Assign an agent with the number’s current version.
To place a call from the number, send its id as phone_number_id on POST /v2/calls, or add it to a pool.

4. Change the trunk later

PATCH /v2/telephony/connections/{id} takes the trunk’s current version and, in sip, only the fields that change. Leave password out to keep it, or send null to remove it. Send "dial_prefix": "" to remove the prefix. "state": "disabled" turns the trunk off. Changes apply from the next call.
Every request, with example answers, is in the Postman collection.

Errors

Phone numbers and pools

Pools, pace, number health, and which number a call comes from.

Receive inbound phone calls

Rent a number or connect your Plivo account, then assign an agent.

Run a campaign from your own numbers

Put your numbers in a pool and call from it at a human pace.

Billing & tiers

What a minute costs on each plan.