Skip to content
SIPTrunkHub

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

Recommended

Type: 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.

  1. 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
  2. 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
  3. 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
  4. 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.

Common SIP error codes and fixes for Grandstream
CodeMeaningLikely causeFix on Grandstream
401UnauthorizedWe 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.
403ForbiddenAuthenticated, 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.
404Not FoundThe 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.
408Request TimeoutNo 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.
480Temporarily UnavailableThe 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.
486Busy HereThe 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.
503Service UnavailableCapacity 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.

Ready to connect Grandstream?

Prepaid from $200. No setup fee, no contract. Get rates and your account details from sales.