This is how I’ve done it. I’m not sure it is completely proper in all of its intricacies. It is a work in progress. Please correct me if I’m doing something incorrectly. But this setup does seem to work. I have actually reached out to Flowroute and asked them to go over the guide to see if there was anything I should add, and their comments are at the bottom. I’ve also modified the guide slightly because of their response.
Note: This tutorial assumes you have a static IP for your server. If this is not the case, then don’t setup IP Authentication for your Trunk.
1. Set your preferred PoP within Flowroute.
A. Go to Flowroute.com and Log In.
B. Go to Interconnection -> Registration. Set your preffered PoP.
2. Create a PJSIP trunk in FreePBX:
A. Set general settings
(Obviously, replace the “Outbound CallerID” with your DID Number.)
B. Get your “Tech Prefix” from the Flowroute Dashboard:
C. And put the Tech Prefix followed by an * in the “Outbound Dial Prefix” setting:
D. Optionally set Authentication and Registration to none. And the “Sip Server” to whatever your preferred PoP is set to:
E. Change DTMF Mode to RFC 4733, set the From Domain to your Preferred PoP, set “support path” to “Yes”, and add the following to the Match (Permit) Line:
F. Save all of this so far.
3. Sip Settings
A. Then go to Asterisk Sip Settings -> PJSIP. And make note of the port you are listening on. This will be used when you route calls from Flowroute to your PBX:
B. Go back to the general tab under Asterisk Sip Settings, make sure “Allow Anonymous Inbound IP Calls” and “Allow Sip Guests” are set to “No”, and take note of your IP:
4. Flowroute Settings
A. Within Flowroute, go to Preferences -> Fraud Control -> Outbound SIP Credentials
B. Click “Disable Credentials”. It should now appear like:
C. Now go to Interconnection -> IP Authentication and add your server IP without a port (which you noted on the “Asterisk Sip Settings” general tab):
D. Go to Interconnection -> Inbound Routes and add a route to your server. This time, include the port which you are listening on for PJSIP (Default is 5060)
E. Now, go to DIDs -> Manage. And set the route for your DID to the one you just created:
If you’re looking through Flowroute page, you will see some firewall settings that they ask you to implement. As long as you’re using the built-in FreePBX firewall, then you don’t have to worry about these. The firewall automatically allows traffic from your trunks on only the port of the protocol they use.
Let me know if I’ve made any mistakes. It’s a little hard to make sure I got everything down here.
Edit 2: I reached out to Flowroute to see if they could confirm this guide, and this was their response:
Thanks for creating this doc, we are presently adding or revising the articles at Flowroute Support. Below are some suggestions and don’t necessarily represent requirements.
- On Trunk | PJSIP Settings | General, setting Authentication and Registration to none is optional.
- Under Asterisk SIP Settings | Chan PJSIP Settings, setting 0.0.0.0 (udp) > Domain the transport comes from is optional
Everything else looks solid, please let me know if you have any additional questions.
So I’ve edited the guide to reflect their responses.
Edit 3: I noticed someone else on another question had Flowroute tell them to set “support path” under the advanced PJSIP trunk settings to yes. I contacted Flowroute and they said that yes, this settings should be set to yes. So I updated this guide to include that.
Edit 4: I’ve removed setting of the “Domain the Transport comes from” within Sip Setting -> PJSIP. It was unnecessary.
Edit 5: I removed the firewall settings section, as that was unnecessary as well. The FreePBX built-in firewall handles this automatically.