External calls prefix

Hi all,

I am very new to Voip and Freepbx. The place I work uses Voip and Freepbx to make calls internal and external.
For all external calls we need to put 90 in front of the telephone number we want to dial, that is not really a problem.
But everytime we miss a call and want to dial it back straight from the Missed calls menu on the Cisco SPA504G phone, we cant make the call because the 90 prefix wont be in front of it automaticly. Is there a way to do this in Freepbx? I want to be able to just press Dial and that it automaticly puts 90 in front of it. (only for external calls).

I hope someone can help me out :slight_smile: But i am a complete noob when it comes to Voip and Freepbx so a step by step explanation would be really great! :wink:

Best regards

Synton

btw, we are on Asterisk (Ver. 11.2.1) if that helps

You probably can using a module called “Set CallerID”. I’m in the same situation where I have 2 numbers coming in, one private, the other business. If I want to call using the business number I have to prefix the number with a 0. On incoming calls I use the module to add a 0 so I can immediately call back missed calls using my business number.

Yes, I had a feeling this was the module i needed. But how exactly do i set it up correctly? I really dont know what I should do to get it to work…

It’s pretty simple actually. Click +Add:

In my situation I take the last 9 digits of the phone number (in the Netherlands all numbers have 10 digits) and prefix is with 00 (first digit is always 0 and I need the extra 0 to set the caller id to my business number). Then select the destination to apply it to, which could be a ring group or in my case a time condition.

OK, time for “Stupid Question Dave” to weigh in.

Why do you have your system configured so that you have to dial “90” to dial out? With an old Centrex or similar system, dialing “90” to get an “outside line” made sense, but with FreePBX, the system should be able to figure out that you are calling “out”.

If you have a reason, good on ya. If not, I’d suggest looking at allowing 10-digit (or whatever you are using) dialing for your outbound routes. That would solve the problem, as well as reducing the wear and tear on your ‘9’ and ‘0’ buttons.

I am going to see if i can make it work like the way you did it

Well good question. But i did not configure voip at this company. I am a new junior IT employee and there is a helpdesk ticket with this issue that id like to solve :wink:

The IT manager doesnt know how to get it done aswell so that is why i came to this forums. But to give you sort of an answer, maybe its because of ISDN that is still in use here? I dont know if thats why we need to prefix but I think it is.

How would i set it up the way you describe it? Thanks for your help

Hmm I tried it but it had no effect… Still didnt see the 90 in front of the number when i called with my mobile phone. For the destination i chose a ring group where the specific phone is in.

OK, that’s a good enough reason for me.

Conceptually, these systems would produce local dial tone and then connect you to either in “intercom” line (something local to the system) or connect you to “the world” (by dialing ‘9’, typically). When you dialed ‘9’, it would hook your phone to that “outside line” and you’d get a new dial tone, with which you would dial the world.

Since you’re here, we should be able to reasonably assume that you are now using FreePBX as your new PBX system. If this isn’t the case, however, you’ve definitely come to the wrong place.

If the IT manager will trust you with access to the FreePBX GUI, I’d suggest starting out looking at the trunk definitions. You say you’re using an ISDN line for your outbound - that implies that you (at least used to) have some kind of a real, no-kidding local Branch Exchange.

At this point, I’ll guess you have at least one ISDN connection (it will be a DAHDI connection) and maybe one or more VOIP lines (as backups). The trunk definitions have two functions:

  • Which outbound patterns will be sent out over the trunk.
  • What needs to happen to that outbound pattern to make it acceptable to the trunk.

For example - your ISDN line might require 7-digit local dialing, 10-digit long distance in-state, 11-digit (“1” plus the 10-digit number) for out of state and “0” + country code and number for international dialing. Whatever the provider requires will be what your trunk will eventually send out.

The next thing to look at is the outbound route definition. This works like the Trunk, in that it serves three functions:

  • What dialed patterns are accepted for this route.
  • What modifications happen to that dialed pattern to turn it into a desired outbound pattern.
  • The outbound route also ‘preselects’ which trunks can be used by the outbound pattern.

Now, the tricky part here is that you can modify the “dialed number” twice. The first time is when the dialed number matches one of your outbound route selectors. The second time is when the modified outbound pattern is accepted by a trunk and sent to the actual outbound line.

So, here’s a possible configuration for your system:

Your old system required your folks to dial ‘90’ for an outside “local” line. I have some experience with this - when I was in the Air Force, we had to dial ‘94’ to dial AUTOVON and ‘98’ for commercial long distance and ‘99’ for an local outside line. So, let’s assume your system works the same way.

Your “outbound route” will have a "Dial Patterns’ tab (assuming a reasonably recent system) with a section that has several sections: prepend, prefix, match pattern and (maybe) caller ID.

The match pattern is used to make sure that the number should be processed by this route - the Prefix is part of the “matching” that goes on. It has to be there for the number to be processed by this outbound route, but it is removed when it is passed to the trunk. The “prepend” then adds whatever is in that column to the number and sends it over to the trunks.

So, what we expect to see in the outbound route might be “nothing” in the prepend, ‘90’ in the prefix, a number pattern like ‘NXXNXXXXXX’ (which matches valid numbers in the US). Depending on your PRI, you might have a second line that says “90” in the prefix and “NXXXXXX” in the number pattern to match local calls.

So, when the number gets passed to the outbound trunk, it will be either ‘NXXNXXXXXX’ or ‘NXXXXXX’. In case you don’t have the reference here - ‘N’ matches ‘1’ - ‘9’ and ‘X’ matches ‘0’ - ‘9’.

Now, of course, your mileage WILL vary. There are countless combinations of Prepend, Prefix, Number Patterns, and other features for the trunks.

So, if your configuration has a ‘90’ in the “prefix” column, you can duplicate that line without the “prefix” and if someone dials a number that looks like the matching pattern, it will be processed over the outbound line. If you want to test it out, add another line in the outbound route area that doesn’t have ‘90’ in the prefix column, but matches the rest of the line and try to dial a number that matches the dial pattern.

Here’s the fun part - don’t tell anyone you did it. They’ll keep on dialing ‘90’ to get an outside line, and you can just dial like you’re a member of the 21st century.

2 Likes

Thanks for your input :slight_smile:

I have looked into the outbound route in Freepbx. I made a screenshot of the settings:

As you can see there is not a lot in there, only 9. for the match pattern.
I hope you can give me some advice how to go on from this point.

Best regards

OK.

The 9. simply means that any number that gets dialed with a 9 on the front gets processed by this outbound route. Lower down on the screen are the trunk associated with this outbound route.

The trunk definition is probably removing the ‘9’ from the dialed number and sending it on its merry way.

One important piece - where are you? Different countries have different dial pattern rules, and without having enough information to make definitive recommendations, we can’t help you.

If we assume you are in the United States (or some other country in the “+1” dialing region), you can add a second match pattern “NXXNXXXXXX” and “prepend” it with ‘9’.

This will send all calls that are 10-digit dialed to your trunk with the same ‘9’ that the regular dialed calls are getting.

1 Like

My location is The Netherlands, so that must be all 10 digit numbers. Also, what does the N mean in NXXNXXXXXX?

Thank you for your help :slight_smile:

1 Like