Easy
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)
1+NXXNXXXXXX
1718+NXXNXXX
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+NXXXXX
044 is London i believe. Replace that with your “area code” and tell me what happens
in extensions.conf [general], I’ve got:
OUTBOUNDTRUNK0=SIP/freephonie-out
with a corresponding “block” in sip.conf
(my SIP provider’s VOIP line)
OUTBOUNDTRUNK1=SIP/100
(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.
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)