Voys side (Freedom)
- Create a VoIP Trunk in Freedom → Manage → VoIP Trunk
- The Account ID and password (these are auto-generated) are going to be the relevant fields.
- Go to Advanced (SIP) settings and set the Fixed hostname to your LiveKit SIP endpoint, e.g.
4d3njb7wq71.sip.livekit.cloud(you'll find this in LiveKit Cloud under Telephony → SIP trunks → SIP URI on the right top.)
This tells Voys to forward incoming calls straight to LiveKit instead of waiting for a registration. Simple as that.
LiveKit side
- Go to Telephony
- Go to SIP trunks
- And click the "+ Create a new trunk" button
- Go to Telephony
- Go to SIP trunks
- And click the "+ Create a new trunk" button
Inbound trunk (receiving calls)
In LiveKit Cloud → Telephony → Configuration → Create new → Trunk → Inbound, JSON editor
{
"name": "Voys inbound trunk",
"numbers": ["+31XXXXXXXXX"],
"auth_username": "<Account ID from Freedom>",
"auth_password": "<Password from Freedom>"
}Use your Voys phone number with the country code (+31, drop the leading 0)
Dispatch rule (required for inbound)
This is an important one. The dispatch rule connects the inbound call to the Agent. Mind you the agent name needs to be an exact match.
- Dispatcher rules
- And click the "+ Create new dispatch rule" button
- Click JSON EDITOR
- Fill in the following json
Create new → Dispatch rule:
{
"rule": {
"dispatchRuleIndividual": {
"roomPrefix": "call-"
}
},
"name": "Inbound-to-Agent",
"roomConfig": {
"agents": [
{
"agentName": "My Agent Name"
}
]
}
}Connecting your Agent to the trunk
Outbound trunk (making calls through Voys)
Create new → Trunk → Outbound:
{
"name": "Voys outbound trunk",
"address": "ha.voys.nl",
"numbers": ["+31XXXXXXXXX"],
"auth_username": "<Account ID from Freedom>",
"auth_password": "<Password from Freedom>"
}Security
Trusted IPs
If you want to be sure you only receive traffic from Voys add the following IPs ranges as trusted:
- 195.35.114.0/23
- 185.103.76.0/22
Mind you if we ever change the IPs you won’t receive any traffic. We do not expect these IPs to change in the upcoming years ;)
Encrypt you Audio!
We highly recommend you use SRTP. This means the call traffic is encrypted and nobody can listen in on your calls.
The Voys side
- Use encryption should be on as should
- Enable TLS as a Transport protocol.
The LiveKit side for inbound
- The improved json
{
"name": "Voys inbound trunk",
"numbers": [
"+31XXXXXXXXX"
],
"allowedAddresses": [
"195.35.114.0/23",
"185.103.76.0/22"
],
"authUsername": "<Account ID from Freedom>",
"authPassword": "<Password from Freedom>",
"mediaEncryption": "SRTP"
}The LiveKit side for outbound
- The improved json
Alternatives for transport en media_encryption are
transport:3= TLS (string"SIP_TRANSPORT_TLS")media_encryption:1= SRTP (string"SIP_MEDIA_ENCRYPT_ALLOW")
Audio quality
Noice canceling
If you want better audio quality you have two options. You can enable krisp. This is noise cancellation that can be applied directly at your SIP trunk for inbound or outbound calls. The new looks like this.
Audio code
Voys natively support Opus which gives you the highest audio quality. LiveKit however does not support Opus on a SIP level. They do however support G.722. Both Voys and LiveKit natively support and use this codec. If you want to enforce the usage of this codec, go to the Expert Options on the Advanced (SIP) settings on the VoIP trunk page. There you can find the Codes settings.
Common issues
- The Static hostname on the Voys end says: sip:4d3njb7wq71.sip.livekit.cloud where it should say 4d3njb7wq71.sip.livekit.cloud without the SIP part
- Don’t forget to spin up you Agent. It should be Deployed (and Green ;)
**Outbound trunk (making calls through Voys)**
- Go to Telephony
- Go to SIP trunks
- And click the "+ Create a new trunk" button
- But this time select Outbound
- And give in the following json