Skip to content
Linq Copy agent prompt
SIP Trunking

SIP Trunking

Route inbound calls on your Linq phone numbers to your SIP infrastructure.

SIP trunking delivers inbound calls on your Linq phone numbers straight to a SIP endpoint you run, such as a voice agent, PBX or contact center. The call reaches you as a SIP INVITE and the audio as an RTP stream, with no forwarding through another phone number in between.

Caller → telephone network → Linq phone number → your SIP endpoint

When someone calls a Linq number with a SIP profile assigned:

  1. Linq looks up the SIP profile assigned to the number.
  2. The call is sent to the profile’s SIP URI as an INVITE.
  3. Your endpoint answers, and audio flows between Linq’s network and your endpoint for the rest of the call.

The called number is the user part of the Request-URI, in E.164 format, for example sips:[email protected], so your system can route different Linq numbers to different destinations or workflows. The caller’s number is in the From header in E.164. Keypad tones arrive as RFC 2833 telephone-event packets.

Send your Linq representative the following for each SIP endpoint:

  • A technical contact: name, email and phone.
  • Your SIP URI, and the transport it accepts: TLS (recommended) or UDP.
  • The public IP addresses your endpoint uses for SIP signaling.
  • The IP addresses and port range your endpoint uses for RTP media.
  • Whether your endpoint accepts encrypted media (SRTP).
  • The audio codecs your endpoint supports, in order of preference.

Your Linq representative confirms the codecs and encryption for your route, sends the signaling and media ranges to allow through your firewall, and lets you know when the route is ready.

Your SIP endpoint should:

  • Accept INVITEs whose Request-URI user part is the called number in E.164.
  • Support reliable provisional responses (100rel and PRACK) and early media (183 Session Progress with SDP).
  • Support SIP session timers (Session-Expires).
  • Accept RTP from the media ranges Linq provides, and send RTP back to them.

For the lowest latency, run your SIP endpoint close to the system that generates the audio, and avoid extra hops between them. Every hop adds delay that callers hear when they interrupt or wait for a reply.

  1. Send Linq your endpoint details

    See Before you start. Wait for your Linq representative to confirm the route and send the network ranges.

  2. Allow Linq’s network ranges

    Add the signaling and media ranges from your Linq representative to your firewall allowlist. Keep the allowlist in sync if Linq sends updated ranges.

  3. Create a SIP profile

    Set primary_uri to the URI scheme and host only, with no user part: use sips:sip.partner.example for TLS or sip:sip.partner.example for UDP. Linq adds the called number as the user part on each call. See the SIP Profiles API reference for the complete request and response schemas.

    Terminal window
    curl -X POST https://api.linqapp.com/api/partner/v3/sip-profiles \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
    "name": "primary",
    "primary_uri": "sips:sip.partner.example"
    }'
  4. Assign the profile to a phone number

    Assign the returned profile ID to a Linq phone number. The phone number must belong to your account and must be written in E.164 format.

    Terminal window
    curl -X PUT https://api.linqapp.com/api/partner/v3/phone-numbers/{phoneNumber}/sip-profile \
    -H "Authorization: Bearer $LINQ_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "sip_profile_id": "sip_8a3f9c2b1d4e4f5a9b8c7d6e5f4a3b2c"
    }'

    Allow about five minutes for a routing change to propagate.

  5. Place a test call

    Call the assigned Linq number from a mobile phone and check that your endpoint receives the INVITE with the called number in E.164, negotiates the codec you expect, and sends and receives audio in both directions.

A SIP profile assignment takes precedence over the phone number’s existing forwarding_number, but it does not delete that forwarding number. To stop SIP routing, clear the assignment by sending sip_profile_id: null. After the change propagates, the existing forwarding configuration resumes if one is set.

Terminal window
curl -X PUT https://api.linqapp.com/api/partner/v3/phone-numbers/{phoneNumber}/sip-profile \
-H "Authorization: Bearer $LINQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sip_profile_id": null
}'