Prefix auto completion howto? [SOLVED]

Hi folks,

I read an article about auto completion of a specific prefix, but forgot to bookmark it:(

The goal is to punch in 6 digits (the last one) and for * to add the leading prefix:
i.e.: 456789 becomes 0123456789

Could you tell me how to do so?

You add in the TRUNK’s dial plan (not the Outbound Route’s dial plan) the following:

(This is what I use in United States. Change these settings to your country’s settings)


This will add a “1” if someone like me does not use a “1” before dialing the number
As well, if I dial the number without an area code, it will add my local area code, (1) 718

As for you, I’m going to guess how to add the 0 to your dial plan. Let’s see how good I do


044 is London i believe. Replace that with your “area code” and tell me what happens

I’m not that tought with * :frowning:

in extensions.conf [general], I’ve got:
with a corresponding “block” in sip.conf
(my SIP provider’s VOIP line)
(an HT-488 on the regular phone line, which is used as a second choice if TRUNK0 is busy)

I also have an EXTLOC.conf which rejects all calls but the numbers/countries/emergencies I allowed; lines such as:
exten => _02XXXXXXXX,1,Dial(${OUTBOUNDTRUNK0}/${EXTEN})
exten => _02XXXXXXXX,2,Dial(${OUTBOUNDTRUNK1}/${EXTEN})

My region (fr) and department (fr) prefix are 02 and 97, this is what I’d like to add as a prefix for a 6 numbers dialed.

So, where exactly should I put 0297+XXXXXX PLS?

I have no idea because I use freePBX

the trick was to add two lines in my EXTLOC.conf file:
exten => _XXXXXX,1,Dial(${OUTBOUNDTRUNK0}/0297${EXTEN})
exten => _XXXXXX,2,Dial(${OUTBOUNDTRUNK1}/0297${EXTEN})

(the “+” isn’t needed here and in fact makes a bad call)

Thanks for your help :wink: