I have FreePBX 5.211.65-12 and Grandstream GXP-2020 phones and everything is working well except for extension dialing.
I have multiple “lines” as we are a sort of umbrella business and each “line” is attached to a DID on our SIP Trunk. In order to make this work correctly for our HR staff I use a prefix on the outbound route and the phones.
The only issue with this is that when I attempt to dial an extension or feature code the prefix is added in turn making it an invalid destination.
The first solution I came up with was to have a dedicated “Office” account on the phones that do not use a prefix, this wastes one account which we need to use for a DID. The next idea was to just have Account 1 not use a prefix and set that outbound route to not use a prefix either. The second will work just fine I think but I am worried that any local(LAN) calls will tie up that particular DID.
Is there any way to use prefixes on all accounts/routes and still have extensions be available?
I must really be missing something…how is the outbound route even coming into play when dialing an extension.
I guess I’m not really clear as to what you are doing. You speak of “lines” and “sip trunks” somewhat interchangebly. “Lines” really has no relevance to sip trunking. I also think you’re confusing “DID” with a “line”. You can’t tie up a “DID” you can only tie up an extension. From a SIP pont of view, if I call you on 5015551212 and another call comes into 5015551212, the second call hits the server and it is processed, It’s up to you to determine how it’s processed.
then on the Outbound routes I have a prefix set to match what the phones prefix to all dialed numbers.
So if I hit “Account 1” on my phone and dial 123-456-7890, the phone send 1123-456-7890 to the PBX. The PBX then removes the leading “1” because it matches a dial pattern on that particular outbound route and sends it to the trunk.
I guess I’m still missing something. If you’re using SIP trunks, they all go out the same way, so how do you differentiate? When you send out something out a SIP trunk, it goes out the SIP trunk. I’d love to see your trunk configuration.
w5waf: I have my trunks and routes configured as basic as I can, the way that I am differentiating is by using a prefix configured on each phone.
The issue I am facing is based on the prefixes configured on the phones and out routes. I am going to remove the prefixes and just have a single extension per DID and use the CID field like SkykingOH suggested. After looking into it a little bit more with rested eyes and everyone here’s help I see that I was using the wrong tool for the job.
I was thinking there might be a way to have FreePBX/Asterisk strip the prefix if it matched NXXX but that didn’t work.
After trying the CID field I realized that in order for that to work for me I still have only one “Line” button(These are SIP Account selection buttons) that can be used to dial an extension. I found a post here on the forums that clarified my question a bit more.
I gave you two solutions, you could add alias to each extension. But that is not a thrilling prospect.
There is a third solution, you could write a custom extension and put the phone in it’s context. The context would check the digits after the first digit and if internal strip the digit then send it back to FreePBX dial plan.
Lastly the CID in route will indeed work. You just need a route per line key.
The CID in route seems like it should work, I must be doing something wrong though since with that enabled all calls end up matching the first outbound route(although all feature codes and ext dialing works ).
I may not be looking at this the right way, I need all line keys to be almost identical except that key 1 uses route 1, key 2 uses route 2 and so on. I tried setting multiple phones with the same extension which seemed fine except any internal calls from the duplicated ext obviously did not show up as the user.
It seems like I can get one or the other but have yet to get both features to work. I would prefer that each line key on a given phone use the same extension for internal calls and that each route be able to dial any number. Essentially each route is a separate company but we all work in the same office building and need to be able to dial to a desk.
I am certain that this is a failure on my part entirely, I really appreciate everyone’s help and patience on this issue. I am sure by now it is apparent that phone systems are not my strong point but I am doing my best to learn.
in the outbound route enter your match pattern (i.e. NxxNxxxxxx)- and then note that after each pattern there is something caller “caller id” - enter the extension number in that field. if you use different trunks for outbound calls for different extensions, then you would need different outbound routes, all could use the same match pattern but the caller id field would be different. now if you put the outbound caller id you want to pass into the extension definition you should be able to accomplish your goals.
Thanks for the response, I have set the CID field however I need each extension to be able to dial out on all routes and dial extensions. I can’t seem to get that to work the way it needs to.
I have been able to get everything up to this point working and this is all that keeps me from porting our original numbers out to BroadVoice and being done with this project. I think I am to the point that I can’t see the forest for all the trees in the way.
You would be able to use every trunk at every phone.
First, let me ask you a question, is all of this because of caller ID? You want to control what caller ID goes out?
Anyway, to go back to what you want, let’s say you have four trunks for example so on each phone you assign for line appearance keys 1101,2101,3101 and 4101 at extension 101 then at 102 1102,2102,3102 and 4102 and so on for each extension.
Then you make 4 routes for each trunk. In the caller ID fiend you would put the 1102, 2102, 3102 and 4102 on each outbound route. The route match patterns will be the same but the CID will be different. IE NXXXXXX/1102 for extension 102 to dial 7 digits, NXXNXXXXXX/1102 to dial 10 etc.
Then you would create a ring group with “first available” as the ring strategy for each extension, IE 101 would be the ring group number and 1101,2101,3101 and 4101 would all be members of that ring group.