Skip to main content

Receiving and Placing Calls

In this section, we will learn how to configure a SIP trunk to receive and to place calls. To be able to do this, we need to have:

How Calls Flow

CarrierX uses two types of endpoints in this setup, and they serve different roles in the call flow:

  • System Gateway - represents CarrierX SIP infrastructure (IP addresses used to send and receive SIP traffic)
  • Third-party endpoint - represents your external SIP application or PBX

These endpoints work together as follows:

Inbound Calls (Receiving Calls)

When someone calls your phone number:

  1. The call reaches the CarrierX network via the PSTN
  2. The phone number (DID) is matched to a trunk group
  3. The trunk group routes the call to your third-party endpoint
  4. CarrierX sends the SIP request from the System Gateway IP addresses to your system

This is why your firewall must allow traffic from the System Gateway.

Outbound Calls (Placing Calls)

When your system places a call:

  1. Your SIP application sends a request using your third-party endpoint credentials
  2. The request is sent to the System Gateway IP addresses
  3. CarrierX routes the call through the trunk group
  4. The call is delivered to the destination via the PSTN

Configure Your Firewall to Accept Calls

To enable call traffic between your network and CarrierX, you will first need to set up your firewall to accept traffic from the CarrierX switch IP addresses listed in your System Gateway endpoint.

note

A System Gateway is a system-generated endpoint that is automatically created for each account.

To do this, navigate to CONFIGURE > Endpoints and select the System Gateway endpoint.

In the Endpoint Details window, locate the Endpoint Addresses field. Add these IP addresses to your firewall's allowlist for SIP signaling traffic. Now your endpoint is ready to receive and place calls.

Set Up Proxy Authentication to Place Calls

Return to CONFIGURE > Endpoints, click the third-party endpoint we configured earlier. You'll be using it for outbound calls.

CarrierX uses proxy authentication for outbound calls. Your credentials are:

  • Username: Your Endpoint SID
  • Password: Your VoIP Token

These values are displayed in the Endpoint Details window. Send SIP requests to the System Gateway IP addresses using these credentials.

Verify Phone Number Assignment

In the Endpoint Details window, click the Assigned Phone Numbers tab to view which phone numbers are associated with your endpoint. These numbers can be used for both inbound and outbound calls. In our case, you should be able to see the phone number that we assigned to the trunk group when we configured the SIP Trunk.

Next Steps

Refer to our Core API Reference for more in-depth documentation about Endpoints and Trunk Groups.