SIP Trunking
Route inbound calls on your Linq phone numbers to your SIP infrastructure.
SIP Trunking
Section titled “SIP Trunking”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.
How calls reach you
Section titled “How calls reach you”Caller → telephone network → Linq phone number → your SIP endpointWhen someone calls a Linq number with a SIP profile assigned:
- Linq looks up the SIP profile assigned to the number.
- The call is sent to the profile’s SIP URI as an INVITE.
- 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.
Before you start
Section titled “Before you start”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.
Endpoint requirements
Section titled “Endpoint requirements”Your SIP endpoint should:
- Accept INVITEs whose Request-URI user part is the called number in E.164.
- Support reliable provisional responses (
100relandPRACK) and early media (183 Session Progresswith 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.
Set up inbound SIP routing
Section titled “Set up inbound SIP routing”-
Send Linq your endpoint details
See Before you start. Wait for your Linq representative to confirm the route and send the network ranges.
-
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.
-
Create a SIP profile
Set
primary_urito the URI scheme and host only, with no user part: usesips:sip.partner.examplefor TLS orsip:sip.partner.examplefor 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"}' -
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.
-
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.
SIP routing and call forwarding
Section titled “SIP routing and call forwarding”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.
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 }'