OpenSIPS / Kamailio

SIP Trunk Setup for OpenSIPS / Kamailio

Use Voyced as an external SIP provider


What You’ll Need

Make sure you have:

  • A working OpenSIPS or Kamailio instance (latest version preferred)

  • A public IP or proper NAT/port forwarding

  • Outbound access to sip.voyced.eu over UDP port 5060

  • Your Voyced credentials:

    • Account / telephone number: Your-Voyced-DID

    • Service password: YourServicePassword

    • SIP server: sip.voyced.eu


Requirements Before You Begin

  • OpenSIPS / Kamailio must have the uac module (for outbound registration)

  • You need basic dialplan routing logic in place

  • For NAT setups, RTP relay support is required (rtpproxy or rtpengine)

  • Inbound IP-based ACL should be configured to accept calls from sip.voyced.eu


SIP Trunk Setup Steps

 

1. SIP Registration (Outbound)

OpenSIPS example using uac module:

cfg
 
modparam("uac", "registration", [
{
auth_username = "Your-Voyced-DID"
auth_password = "YourServicePassword"
realm = "sip.voyced.eu"
proxy = "sip:sip.voyced.eu"
expires = 3600
contact = "sip:Your-Voyced-DID@your.public.ip"
}
])

 

Kamailio would use similar uac.registrar settings and the same parameters.

 

2. Outbound Call Routing

In your routing logic, rewrite and relay:

cfg
 
if ($rU =~ "^[0-9]{7,15}$") {
$ru = "sip:" + $rU + "@sip.voyced.eu";
t_relay();
exit;
}

 

You can tailor this logic based on local dial plans.

 

3. Inbound Call Routing

Allow traffic from Voyced IP/domain:

cfg
 
if ($si == "sip.voyced.eu") {
route(handle_inbound);
}

 

Then in route[handle_inbound], forward to the correct SIP user or device.

 

4. Codec Support

Voyced supports:

  • ulaw

  • alaw

Ensure your endpoints and RTP relay support these.

 

5. RTP and NAT Handling

If using NAT or devices behind firewalls, set up:

OpenSIPS:

cfg
 
rtpproxy_offer("ro");
rtpproxy_answer("ro");

 

Kamailio:
Use rtpengine_offer() and rtpengine_answer().

 

Testing Your Setup

  • Run opensips-cli -x mi reg_list to check if you're registered

  • Use sip_trace() or logs to monitor call flows

  • For Kamailio, use kamctl ul show and logging output

 

Optional: MySQL-Driven Registration

You can store SIP trunk credentials in the uacreg database table instead of hardcoding in the config. Useful for larger deployments.

 

Final Tips

  • Restart OpenSIPS/Kamailio after config changes

  • Make sure port 5060 UDP is open

  • Monitor logs if things don’t work as expected

 


 

Common Pitfalls

  • Registration not working? → Double-check SIP credentials, contact address and NAT.

  • One-way audio? → Enable RTP proxy and ensure correct media IPs.

  • Call rejected? → Confirm codecs and outbound call permissions are correct.

 


 

Want Help?

Send your relevant config snippets (without passwords), and we’ll help you troubleshoot.

 

 

 

Last updated: 01/08/2025

 

 


© Voyced
All information provided is copyrighted and purely informative in nature. It is maintained by Voyced with the greatest of care using reliable sources only.
Given the fast evolution of the telecom sector, Voyced does not offer any guarantee about the accuracy and completeness of the information offered. 
We explicitly do not give anyone permission to use this information in any other way than to inform themselves about what (legal) requirements there may be and they need to comply with when registering Services and/or DIDs with Voyced.

  • Kamailio, OpenSIPS, setup manual, setup instructions, setup details, setup, IP PBX, IPPBX
  • 0 Користувачі, які знайшли це корисним
Ця відповідь Вам допомогла?

Схожі статті

3CX

Voyced SIP Trunk Setup for 3CX (Manual Configuration) Works for inbound and outbound calls using...

Asterisk

Voyced SIP Trunk Setup for Asterisk Supports inbound and outbound calling using Voyced as an...

FreePBX

SIP Trunk Setup for Voyced – FreePBX Manual Use this guide to connect your FreePBX system to...

Elastix

SIP Trunk Setup for Voyced – Elastix Manually configure a SIP trunk to connect your Elastix...

Issabel

SIP Trunk Setup for Voyced – Issabel This manual explains how to connect your Issabel PBX system...