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

James Steven jsteven at redlinesoftware.co.uk
Mon Oct 31 08:34:15 MST 2005


Hi 

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?

My extensions.conf is:

[default] 
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})

Thanks
James

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Chris Bagnall
Sent: 31 October 2005 12:13
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: RE: [Asterisk-Users] Dial with 44 and +44 prefix

> One further question, how can I set up a line so that if 440 is 
> dialled before a number the 0 is taken out so only 44 is actually 
> used?

exten => _440.,1,Dial(IAX2/12345 at XXXX/44${EXTEN:3})

You could probably do it by playing around with different offets as well:

exten => _440.,1,Dial(IAX2/12345 at XXXX/${EXTEN::2}${EXTEN:3})

This would be more flexible if you wanted to do the same for different
country codes, for example:

exten => _NX0.,1,Dial(IAX2/12345 at XXXX/${EXTEN::2}${EXTEN:3})

That would remove the zero from any 2-digit country code.

exten => _NXX0.,1,Dial(IAX2/12345 at XXXX/${EXTEN::3}${EXTEN:4})

That'd do the same thing for a 3-digit country code.

Regards,

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


_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


This message has been scanned for unacceptable content by 'VITANIUM'
the industry leading email virus and content management service from 
Vitanium Systems. Contact details are available at www.vitanium.com.







More information about the asterisk-users mailing list