Inbound and out bound routes?

Hello i have a question We have 4 analog lines on analog card working with no problem. Now we added 4 new lines using a fxo gateway the fxo gateway is in another location. My question is that to keep them apart from in there own groups How can i do that Yesterday arielgrin helped setup the gateway. But in order to call out have to dial a 9 prefix to keep them groups apart. and so far it was working yesterday. But is there a way not having to dial that 9 prefix to make that outside call.

Impossible to help you with the information you provided.
Looks like you are asking a question about how to route calls out on different trunk.
You can certainly configure to use “9” or not use it.

What exactly do you want to do?

I’m sorry i couldn’t respond back sooner. I been busy trying to figure this whole mess i have here. For the most part inbound calls been worked out. But outbound calls Is what I’m a little confused on. This is the Setup i have here currently. a PBX system with 8 analog cards for 8 channels lines. And a Grandstream 8 Port FXO box with 8 port lines. there are two groups here First group haves the analog lines the second group which is my group has the Grandstream gateway box. Now the first Group is in another city for 9 month and all calls are forward from there lines the FXO card to there place where they are at. So Us second group that is picking up the slack for the first group using the Grandstream box I just recently with the help of Arielgrin from here helped me to setup the Grandstream box which I’m great full in many ways.

Also in the PBX Group One is using extensions 700 to 749 there is not that many But only 6 phones but just in case left some room My second group is using 751 to 800 extension.

So group one is assigned Ring group 600 and my Second group is Ring group 601 so both ring groups 600 is to the analog cards and ring group 601 is assign to the grandstream box incoming is working on both But outgoing is the problem.

First group is okay to dial out with no problem Second group needs to dial a 9 prefix to dial out. It’s not a big deal but my boss is saying it’s a little nightmare for him to keep dialing that 9. From Arielgrin what he is saying that that 9 prefix separate the analog card lines from the Grandstream box analog lines. And that is okay. But is it possible not to dial that 9 to call out. And still keep the group 2 our group only be able to use the Grandstream box and not he analog card lines?

This is what I’m confused about and need help. Thank you for everyone who can help or is reading this. I really need help to figure why I’m confused and still new to this whole PBX.

My thing is how can i Separate the Analog lines to only call in and out to group one and Same with the Grandstream box to only call in and out two group two. That is what I’m having troubles with.

Use dial patterns in outbound routes to determine which trunk a call goes out on depending on the number that is being dialed.

When you mean by dial patterns? Right now both the analog cards lines and the Grand Stream box use the same type of dialing out?

In FreePBX you have configured certain dial patterns in outbound routes, by which you control what dialed numbers are sent out on what trunk.
As you want to use different trunks according to what number your users are dialing, you need to probably add another outbound route, determine dial patterns and specify the trunk you want to use.
Which FreePBX version are you using?

If you have no idea what I am talking about, just go to your outbound routes and paste a screenshot of the settings.

Hello I know what outbound routes are. The Question i have is that how can be able to separate the analog cards and the Grand stream box outbound call without having to set a Prefix of 9 on one of them? and still be able to let this group of extensions the first group use the analog cards and second group of extensions use the Grand stream box?

Yes you can do that.
Use the CallerID field under dial patterns. This field controls what extensions can use this route.


So you would have one outbound route to your Grandstream box, where you put the range of extensions in the CallerID field, that you want to access this route when making a call.
On the other outbound route, you do it for the extensions that should be using the analog cards.
Then you don’t need to use prefix 9.

My problem is I have 2 Groups of extensions. 700 to 749 and 750 to 799. Also I have 2 sets of lines
A analog card 8 lines and a fxo gateway 8 lines. I would like to be able to only let the first group of extensions to only use the analog cards for incoming and outgoing calls. And the second group of extensions to only use the fxo gateway for incoming and outgoing calls. But not able to to access each other lines. For internal calling from extension to extension calling is okay. I’m just not sure how to go about all this. I really need help.

You’re going to have to do some reading, I’m afraid.

What you want to do is relatively simple (with the possible exception of the inter-extension calling). It’s all done using something called a “context”.

So, for example, your FXO card gets a call. You have a trunk set up that picks up those lines and you route the incoming call from that card to one or more specific extensions.

On the outbound side, you can set up a variation on the “from-local” context that only routes your calls out through the interface you want them to go out on.

It’s all actually pretty simple - you just have to decide how you want everything routed and then make sure that your configuration matches.

Step 1, then, is to set up your trunks.
Step 2 is to set up the outbound routes - these will each tie to a specific trunk.
Step 3 is to set up the extensions so that they route to a specific outbound route.

Inbound configuration is basically the same. Set up the trunks, the inbound routes (to handle the incoming traffic) and the extensions.

After that, there are a couple of commercial modules that you can look into that will give you the intra-network calling limitations that you are looking for.

Yes, it’s going to be a lot of set up, but conceptually it’s pretty simple.

Here is what you can do:
Go to your outbound route, where under route settings, and “trunk sequence for Matched Routes”, you have your trunk with analog cards selected. Then go to “Dial Patterns” and put 7[0-4]X in the CallerID field for all your dial pattern strings. Now all your extensions 700-749 will use this route on outbound calls, provided your dialed number matches this route.

Then take the other outbound route, where under “trunk sequence for Matched Routes”, you have selected your fxo gateway trunk, and put 7[5-9]X in the CallerID field for each dial pattern string under “Dial Pattern Wizards”. 750-799 will use this route now if your dialed number matches this route.
You must have a “9” in the prefix field somewhere. Remove that.

This takes care of your outbound calls and achieves what you wanted.

If unsure, paste screenshots of your outbound route settings and dial patterns.

Inbound is another matter.
Do all of the 16 analog trunks/POTS lines belong to the same Telco provider and do calls come in on your main company number and terminate on an IVR?
I assume with POTS you are not getting DID.

Hello at the moment. 8 lines from the analog cards that are on the pbx is in one location. The FXO gateway grand stream is at my home. this is how i have the PBX setup i created 2 ring groups simple ones. First ring group is 700 to 749 i don’t have that many Extensions only 12 But i left room space between for a second group of 749 to 799 and the Analog cards when ring in goes to that ring group i made of 600 and 601 goes to ring group 2.

For outbound calling Group 1 calls out to the analog lines. and ring group 2 needs to dial a 9 to ring out to the fxo gateway. If they don’t dial a 9 what happens it calls out on the analog lines unless they are full then goes right to the fxo gateway.

I have 2 outbound routes one for analog lines and one for FXO gateway. Both have the Same dialing pattern only difference is that the FXO has a 9 in the prefix to call out to the FXO gateway.

So in the outbound in the FXO gateway put in 7[5-9]X what does that do? So i didn’t understand what does 7[5-9]X do?

What matters on outbound, are the extension numbers. The ring group extension is irrelevant.
So, the numbers of your extensions are between 700 and 799 and they are in two ring groups?

What the 7[5-9]X in the CallerID field does, is force extensions between 750 and 799 to use that route, which is what you want if I understand you correctly.
Remove the “9” in the prefix field.

We will look at the outbound now and then focus on inbound.

Yes you are right Outbound is what I’m having problems with. I just wanted to explain how i have my setup. The numbers of my Extensions are 700 to 799 yes. the split of is 700 to 749 and 750 to 799. they are in 2 ring groups first ring group number is 600 for 700 to 749 and 601 that ring group is for 750 to 799.

Thank you Avayax this is the dialing pattern i have for the FXO gateway it is the same as the Analog lines but this one has the prefix 9 in it i will now take that out and and add the 7[0-4]X into it.

And also take out the prefix