Setup guide · UCM series
Connect a SIP trunk to Grandstream
On a Grandstream UCM, a SIP trunk is either a Peer SIP Trunk (IP auth) or a Register SIP Trunk. You create the trunk, set codecs and caller ID, then add outbound and inbound routes.
Before you start
What you need
- Grandstream UCM63xx or UCM62xx with current firmware
- NAT settings under PBX Settings › SIP Settings › NAT
- Your SIPTrunkHub account details: SIP server, auth method, tech prefix if any
IP auth or register auth?
IP authentication
Type: Peer SIP Trunk. We whitelist your public IP.
Register (digest) authentication
RecommendedType: Register SIP Trunk with username, password and auth ID.
Step by step
Configure Grandstream
sip.example-host.net and 203.0.113.10 are documentation placeholders. Replace them, and the username, password and tech prefix, with the values from your account.
- 01
Add the trunk
Extension/Trunk › VoIP Trunks › Add.
Create new SIP trunk (field → value) Type .................. Register SIP Trunk | Peer SIP Trunk Provider Name ......... SIPTrunkHub Host Name ............. sip.example-host.net:5060 Transport ............. UDP Keep Original CID ..... No Keep Trunk CID ........ Yes Username .............. YOUR_SIP_USERNAME (register only) Password .............. YOUR_SIP_PASSWORD (register only) Auth ID ............... YOUR_SIP_USERNAME (register only) From Domain ........... sip.example-host.net CallerID Number ....... 442079460000 - 02
Advanced settings
Edit the trunk › Advanced Settings. Set codecs in order and enable heartbeat so the UCM detects a dead trunk.
Advanced Settings Codec Preference ...... PCMU, PCMA, G.729A/B Enable Heartbeat Detection Yes Heartbeat Frequency ... 30 DTMF Mode ............. RFC2833 Send PAI Header ....... Yes - 03
Create an outbound route
Extension/Trunk › Outbound Routes › Add. Use the pattern below, select the trunk and strip the 00.
Outbound route Pattern ............... _00X. Strip ................. 2 Prepend ............... (blank, or 1234# tech prefix) Use Trunk ............. SIPTrunkHub - 04
Create inbound routes
Extension/Trunk › Inbound Routes › Add. Select the trunk, set the DID pattern to the full E.164 number without +, and pick a destination.
Media
Codec order
- PCMU/PCMA first, G.729A/B last.
- Remove Opus and video codecs from the trunk. They are not needed on PSTN calls.
- For fax set Fax Mode to T.38 on the trunk or fax extension.
NAT notes
- PBX Settings › SIP Settings › NAT: set External Host to your public IP and add Local Network Addresses.
- Forward UDP 5060 and the RTP range (10000–20000 by default) on the router.
- Disable SIP ALG.
Verify
Test the trunk
Extension/Trunk › VoIP Trunks shows Registered or Reachable. Use Maintenance › Troubleshooting › Ethernet Capture during a test call to get a pcap.
Troubleshooting
Common SIP errors
What each response means and what to check first on Grandstream. If you still need help, send the Call-ID and timestamp to the NOC.
| Code | Meaning | Likely cause | Fix on Grandstream |
|---|---|---|---|
| 401 | Unauthorized | We challenged the INVITE or REGISTER and the credentials were wrong or missing. With IP auth it usually means the call arrived from an IP we have not whitelisted. | Fill in Auth ID. Without it the UCM authenticates with the username field only, which some setups reject. |
| 403 | Forbidden | Authenticated, but not allowed: wrong or missing tech prefix, zero prepaid balance, destination blocked on your account, or an invalid caller ID. | Keep Trunk CID should be Yes so the configured caller ID is sent, not the extension number. |
| 404 | Not Found | The dialled number is not in a format we can route: missing country code, an extra 00 or +, or a local trunk prefix left in. | Send E.164 digits without the + (for example 442079460000). Strip national 0 and international 00 in your dial rules. |
| 408 | Request Timeout | No response came back. Usually a firewall, wrong port or transport, a DNS failure, or SIP ALG on the router eating packets. | Confirm UDP/TCP 5060 is open outbound and to 203.0.113.10. Disable SIP ALG. Test with an OPTIONS ping. |
| 480 | Temporarily Unavailable | The far end could not be reached: handset off, out of coverage, or the route for that prefix is temporarily down. | Retry later or route to another trunk. If it hits one prefix repeatedly, send examples to the NOC. |
| 486 | Busy Here | The called party is busy, or you reached the concurrent-channel limit on your account. | Treat as a normal busy. If every call returns 486, check your active channel count against your limit. |
| 503 | Service Unavailable | Capacity limit hit (calls per second or channels), or every route for that destination failed. | Pace your dialer to the agreed CPS. Configure a second trunk for failover. Ask the NOC if it persists. |
Seeing one-way audio instead of an error? Read One-Way Audio on VoIP Calls.
FAQ
Grandstream questions
Peer trunk inbound calls get 401. Why?
The UCM only trusts the exact Host Name address. Ask the NOC for every signalling IP we use for your account.
Can I set a channel limit?
Not per trunk on every model. Use the outbound route’s time conditions and limits, or tell us your limit and we enforce it.
Heartbeat shows unreachable but calls work. Why?
Your firewall drops OPTIONS but allows INVITE. Allow OPTIONS from our IPs.
Related
Other setup guides
Popular destinations
SIP Trunk United States+1
SIP Trunk United Kingdom+44
SIP Trunk Germany+49
SIP Trunk United Arab Emirates+971
SIP Trunk Philippines+63
SIP Trunk Australia+61
Stuck on a step?