Grandstream Networks, Inc.: UCM6xxx Series
Grandstream Networks, Inc.: UCM6xxx Series
Grandstream Networks, Inc.: UCM6xxx Series
UCM6xxx Series
SIP Trunks Guide
Table of Content
INTRODUCTION ............................................................................................................. 4
Configuration .......................................................................................................................................... 16
Outbound Routes Configuration ............................................................................................................ 22
Inbound Routes Configuration ............................................................................................................... 23
Table of Tables
Table 1: Register Trunk Parameters ............................................................................................................. 7
Table 2: Extension/Trunk → VoIP Trunks .................................................................................................... 17
Table 3: Extension/Trunk → VoIP Trunks → Advanced Settings ................................................................ 18
Using SIP trunks helps to reduce call rates especially when making long distance calls, since VoIP providers
can offer better calling rates compared to local ISP using analog lines.
UCM6xxx series support two types of SIP trunks: “Register SIP trunks”, mainly used to connect with
provider’s trunk and “Peer trunks”, that can be used to interconnect multiple IP-PBXs. UCM6xxx series
support up to 200 SIP trunks.
This guide describes needed configuration to set up register trunk (with provider) and peer trunk (between
two UCM6xxx).
The figure above shows a typical scenario using two UCM6xxx between main and branch offices
(connected via peer trunk), and main office UCM6xxx connected to provider via register SIP trunk.
The ITSP provider gave following trunk information to the company ABC in order to register their trunks.
SIP Trunk 1
Provider address sip.provider.com
Username 0655441000
Authenticate ID 0655441000
Password admin123
Main number 0655441000
Provided DIDs 0655441001 / 0655441002 / 0655441003 / 0655441004 / 0655441005 /
0655441006 / 0655441007 / 0655441008 / 0655441009 / 0655441010
SIP Trunk 2
Provider address sip.provider.com
Username 0655441100
Authenticate ID 0655441100
Password admin123
Main number 0655441100
Provided DIDs 0655441101 / 0655441102 / 0655441103 / 0655441104 / 0655441105 /
0655441106 / 0655441107 / 0655441108 / 0655441109 / 0655441110
Setup considerations:
• Extensions range on UCM6xxx in main office is 1000 – 1999.
• Dialing to international numbers should be prefixed with 99 with no size limits.
• National numbers start with 06 with 10-digit length.
Configuration
Below steps to configure SIP Trunk 1 on Main office UCM6xxx. Same steps apply to configure Trunk 2.
Above steps describe basic configuration needed to register a SIP trunk. Depending on providers, users
may need to adjust their settings to successfully register a SIP trunk.
The table below describes main parameters available for Register SIP Trunks:
If enabled and Keep Original CID is disabled, the callee will see the ID set on Username
field of UCM6xxx, in this case “0655441000“.
NAT Turn on this option when the PBX is using public IP and communicating with devices
behind NAT. If there is one-way audio issue, usually it’s related to NAT configuration or
SIP/RTP port configuration on the firewall.
Disable This Trunk If selected, the trunk will be disabled.
Note: If a current SIP trunk is disabled, UCM6xxx will send UNREGISTER message
(REGISTER message with expires=0) to the SIP provider.
TEL URI If the trunk has an assigned PSTN telephone number, this field should be set to
"User=Phone". Then a "User=Phone" parameter will be attached to the Request-Line
and TO header in the SIP request to indicate the E.164 number. If set to "Enable", "Tel:"
will be used instead of "SIP:" in the SIP request. The default setting is disabled.
• If set to Enabled, the TO header in this example will be “To: <tel: 0655441000>”.
Need Registration Select whether the trunk needs to register on the external server or not when "Register
SIP Trunk" type is selected.
Allow outgoing If enabled outgoing calls even if the registration to this trunk fail will still be able to go
calls if registration through.
failure Note that if we uncheck “Need Registration” option, this option will be ignored.
CallerID Name Configure the Caller ID name that will be sent on the from header in INVITE message
Example:
Caller ID set to “GSTest”, the “From” header will be:
From: "GSTest" <sip:0655441000@ucm1.abc.com>;tag=f268
Important Note: When making outgoing calls, the following priority order rule will be used
to determine which CallerID will be set before sending out the call :
• From user (Register Trunk Only) → CID from inbound call (Keep Original CID
Enabled) → Trunk Username/CallerID (Keep Trunk CID Enabled) → DOD →
Extension CallerID Number → Trunk Username/CallerID (Keep Trunk CID
Disabled) → Global Outbound CID.
Password Enter the password to register to the trunk from the provider when "Register SIP Trunk"
is selected.
Auth ID Enter the authentication ID for "Register SIP Trunk" type.
Note: This is the SIP service subscriber’s ID used for authentication. If not configured
the Extension Number will be used for authentication.
Auth Trunk If enabled, the UCM will send 401 response to the incoming call to authenticate the
trunk.
Auto Record Enable automatic recording for the calls using this trunk (for SIP trunk only). The default
setting is disabled. The recording files can be accessed under web
GUI→CDR→Recording Files.
Direct Callback Allows external numbers the option to get directed to the extension that last called them.
After saving the new VoIP trunk, it will be displayed under Web UI → Extension / Trunk → VoIP Trunks
Once the trunk has been created, users can check its registration status under System Status →
Dashboard page.
Note: If status shows “Rejected”, it means that UCM6xxx didn’t get registered with the provider. Verify that
provider’s server is reachable from UCM6xxx and double confirm trunk credentials.
DID (Direct Inward Dialing) is a service provided by the ITSP to subscribers using IP-PBX, adding possibility
to route incoming calls to a specific DID to a specific extension. Using DIDs, it will allow extensions to be
reachable from outside directly without going through main office number.
In this example, following DIDs have been provided with first trunk “Provider_1”: 0655441000 / 0655441001
/ 0655441002 / 0655441003 / 0655441004 / 0655441005 / 0655441006 / 0655441007 / 0655441008 /
0655441009 / 0655441010.
Company wants to redirect incoming calls to specific extensions using provided DIDs.
UCM6xxx in main office is using extensions range: 1000 – 1999.
Note: Make sure DID Mode is set correctly under trunk advanced settings. Provider may include DID
number in “Request-line” or “To-header”.
1. Access UCM6xxx Web UI → Extension/Trunk → Inbound Routes. Select “Trunk 1” and press
“Add” button.
3. Configure ByDID as Default Destination and check “Extension” in “DID Destination” options.
4. Configure Strip field. In this example: Strip=6 to remove first 6 digits from incoming number and
keep last 4 digits. If call is coming to 0655441007, UCM6xxx will strip 065544 and keep 1007.
The UCM6xxx provides Direct Outward Dialing (DOD) which is a service of a local phone that allows
extensions within a company ABC’s UCM to connect to outside lines directly.
We will use Company’s ABC trunk 0655441000 with 11 DIDs associated to it. At the moment when a user
makes an outbound call their caller ID shows up as the main office number which is 0655441000. This
create a problem as the CEO would like that his calls to comes from his direct line. This can be
accomplished by configuring DOD for the CEO’s extension. Other group member also can benefit from
DOD to have their own line showed when making calls.
2. Click to access the DOD options for the selected SIP Trunk.
3. Click "Create a new DOD" to begin your DOD setup.
4. For "DOD Number", enter one of the numbers (DIDs) from your SIP trunk provider. In this example,
we will enter in the number for the CEO's direct line (0655441000).
Users can press “Edit DOD” to check/add/delete extensions that are associated to a particular DOD.
1. Access UCM6xxx Web UI → Extension/Trunk → Inbound Routes. Select “Trunk 1” and press
“Create New Inbound Rule”.
2. In DID Pattern field, enter “_X.”. This allows all incoming calls to be received.
For time condition based Inbound route, please refer to TIME CONDITION.
3. Enter the Calling Rule Name, Pattern and choose “Provider_1” in Use Trunk.
In below figure, we set “Pattern” to “_06XXXXXXXX” to allow only dialed numbers with leading 06 and 10-
digit length to be accepted. Extensions with privilege “Internal” or higher can use this route/trunk.
Note: Users can add comments to a dial plan by typing “/*” and “*/” before and after each comment
respectively, in our example we can set the pattern to: “_06XXXXXXXX /*route1*/ ”
Another outbound route should be set using “Provider_2” with following parameters:
• Pattern: “_99X.” (to allow only dialed numbers with leading 99 to be authorized).
To dial international numbers such as 0016175669300, users need to have privilege “International” in used
extension and dial 990016175669300.
Note: For time condition based Outbound Routes, please refer to TIME CONDITION.
Assuming following:
• Or both UCM6xxx are on the same LAN/VPN using private or public IP addresses;
• Or both UCM6xxx can be connected through a router using public or private IP addresses (with
necessary port forwarding or DMZ).
• UCM6xxx in main office is using extensions range 1XXX, while UCM6xxx in branch office is using
extensions range 2XXX.
Configuration
Following steps need to be done on both UCM6xxx in both locations:
• In Host Name field, enter the IP address/domain of the other UCM6xxx. In this case
“ucm2.abd.com” is the domain name of the branch office.
The tables below describe basic and advanced parameters available for PEER trunks:
Important Note: When making outgoing calls, the following priority order rule will be used to
determine which CallerID will be set before sending out the call :
• CID from inbound call (Keep Original CID Enabled) → Trunk Username/CallerID
(Keep Trunk CID Enabled) → DOD → Extension CallerID Number → Trunk
Username/CallerID (Keep Trunk CID Disabled) → Global Outbound CID.
Caller ID Name Configure the name of the caller to be displayed when the extension has no CallerID Name
configured.
Note: “Send PPI Header” and “Send PAI Header” cannot be enabled at the same time. Only
one of the two headers is allowed to be contained in the SIP INVITE message.
DID Mode Configure where to get the destination ID of an incoming SIP call, from SIP Request-line or To-
header. The default is set to "Request-line".
• If set to Request-line, the UCM will extract the ID from the Request-Line of the
incoming INVITE and set it on the “To header” for the outgoing one.
• If set to To-Header, the UCM will extract the ID from the To-Header of the incoming
INVITE and set it on the “To header” for the outgoing one.
DTMF Mode Configure the default DTMF mode when sending DTMF on this trunk.
• Default: The global setting of DTMF mode will be used. The global setting for DTMF
Mode setting is under web UI→PBX→SIP Settings→ToS.
• RFC4733: Send DTMF using RFC4733.
• Info: Send DTMF using SIP INFO message.
• Inband: Send DTMF using inband audio. This requires 64-bit codec, i.e., PCMU and
PCMA.
• Auto: Send DTMF using RFC4733 if offered. Otherwise, inband will be used.
Enable Heartbeat If enabled the UCM will send regularly SIP OPTIONS to check if the device is online.
Detection
Heartbeat When "Enable Heartbeat Detection" option is set to "Yes", configure the interval (in seconds) of
Frequency the SIP OPTIONS message sent to the device to check if the device is still online. The default
setting is 60 seconds.
Maximum Number The maximum number of concurrent calls using the trunk. The default settings 0, which means
of Call Lines no limit.
SRTP Enable SRTP for the VoIP trunk. The default setting is "No".
• If enabled it will provide encryption, message authentication and integrity for the Audio
stream.
IPVT Mode Configures the UCM to be used exclusively for IPVT.
Warning: This will lock out certain UCM features.
After clicking Save the new VoIP trunk will be displayed under “Web UI → Extension / Trunk → VoIP
Trunks” as shown below.
Press and go to “Advanced Settings”. Check “Enable Heartbeat Detection” option to allow UCM6xxx
to monitor the status of each other sending regularly SIP OPTIONS to check if it’s still online.
Once the trunk has been created and Enable Heartbeat Detection is set, users can view the status of the
peered trunk by navigating to the Status page.
. This would allow the extensions on main office to reach extensions on Branch Office.
1. Calling Rule Name: This is for reference purposes so we choose to use “toBranch”.
2. Pattern: The pattern used in this example is _2XXX since the Branch Office is using extension
range 2XXX.
3. Privilege Level: Configured as “Internal”. User can change it to another privilege depending on the
use case.
4. User Trunk: Select the SIP Trunk toBranch.
5. Click on then .
In figure 15, the pattern “_2XXX” means that whenever a user on the main office call an extension that
starts with 2 and have 4 digits, this trunk will be used for the call.
Notes:
• These steps will also apply when configuring the outbound route from Branch Office UCM6xxx. The
pattern used will be _1XXX since the extension range on the Main Office is 1XXX.
• Users also could create Time based Condition to use Outbound Routes on a specific time, please
refer to TIME CONDITION for more details.
click on button.
For this example, Main Office UCM6xxx inbound rule needs be configured so that when an extension on
the Branch Office dials, it will be routed to the specified user. Configure using following parameters:
4. Click on then .
With this inbound rule configured, if the Main Office UCM6xxx receives a call from any extension with a
leading 2 and containing 4 digits to any extension with a leading 1 and contains 4 digits it will be redirected
by DID to corresponding extension.
Notes:
Supposing that Time Conditions are already set, if more details are needed, please refer to the following
guide: UCM6XXX Time Condition Guide
Users can setup time conditions for trunks by following below steps:
The example above shows that on the Office Time, calls will be made using Provider_1 trunk.
The example above shows that on Out of Office Time, calls will be made using Provider_2 trunk.
This can drastically reduce the amount of time needed to manage accounts for the same server and improve
the overall cleanliness of the web GUI.
Once creating the new trunk group and configuring the SIP settings, users can add multiple accounts within
the configured SIP server by pressing button and configuring the username, password and
authentication ID fields as show in below figure:
Failover trunks can be used to make sure that a call goes through an alternate route, when the primary
trunk is busy or down.
Users can setup failover for peer and register trunks by following below steps: