You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

如何通过Twilio使用SIP客户端通话及企业Twilio配置需求咨询

Twilio SIP Client Setup & Company Configuration Guide

Hey there! Let's walk through exactly what you need to get your team up and running with Twilio SIP calling. I'll cover both initiating calls via a SIP client and your remaining company configuration tasks.


1. How to Initiate Calls with a Twilio SIP Client

To make calls from a SIP client (like Zoiper) using Twilio, you'll need to set up a SIP domain, configure authentication, and handle call routing via TwiML. Here's the step-by-step:

Step 1: Create a SIP Domain in Twilio Console

  • Log into your Twilio account and navigate to Programmable Voice > SIP > SIP Domains
  • Click Create new SIP Domain, give it a friendly name, and enter a unique domain name (e.g., yourcompany.sip.twilio.com)
  • Under Voice Configuration, set the Request URL to a web endpoint (like a Twilio Function or your own server) that will return TwiML to route the call

Step 2: Set Up Authentication for Your SIP Clients

  • In your SIP Domain settings, go to Credentials List and click Create New Credential List
  • Add a unique username and strong password for each of your 3 managers (these will be used to log into Zoiper later)
  • Head to the ACL tab, create a new ACL that allows access from your team's IP ranges (use allow all for testing, but restrict it for production security)

Step 3: Handle Call Routing with TwiML

When your SIP client initiates a call, Twilio will send a request to your configured Request URL. You need to return TwiML to dial the customer's number. For example, a simple Twilio Function would look like this:

exports.handler = function(context, event, callback) {
  const twiml = new Twilio.twiml.VoiceResponse();
  // Use your purchased Indonesia number as the caller ID
  twiml.dial({ callerId: "+62XXXXXXXXX" }, event.Digits);
  callback(null, twiml);
};

This takes the digits dialed from the SIP client, routes the call to the customer number, and shows your Indonesia number as the caller ID.

Step 4: Initiate a Call from the SIP Client

Once your client is configured (we'll cover Zoiper setup next), just dial the customer's full E.164 number (e.g., +62XXXXXXXXX) and Twilio will handle connecting the call.


2. Your Company's Remaining Twilio Configuration Tasks

Since you already have your Indonesia number sorted, let's tackle the other two tasks:

Task 2: Add Internal Numbers for 3 Managers

Twilio uses SIP URIs for internal SIP endpoints instead of traditional internal numbers. Each manager will have a unique URI tied to their credential:

  • For each manager, the internal URI will be sip:[their-username]@yourcompany.sip.twilio.com
  • If you want short internal dialing (e.g., 101, 102), set up a TwiML app or Twilio Function to map short codes to each SIP URI. Example:
exports.handler = function(context, event, callback) {
  const twiml = new Twilio.twiml.VoiceResponse();
  const dial = twiml.dial();
  switch(event.Digits) {
    case "101":
      dial.sip("sip:manager1@yourcompany.sip.twilio.com");
      break;
    case "102":
      dial.sip("sip:manager2@yourcompany.sip.twilio.com");
      break;
    case "103":
      dial.sip("sip:manager3@yourcompany.sip.twilio.com");
      break;
    default:
      // Route to external number as before
      dial({ callerId: "+62XXXXXXXXX" }, event.Digits);
  }
  callback(null, twiml);
};

Task 3: Configure Zoiper (iOS/Android) for SIP Calling

Here's how to set up Zoiper for each manager:

  1. Open Zoiper and tap Add Account
  2. Select SIP Account
  3. Enter the following details:
    • Username: The credential username you created for the manager
    • Password: The corresponding credential password
    • Domain/Proxy: Your Twilio SIP domain (e.g., yourcompany.sip.twilio.com)
    • Port: Use 5061 for TLS (recommended for security) or 5060 for UDP
  4. Tap Save and Zoiper will test the connection
  5. Once connected, your manager can dial customer numbers (E.164 format) or internal short codes directly from the app

内容的提问来源于stack exchange,提问作者Dmitriy Gabrielyan

火山引擎 最新活动