Here you will find some useful technical information for implementing trunks. This is designed to help with the configuration on various platforms.
Some of the most useful SIP headers and how we use them are listed below (each PBX will have its own method for manipulating these headers).
Please ensure you have checked our IP Whitelisting and made all of our ports/IPs available on your platform, not implementing this correctly is the main cause of one way audio on calls.
NB: Fields within brackets [] are dependent on your configuration and examples below have been redacted for clarity.
REGISTRATION
Registrations work on a standard Register > Challenge> Register(with auth) basis. Credentials for registration can be found on each individual trunk by selecting Connect a Device. More information can be found on the Trunk Overview page.
Please note that registration to our servers is required for inbound calls to the function, please note that no registration is required for outbound calls and these can be handled with an authorisation digest response to our 401 challenge. During configuration, ensure you set authorisation to Outbound only.
Important Registration Headers:
- FROM: (User Part) = Trunk 6 digit username ([TrunkUsername])
- FROM: (Host Part) = The server from Connect a Device SIP Settings
- TO: (User Part) = Trunk 6 digit username ([TrunkUsername])
- TO: (Host Part) = The server from Connect a Device SIP Settings
- CONTACT: (User Part) = Optional Allows you to manipulate the URI User part for incoming calls via this registration ([PBXContact])
Sample Registration:
REGISTER sip:sip.voip123.co.uk SIP/2.0
Via: SIP/2.0/UDP [YourPBXHost]:5060
From: <sip:[TrunkUsername]@sip.voip123.co.uk>
To: <sip:[TrunkUsername]@sip.voip123.co.uk>
Call-ID: xxx
CSeq: 46754 REGISTER
Contact: <sip:[PBXContact]@[YourPBXHost]:5060>
Expires: 300
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: PBX
Content-Length: 0
OUTBOUND
Outbound calls are made via trunks and will function on an Invite> Challenge> Invite(WithAuth) basis. By default, the CLI will be set by using the one set on the trunk - if you wish to add presentation numbers to your account, please contact us with evidence of ownership.
Important Outbound Headers:
- FROM: (User Part) = Trunk 6 digit username ([TrunkUsername])
- FROM: (Host Part) = The server from Connect a Device SIP Settings
- TO: (User Part) = The destination number in either e164 or national format ([DestinationNumber])
- TO: (Host Part) = The server from Connect a Device SIP Settings
- P-Preferred-Identity: (User Part) = Number you wish to present. (Optional: If you do not specify this we will use the default on the trunk).
- NB: If you are unable to send P-Preferred-Identity you can instead send Remote-Party-ID
- NB: This number must either be an Incoming Number or a Presentation number on the account. If this is not the case the trunk default is used.
- Privacy: ID = this may be set to make a call anonymous.
Sample Outbound Invite:
INVITE sip:[DestinationNumber]@sip.voip123.co.uk SIP/2.0
Via: SIP/2.0/UDP [YourPBXHost]:5060
From: <sip:[TrunkUsername]@sip.voip123.co.uk>
To: <sip:[DestinationNumber]@sip.voip123.co.uk>
Contact: <sip:pbx@[YourPBXHost]:5060>
Call-ID:
CSeq: 14415 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: PBX
Content-Type: application/sdp
Content-Length: 260
INBOUND
Inbound calls will be sent to your PBX with a URI User matching either [TrunkUsername] as default or [PBXContact] if you set that during Registration. Typically you would use the [PBXContact]/[TrunkUsername] to control where on your PBX the call enters and then route within your system based on the [CalleeNumber] (the inbound number)
Important Inbound Headers:
- INVITE URI: (User Part) = Most PBX configurations will use this to determine whether the call should be accepted or not and where it should start its journey on the platform
- FROM: (User Part) = This is the CLI for the caller
- TO: (User Part) = This is the destination number and should be used to route the call to the correct place on your system
Sample Inbound Invite:
INVITE sip:[PBXContact]@[YourPBXHost]:5060 SIP/2.0
Record-Route:
Max-Forwards: 69
From: "[CallerNumber]" <sip:[CallerNumber]@sip.sipcentric.com>
To: <sip:[CalleeNumber]@sip.sipcentric.com>
Contact: <sip:[CallerNumber]@149.91.14.9:5070>
Call-ID:
CSeq: 102 INVITE
User-Agent: Sipcentric PBX
Date:
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 261
Comments
0 comments
Article is closed for comments.