How to Connect VICIdial with a Grandstream UCM Trunk

If you have a Grandstream UCM PBX and want to send all outbound or inbound calls to your VICIdial server, you can easily do it by creating a SIP trunk between the two systems.
In this guide, we’ll show how to configure both sides — the Grandstream and VICIdial — to communicate successfully.


🧩 Step 1: Create an Extension on Grandstream UCM

  1. Log in to your Grandstream UCM web interface.
  2. Go to Extension / Trunk > Extensions.
  3. Create a new SIP extension (for example, 5101).
    • Password: Admin!1234
    • Host: set as dynamic (default)
    • Transport: UDP
  4. Save and apply the changes.

This extension will act as the “gateway” between UCM and VICIdial.


⚙️ Step 2: Configure the Trunk in VICIdial

Go to your VICIdial Admin Interface:
Admin → Carriers → Add A New Carrier

Fill in the details as shown below:

Carrier ID: jio
Carrier Name: jioucm trunk
Registration String:

register => 5101:Admin!1234@172.16.10.222/5101

Account Entry:

[JIO]
type=friend
host=172.16.10.222
username=5101
secret=Admin!1234
fromuser=5101
context=trunkinbound
insecure=port,invite
disallow=all
allow=ulaw
qualify=yes
dtmfmode=rfc2833
nat=force_rport,comedia
canreinvite=no
directmedia=no

Protocol: SIP
Globals String:

jiosip = SIP/JIO

Dialplan Entry:

exten => _91XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91XXXXXXXXXX,2,Dial(${jiosip}/${EXTEN:2},${CAMPDTO},To)
exten => _91XXXXXXXXXX,3,Hangup

Click Submit and then Apply Changes.


📡 Step 3: Allow Incoming Calls on VICIdial

To receive calls from the Grandstream UCM, make sure VICIdial’s Inbound DID or Call Menu is configured under:

Admin → Inbound → DIDs
Map the DID or inbound route to a specific campaign, agent, or call menu as per your requirement.


🧱 Step 4: Configure the Trunk on Grandstream (Outbound to VICIdial)

On your Grandstream UCM:

  1. Go to Extension / Trunk > VoIP Trunks.
  2. Click Add SIP Trunk → Choose Peer SIP Trunk.
  3. Enter:
    • Type: Peer SIP Trunk
    • Host Name: IP of your VICIdial server (e.g., 172.16.10.10)
    • Username/Password: (leave blank for peer trunk)
    • From User: 5101
    • Authentication: Disabled
  4. Under Advanced Settings, enable:
    • NAT: Yes
    • Qualify: Yes
  5. Save and Apply.

🚀 Step 5: Create an Outbound Route on Grandstream

  1. Go to PBX > Outbound Routes.
  2. Add a new rule — e.g., _91XXXXXXXXXX
  3. Set Use Trunk = the SIP trunk you created (to VICIdial).
  4. Set Strip Prefix = 0 if needed.
  5. Apply the changes.

Now, when you dial from a Grandstream phone, calls will be routed to VICIdial for processing, campaign logic, or further call routing.


✅ Step 6: Verify the Connection

On VICIdial CLI (Asterisk console), run:

asterisk -rvvv
sip show peers

You should see your Grandstream trunk listed as “OK”.

Make a test call to confirm that audio and routing are working both ways.


🧠 Summary

DeviceSettingDescription
Grandstream UCMExtension 5101Acts as SIP account for VICIdial
VICIdialSIP Trunk (JIO)Connects to UCM using extension credentials
Registrationregister => 5101:Admin!1234@172.16.10.222/5101Registers VICIdial with UCM
ProtocolSIPStandard communication protocol
Dialplan_91XXXXXXXXXXPattern for outbound dialing

📞 Final Tip

If you face registration or call issues, check:

  • sip show registry on VICIdial CLI
  • asterisk -rvvv logs for authentication or codec errors
  • Ensure both sides are using ulaw/alaw codecs and UDP transport

Leave a Comment