Flowroute multiple DID's

Good Day! My apologies if this has been asked and answered, I was unable to find anything via the search or google.

My question is, what are the best practices for setting up multiple DID’s from flowroute - I’ve followed the most excellent howto titled “HOW TO - Flowroute Trunk with Proper Use of IP Auth and new PoPs - FreePBX / Tips and Tricks - FreePBX Community Forums” (new user, I can’t just link it)

And then, for my second DID, I essentially followed the same process again. It works - I can receive calls from both numbers, everything is seemingly great, but something about the process just felt wrong - notably, for either DID, the channel is the same when I look at the CDR reporting - very much like I opened a second connection/trunk to flowroute and didn’t need to.

Thanks much for any insight. ~j

sounds like you did it correctly

first from the provider side you set the strategy for which POP to use and the DID’s destination second be sure to have the network for the pop defined in the trunks match permit if using pjsip and finally the addition of the account prefix for outbound calls to authenticate via IP

I understand more now. I did it twice, and for my use, that seems unessesary. I removed one, after realizing that

“Outbound CallerID” in the trunk setup is the default DID to use - if I wish to override that in either an extension / dial plan / I’d assume incoming dial plan too, although I have no need of this, I can use any of the flowroute DID’s.

I’m still having trouble wrapping my head around DID vs. Trunk and the fact that none of my old school phone system knowledge really applys.

Thank you, and thank you @dolesec.


The difference between old-school telephony and this (for this aspect only) is that calls are delivered from your ITSP to your PBX through a trunk. The trunk has no concept of what is being delivered - it’s just the IP address/tunnel to and from your ITSP. The second difference is that inbound calling and outbound calling are almost entirely unrelated. You can have a trunk that is “inbound” only, or “outbound” only. The differentiator is what you and your provider as set up.

In my case, for example, all of my inbound calls come in on a trunk from “ITSP A” but I have two outbound trunks that I use for “other” stuff. My ITSP A trunk also has outbound capabilities, but they’re unrelated. One of my outbound trunks is there specifically to call my cell phone (so I can call myself if my primary trunk goes down).

In broad strokes, the first hurdle is that, in VOIP, the terms DID and CID are not interchangeable like they were on a T1. The DID is the In-dial number that is being sent to your PBX. It’s part of the payload that establishes the call. Your ITSP is sending you the call because the DID matched your account, hence delivered VFR-direct to your PBX. The trunk has almost nothing to do with your DID, except that calls to your DID are sent through a trunk. Asterisk takes the call and determines the DID, then uses that information to route the call for you.

Caller ID (or CID) is a two-piece set. On an Inbound call, the CID is the number that called you, and you can route calls based on CID in your Inbound Route. In POTS, this was the information that was delivered between the first and second ring. On an Outbound call, you set the Caller ID your system is using. It might be your DID, or it could be a number from a caller that gets routed “off” your PBX to a remote phone. This split functionality is part of many people’s confusion because the CID used to be managed by the Telco.

So, while DID and CID would seem to be related, they aren’t, with one exception. To obfuscate the problem with CID even more, your provider may force you to use an assigned Caller ID - which is one of your DIDs in the form

<XXXYYYZZZZ> "YourNameHere>"

If your ITSP allows “foreign” CID, you can send almost anything down the line to be picked up by remote phones or extensions.

So - trunk is the pipe through which your calls travel.
DID is always the number being called in your PBX. It is always one of your numbers.
CID is either the CID of the person calling you (for all inbound calls) or your CID (for most outbound calls).

Trunks do not care about CID, unless you force one. Trunks do care about “destination numbers” which (if you want to get confusing) is like a DID to someone else’s PBX. I always avoid using that model, because it doesn’t help. For outbound calls, you will be using “dialed number” which the trunk can massage to meet the specific requirements of your ITSP. Once again, the trunk is only the conduit for your call.

Inbound and Outbound routes are how you select which trunk will be used (if you have more than one) and can also do things like forcing a specific caller ID for an emergency call (for example). Most people have two or three outbound routes - these take the dialed number, tune it (add or remove ‘1’ as a prefix, add area code for 7-digit numbers, etc.) and get it ready to the trunk.

Summary on this point: Inbound routes are searched by DID, CID, neither, or both for a match to send a call in a direction. This can be an IVR, Voicemail, an announcement, or a “hang up” (as examples). An inbound route without a DID or a CID is called an “any/any” or “default” route, since the blank DID and CID match anything.

An outbound route uses the Dialed Number to do basically the same thing. The number is selected and optionally modified to be sent to a trunk. Once a trunk is selected, it can also manipulate the outbound dialed number to match the specifics of the trunk selected.

That’s way more than you probably need to start, but hopefully one of the ways I explained it might help. :slight_smile:


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