Setup inbound call routing with FreePBX 13


  • Service Provider

    Now that all the basics are setup, we can create an inbound route to handle the incoming calls.

    A lot of people simply create an "any/any" default route and let calls all dump in. I disagree with that stance. You should set inbound routing to specifically handle calling. I suggest this, because when you later need to troubleshoot something, you can quickly being eliminating potential issues by having your routing specific to each DID.

    0_1476659852458_upload-753c7992-61ee-418b-b48e-f86ffeef7115

    Click Add Inbound Route
    0_1476661097338_upload-d5b20fa6-a687-4930-8b1b-4db45f2995f5

    Give your route a name, and then take a good look at the DID number box. This is the first "any" of the "any/any" mentioned above. Mouse over the ? icon and read the text.
    0_1476661284862_upload-9b504391-30b7-42af-a48d-54e27bc15789

    Because we are using VoIP.ms for this example, I can tell you to enter the 10 digit DID number you want to route. VoIP.ms does not pass the country code (1) for inbound North American DID.
    0_1476661723718_upload-1602f565-313e-4f4c-9ae3-2426777f7e74

    The next part is the Caller ID number and it is the second "any" from the "any/any" above. Read the help and decide what you want to do.
    I typically leave this as any because a business wants calls from anyone who calls. You do not want to block a potential client that has their outbound CID set to private.
    0_1476661894583_upload-4c50bb00-4b69-411b-ab98-a48a5d6625b2

    Set the destination to the Time condition or ring group or IVR as decided during discovery. In this case, it will go to the auto night mode time condition.
    0_1476662055200_upload-3ac8c3d2-5cd0-4459-abf8-eb416730bd94

    If you want inbound faxing to be detected on this DID, then you have to turn it on. Click to the Fax tab, click Yes on detect faxes to see the rest of the options.
    0_1476662355277_upload-8f156e87-6737-4c86-a9a9-53a6baf6a7b3

    Click on the Other tab to set the caller id lookup information. Select OpenCNAM in the CID lookup source and enable the Superfecta lookup for the default scheme.
    0_1476662711975_upload-7dfe813d-1e49-4d6c-8990-a00ba8d46be8

    Click Submit and Apply Config and you should now be able to call your DID and have it route in as specified.

    Part of the FreePBX 13 Setup Guide



  • Let's say your company had the following.

    1. Local number 555.555.5555
    2. Toll-free number 800.555.5555
    3. Three DIDs: 555.555.5556, 5557, and 5558

    You'd configure a route for each number.
    Route 1 would send DID 5555555555 to whatever IVR you've setup
    Route 2 would send DID 8005555555 to whatever IVR you've setup
    Route 3 would send DID 5555555556 to X extension.
    Route 4 would send DID 5555555557 to Y extension.
    Route 5 would send DID 5555555558 to Z extension.

    Thus, eliminating the need for DID any, as you've covered all possible DIDs associated with your company, and the order of the routes wouldn't matter, as it's not possible to match more than one route.


  • Service Provider

    @EddieJennings said in Setup inbound call routing with FreePBX 13:

    Let's say your company had the following.

    1. Local number 555.555.5555
    2. Toll-free number 800.555.5555
    3. Three DIDs: 555.555.5556, 5557, and 5558

    You'd configure a route for each number.
    Route 1 would send DID 5555555555 to whatever IVR you've setup
    Route 2 would send DID 8005555555 to whatever IVR you've setup
    Route 3 would send DID 5555555556 to X extension.
    Route 4 would send DID 5555555557 to Y extension.
    Route 5 would send DID 5555555558 to Z extension.

    Thus, eliminating the need for DID any, as you've covered all possible DIDs associated with your company, and the order of the routes wouldn't matter, as it's not possible to match more than one route.

    Correct.



  • I'm curious about routing logic for extension to extension calls. Am I right in assuming the concept of inbound routes refers to routing inbound calls from a trunk, rather than literally any inbound SIP traffic to the PBX?



  • @EddieJennings Outbound routes would be more applicable to your question. The dial rules match number patterns to determine whether your call is a local extension or external route.

    One thing I like about FreePBX/Asterisk/Freeswitch over 3CX is the fact that you don't have to worry about extension numbering. You can create any extension number you want (301, 302, 1045, 2343423).



  • @bigbear said in Setup inbound call routing with FreePBX 13:

    @EddieJennings Outbound routes would be more applicable to your question. The dial rules match number patterns to determine whether your call is a local extension or external route.

    One thing I like about FreePBX/Asterisk/Freeswitch over 3CX is the fact that you don't have to worry about extension numbering. You can create any extension number you want (301, 302, 1045, 2343423).

    My questions now are really for my own curiosity and wanting to know more about how the traffic is handled. As an experiment, I deleted all inbound and outbound routes and was still able to call extension-to-extension, which tells me that there's logic baked into the PBX so it just knows how to handle that. From what you said it looks like there are other PBX systems where that intelligence isn't built in, I would have to write specific routes for how to handle those calls.



  • Maybe start a new thread for the curiosities.. I'll chime in there.



  • @Dashrender said in Setup inbound call routing with FreePBX 13:

    Maybe start a new thread for the curiosities.. I'll chime in there.

    Good idea. Perhaps @Minion-Queen or @scottalanmiller can fork the last bit of this tread into a new one.


  • Service Provider

    I can't. I'm at a park.



  • @EddieJennings said in Setup inbound call routing with FreePBX 13:

    From what you said it looks like there are other PBX systems where that intelligence isn't built in, I would have to write specific routes for how to handle those calls.

    Hmmm, I may not have explained that well. On an asterisk level you have dial plans. This can even be alphanumeric. You can create an extension or even a name like EDDIE and tell the call where to go.

    In FreePBX (which is a system controlling Asterisk) you have an Extensions application and Outbound Routes which are manipulating your dial plans in asterisk.

    What other routes are you looking to configure?



  • @EddieJennings said in Setup inbound call routing with FreePBX 13:

    other PBX systems where that intelligence isn't built in

    Generally these other systems with intelligence dont exist. Take Allworx for example, its just Asterisk forked and customized, then made proprietary.

    Everything is generally Asterisk or Freeswitch, or some bastardization of these.



  • I don't know anything about other systems than FreePBX and Mitel. Both systems route calls automatically between any registered extensions on the system.

    Think about this like a network switch, the switch understand IP enough that an IP registered on port 1 will receive traffic sent to that IP from any other port on the switch.



  • @Dashrender said in Setup inbound call routing with FreePBX 13:

    I don't know anything about other systems than FreePBX and Mitel. Both systems route calls automatically between any registered extensions on the system.

    Think about this like a network switch, the switch understand IP enough that an IP registered on port 1 will receive traffic sent to that IP from any other port on the switch.

    Its essentially all in extensions.conf (although FreePBX now uses a database and ignores this file)


  • Service Provider

    @bigbear said in Setup inbound call routing with FreePBX 13:

    @Dashrender said in Setup inbound call routing with FreePBX 13:

    I don't know anything about other systems than FreePBX and Mitel. Both systems route calls automatically between any registered extensions on the system.

    Think about this like a network switch, the switch understand IP enough that an IP registered on port 1 will receive traffic sent to that IP from any other port on the switch.

    Its essentially all in extensions.conf (although FreePBX now uses a database and ignores this file)

    No it doesn't.

    FreePBX uses a database for the GUI and when you click the red apply button, it re-writes the conf files.



  • @JaredBusch So the conf files are still getting written to, but editing the conf files does no good as the database overwrites them?


  • Service Provider

    @bigbear said in Setup inbound call routing with FreePBX 13:

    @JaredBusch So the conf files are still getting written to, but editing the conf files does no good as the database overwrites them?

    The very next time you click the red apply button, yes. It has always worked this way. They even provide access to the conf files in the GUI, and you can see warning comments in them that they will be overwritten.



  • @bigbear right, and anything that you want to customize, has to be placed in the xxx_custom files.



  • @JaredBusch I still think of this as a "new thing" whereas pre bandwidth.com owning schmooze there was no mysql.

    Somewhere maybe around 2008, before or after.



  • @bigbear said in Setup inbound call routing with FreePBX 13:

    @JaredBusch So the conf files are still getting written to, but editing the conf files does no good as the database overwrites them?

    Not related, but Unifi stuff on the controller works the same way. Editing the files directly on the devices is over written the next time the controller talks to it.


  • Service Provider

    @bigbear said in Setup inbound call routing with FreePBX 13:

    @JaredBusch I still think of this as a "new thing" whereas pre bandwidth.com owning schmooze there was no mysql.

    Somewhere maybe around 2008, before or after.

    The FreePBX GUI has always been designed around a database to store the settings and then writing to the conf files all at once. It was never designed to read raw conf files and write back to them immediately.



  • @JaredBusch

    Well...

    0_1499468080459_sad throw.jpg



  • @JaredBusch over on FreePBX forums you references a cfg file to edit, I am about to load up FPBX 14 and was curious where that file is. TFTBOOT directory somewhere?

    The only way to get the Yealink T5 android apps installed is apparently to add the pkg path to a provisioning file. This weekend I am determined to figure out how to hard provision with FreePBX.


  • Service Provider

    @bigbear said in Setup inbound call routing with FreePBX 13:

    @JaredBusch over on FreePBX forums you references a cfg file to edit, I am about to load up FPBX 14 and was curious where that file is. TFTBOOT directory somewhere?

    The only way to get the Yealink T5 android apps installed is apparently to add the pkg path to a provisioning file. This weekend I am determined to figure out how to hard provision with FreePBX.

    Are you using the FreePBX Endpoint Manager to config your phones? If so, the basefile edit is an option there. If not, then you have to make it by hand and put it in the /tftpboot directory yourself.

    For the record I almost always do the config files by hand because once you learn it, it only takes minutes to replicate for bunches of extensions.



  • @JaredBusch said in Setup inbound call routing with FreePBX 13:

    @bigbear said in Setup inbound call routing with FreePBX 13:

    @JaredBusch over on FreePBX forums you references a cfg file to edit, I am about to load up FPBX 14 and was curious where that file is. TFTBOOT directory somewhere?

    The only way to get the Yealink T5 android apps installed is apparently to add the pkg path to a provisioning file. This weekend I am determined to figure out how to hard provision with FreePBX.

    Are you using the FreePBX Endpoint Manager to config your phones? If so, the basefile edit is an option there. If not, then you have to make it by hand and put it in the /tftpboot directory yourself.

    For the record I almost always do the config files by hand because once you learn it, it only takes minutes to replicate for bunches of extensions.

    If there was anything at all that I wish had better documentation or example files for it would be this. And I would agree that hard setting everything would seem to be easier once you have it figure out.

    I tried to build a file using the Yealink tool but it didnt work out. Again this weekend would be my first true effort.

    Is it such that you create a file for each mac address, and there are files that would mass-apply to a model. For example could I put the line mentioned in FreePBX forums to fix "ghost return calls" in that file alone and see that setting applied to all yealink phones?

    I imagine if I use EPM it will create said files and from there I could draw my conclusions and get the needed example files.


  • Service Provider

    @bigbear said in Setup inbound call routing with FreePBX 13:

    @JaredBusch said in Setup inbound call routing with FreePBX 13:

    @bigbear said in Setup inbound call routing with FreePBX 13:

    @JaredBusch over on FreePBX forums you references a cfg file to edit, I am about to load up FPBX 14 and was curious where that file is. TFTBOOT directory somewhere?

    The only way to get the Yealink T5 android apps installed is apparently to add the pkg path to a provisioning file. This weekend I am determined to figure out how to hard provision with FreePBX.

    Are you using the FreePBX Endpoint Manager to config your phones? If so, the basefile edit is an option there. If not, then you have to make it by hand and put it in the /tftpboot directory yourself.

    For the record I almost always do the config files by hand because once you learn it, it only takes minutes to replicate for bunches of extensions.

    If there was anything at all that I wish had better documentation or example files for it would be this. And I would agree that hard setting everything would seem to be easier once you have it figure out.

    I tried to build a file using the Yealink tool but it didnt work out. Again this weekend would be my first true effort.

    Is it such that you create a file for each mac address, and there are files that would mass-apply to a model. For example could I put the line mentioned in FreePBX forums to fix "ghost return calls" in that file alone and see that setting applied to all yealink phones?

    I imagine if I use EPM it will create said files and from there I could draw my conclusions and get the needed example files.

    i can upload one later tonight or tomorrow.



  • @bigbear said in Setup inbound call routing with FreePBX 13:

    @EddieJennings said in Setup inbound call routing with FreePBX 13:

    From what you said it looks like there are other PBX systems where that intelligence isn't built in, I would have to write specific routes for how to handle those calls.

    Hmmm, I may not have explained that well. On an asterisk level you have dial plans. This can even be alphanumeric. You can create an extension or even a name like EDDIE and tell the call where to go.

    In FreePBX (which is a system controlling Asterisk) you have an Extensions application and Outbound Routes which are manipulating your dial plans in asterisk.

    What other routes are you looking to configure?

    I'm not looking to configure anything wacky. I was curious as to how the PBX knows that a SIP invite that's sent to [email protected] is to go to a particular extension, rather than be compared against the dialling patterns for outbound routes.


  • Service Provider

    @EddieJennings said in Setup inbound call routing with FreePBX 13:

    @bigbear said in Setup inbound call routing with FreePBX 13:

    @EddieJennings said in Setup inbound call routing with FreePBX 13:

    From what you said it looks like there are other PBX systems where that intelligence isn't built in, I would have to write specific routes for how to handle those calls.

    Hmmm, I may not have explained that well. On an asterisk level you have dial plans. This can even be alphanumeric. You can create an extension or even a name like EDDIE and tell the call where to go.

    In FreePBX (which is a system controlling Asterisk) you have an Extensions application and Outbound Routes which are manipulating your dial plans in asterisk.

    What other routes are you looking to configure?

    I'm not looking to configure anything wacky. I was curious as to how the PBX knows that a SIP invite that's sent to [email protected] is to go to a particular extension, rather than be compared against the dialling patterns for outbound routes.

    You were answered. It is in extensions.conf.

    This is super under the hood Asterisk knowledge. This has nothing to do with FreePBX. Pick your fight here.



  • @JaredBusch I see that now. I'm not making plans to make any kind of changes with Asterisk's behavior. I was simply geeking out on the questions of why and how. :)



Looks like your connection to MangoLassi was lost, please wait while we try to reconnect.