:wave: Hello, team! I’m currently facing an issue...
# telephony
h
👋 Hello, team! I’m currently facing an issue where I’m unable to initiate outbound calls using RingCentral SIP. Here’s what I have so far: • SIP Domain:
sip.ringcentral.com
• Outbound Proxy:
sip40.ringcentral.com:5096
• Username:
my RingCentral number
• Authorization ID:
provided by RC
• Password:
SIP password
• Transport: UDP I’ve already tried configuring this in LiveKit’s
createSipOutboundTrunk
, mapping the credentials according to RingCentral’s documentation. However, outbound calls are still failing. Could you please help me check: 1. Whether I need to handle the outbound proxy differently in LiveKit? 2. If there are any extra headers or settings required specifically for RingCentral SIP? 3. Any debug tips to confirm whether the trunk is actually registering correctly before attempting a call? Thanks in advance for your help! Here is my current setup:
Copy code
const livekitServerSdk = require("livekit-server-sdk");
const dotenv = require("dotenv");
dotenv.config();

async function startCall() {
  const SipClient = livekitServerSdk.SipClient;
  const client = new SipClient(
    process?.env?.LIVEKIT_URL,
    process?.env?.LIVEKIT_API_KEY,
    process?.env?.LIVEKIT_API_SECRET
  );

  // For RingCentral, the address should be the domain, not the outbound proxy
  const address = process.env.RC_DOMAIN;

  // Correct trunk options for RingCentral
  const trunkOptions = {
    authUsername: process?.env.RC_USERNAME,
    authPassword: process?.env.RC_PASSWORD,
    headers: {
      "Authorization-Id": process.env.RC_AUTHORIZATION_ID,
      "Outbound-Proxy": process?.env?.RC_OUTBOUND_PROXY,
    },
    transport: 1,
  };

  // Step 1: Create (or reuse) outbound trunk
  const trunk = await client.createSipOutboundTrunk(
    "RingCentral Outbound",
    address,
    ["*"],
    trunkOptions
  );

  console.log("Outbound trunk created:", trunk.sipTrunkId);

  const sipParticipantOptions = {
    fromNumber: process?.env?.RC_USERNAME,
    participantIdentity: "+917703911859",
    participantName: "Sunil Kumawat",
    playDialtone: true,
    krispEnabled: true,
    waitUntilAnswered: true,
  };

  try {
    const participant = await client.createSipParticipant(
      trunk.sipTrunkId,
      "+917703911859",
      "rc-call-room",
      sipParticipantOptions
    );

    console.log("Participant created:", participant);
  } catch (error) {
    console.error("Error creating SIP participant:", error);
  }
}

startCall();
r
Do you have an ID of a call that failed? Should start with
SCL_*