Starlink CGNAT & FlowRoute RTP Configuration INFO

After many Goggle searches and testing many different trunk configurations including this one: CGNAT StarLink & FlowRoute RTP Issues

I found a solution that actually works for FlowRoute users with StarLink who wish to host their own FreePBX server behind an additional NAT firewall/router (in my case, an OpenWRT appliance), and wanted to share to save someone else the headache.

This setup mainly focuses on the Trunk configuration and PJSIP global settings as this is a trunk RTP communication issue and not a local extension issue.

Configure your PJSIP trunk as instructed in the FlowRoute configuration guides and customer portal. The following pages are useful in configuration if you are new to VOIP configuration:

Do not create an inbound route on FlowRoute, leave this to the sip registration.

Your PJSIP trunk->pjsip Settings->General page settings should be set for outbound auth only and to send registration. Fill in your account details and choose a sip server near you from flowroute. Leave any setting not mentioned in this post as stock.

Your PJSIP trunk->pjsip Settings->advanced page configuration should look like this:
DTMF - You can leave this set to Auto or change it to RFC 4733
Send Line in Registration: Yes
Support Path: Yes
Inband Progress: Yes (this enables RTP early media for Announcements and such)
Direct Media: Yes
Rewrite Contact: Yes
RTP Symmetric: Yes
Media Encryption: NONE (very important or you will have NO audio at all)
Force rport: NO

On the Codecs Tab you should ONLY have ulaw, alaw, and g729 selected
This concludes trunk configuration.

Lets move over to the SIP global settings page in Settings->Asterisk SIP Settings
On the General Tab:
Allow Anonymous Inbound SIP Calls: NO
Allow SIP Guests: NO (you can enable this troubleshoot call routing if needed)

In the NAT Settings - MOST IMPORTANT
Set your external address by clicking the Detect Network Settings button.

Now visit your router and obtain your StarLink CGNAT IP and determine the network it exists on. Mine was on 100.64.0.0/10. You can use this tool to determine your network if you aren’t a networking professional: IP Subnet Calculator

Now DELETE the local network entered by clicking the button and enter that network you just obtained in the local networks fields.

Set your RTP port ranges to 10000 - 20000
RTP Checksums: YES
Strict RTP: NO
Set your RTP Keep Alive to 5

Click submit and apply, and reboot your PBX.

In your Router, Forward all traffic on port 5060 to your PBX, as well as all UDP traffic on ports 10000-20000

You should now have Calls with Audio working in both directions.

For additional issues, you can also employ a free TURN server courtesy of metered.ca. Just head there and sign up for a free account and enter the credentials on both the Media Transport section as well as the WebRTC settings section of the Settings->Asterisk Sip Settings->general page.
You will want to leave the STUN field blank.

Don’t forget to setup your routes and enable Signal RINGING on the inbound.

Hope this helps someone! I spent a week or so troubleshooting to get it working for inbound calls!

3 Likes

Hi
In my case, I don’t have any isse with Starlink (or one or two times a week), My SIP provider is OVH France.
Sometimes, the voice is off and I recover the voice some seconds later.
I scarred that doesn’t work with Starlink but yes, It works better than the first days I used Starlink anyway.
However, I’m using Chan_sip and not pjsip.
Maybe with PJSIP, we get this issue.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.