[Asterisk-Users] Dialing part of the extension

5 views
Skip to first unread message

Cosmin Prund

unread,
Feb 11, 2006, 6:18:46 AM2/11/06
to asteris...@lists.digium.com
I know this one must be easy but I'm an newbye so please help.
In my extensions.conf I want to have a line like:

Exten => 9XXXXXX,1,Dial(Zap/4/${SOMETHING},40,r)

Ie: I want to dial all the XXX-es, but not the 9;
How do I do that? What do I write in place of ${SOMETHING}? Navigating the
wiki didn't provide any usefull advice...

Thanks.

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

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

Olivier.taylor

unread,
Feb 11, 2006, 6:28:19 AM2/11/06
to Asterisk Users Mailing List - Non-Commercial Discussion
Exten => 9XXXXXX,1,Dial(Zap/4/${EXTEN:1},40,r)

Olivier

-----Message d'origine-----
De : asterisk-us...@lists.digium.com
[mailto:asterisk-us...@lists.digium.com] De la part de Cosmin
Prund
Envoyé : samedi 11 février 2006 12:19
À : asteris...@lists.digium.com
Objet : [Asterisk-Users] Dialing part of the extension

Cosmin Prund

unread,
Feb 11, 2006, 6:55:39 AM2/11/06
to Asterisk Users Mailing List - Non-Commercial Discussion
Thanks, it works!

Ira

unread,
Feb 11, 2006, 3:25:34 PM2/11/06
to Asterisk Users Mailing List - Non-Commercial Discussion
At 03:18 AM 02/11/2006, you wrote:
>Exten => 9XXXXXX,1,Dial(Zap/4/${SOMETHING},40,r)
>
>Ie: I want to dial all the XXX-es, but not the 9;

Exten => 9XXXXXX,1,Dial(Zap/4/${EXTEN:1},40,r)

Ira


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.15.6/257 - Release Date: 02/10/2006

Michael Collins

unread,
Feb 11, 2006, 6:26:26 PM2/11/06
to Asterisk Users Mailing List - Non-Commercial Discussion
FYI,
If you want to learn more about why ${EXTEN:1} works, check out the
Asterisk TFOT book, chapters 4 and 5. Page 95 of chapter 5 deals
specifically with the ${EXTEN} variable and the syntax of adding ":1"
(or ":2", ":3", etc.) - good stuff to know.

Check it out: http://www.speakup.nl/en/opensource/asterisktfot/

-MC


-----Original Message-----
From: asterisk-us...@lists.digium.com
[mailto:asterisk-us...@lists.digium.com] On Behalf Of Ira
Sent: Saturday, February 11, 2006 12:26 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion

Tzafrir Cohen

unread,
Feb 11, 2006, 7:40:51 PM2/11/06
to Asterisk Users Mailing List - Non-Commercial Discussion
On Sat, Feb 11, 2006 at 03:26:26PM -0800, Michael Collins wrote:
> FYI,
> If you want to learn more about why ${EXTEN:1} works, check out the
> Asterisk TFOT book, chapters 4 and 5. Page 95 of chapter 5 deals
> specifically with the ${EXTEN} variable and the syntax of adding ":1"
> (or ":2", ":3", etc.) - good stuff to know.
>
> Check it out: http://www.speakup.nl/en/opensource/asterisktfot/

Or try http://www.voip-info.org/wiki/view/Asterisk+variables

--
Tzafrir Cohen | tza...@jbr.cohens.org.il | VIM is
http://tzafrir.org.il | | a Mutt's
tza...@cohens.org.il | | best
ICQ# 16849755 | | friend

Reply all
Reply to author
Forward
0 new messages