[Asterisk-Users] Dial with 44 and +44 prefix

Chris Bagnall asterisk at minotaur.cc
Mon Oct 31 08:53:24 MST 2005


> I have inserted the lines you suggested but Asterisk keeps 
> the 0 when dialling with all alternatives.  Also, I am unsure 
> what the phrase "${EXTEN::2}${EXTEN:3}" does?  Could you 
> explain this abit?

The syntax is {EXTEN:initial offset:length}

So EXTEN:3 chops off the first three digits and has no length, so it goes to
the end of the number.
EXTEN::2 has no offset, so starts from the beginning of the number, but only
has a length of 2 (so you get the first 2 digits)
By putting the 2 together you *should* get the first 2 digits, skip one,
then the rest of the number.

> exten => _0[1-9].,1,Dial(IAX2/12345 at XXXX/44${EXTEN:1})
> exten => _00.,1,Dial(IAX2/12345 at XXXX/${EXTEN:2})
> exten => _440.,1,Dial(IAX2/12345 at XXXX/44${EXTEN:3})
> exten => _09XX,1,Dial(IAX2/12345 at XXXX/${EXTEN})
> exten => _44.,1,Dial(IAX2/12345 at XXXX/${EXTEN})

You're using Voiptalk I see :-)

It may be the sort order of extensions that's catching you out here. If _44.
is matched before _440. then you'll still get the zero in there. Try this
for your last line:

exten => _44N.,1,Dial(IAX2/12345 at XXXX/${EXTEN})
(N should be the same as [1-9] I think)

Regards,

Chris
-- 
C.M. Bagnall, Director, Minotaur I.T. Limited
This email is made from 100% recycled electrons





More information about the asterisk-users mailing list