[asterisk-users] FYI: Block Comments
Matt Hoskins
matt.hoskins at npgco.com
Mon Aug 25 13:30:41 CDT 2014
Holy damn - I didn't know you could use templates in extensions! Mind =
Blown.
Matt Hoskins | NPG Corp | Systems Architect
816.749.2815 (Internal: ext. 10015)
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Steve
Edwards
Sent: Monday, August 25, 2014 1:20 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] FYI: Block Comments
On Mon, 25 Aug 2014, Joshua Colp wrote:
> how many of you know about templates?
(You may get more replies with a more 'on-target' subject. I lost interest
in 'block comments' but was curious why the thread was still getting
replies.)
Love templates. Use them in extensions.conf, sip.conf, and iax.conf every
day.
Here's an example from extensions.conf:
[party-line](digit-timeout,h,i,max-timeout,pound-main,s)
same = n, agi(write-cdr)
same = n, background(${PROMPTS-PATH}/0116)
...
Where the templates look like:
[digit-timeout](!)
exten = t,1, goto(${CONTEXT},s,1)
[h](!)
exten = h,1, goto(finish-call,h,1)
[i](!)
exten = i,1, goto(${CONTEXT},s,1)
[max-timeout](!)
exten = T,1, goto(max-time,s,1)
[pound-main](!)
exten = #,1, goto(main-menu,s,1)
[s](!)
exten = s,1,
verbose(1,[${EXTEN}@${CONTEXT}!${ANI}])
Note that the 's' template has to be the last template specified in the
template list. Also, that '${EXTEN}@${CONTEXT}' makes for a quick
cut-n-paste into the 'dialplan show' CLI command.
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New
to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
Teach CanIt if this mail (ID 01MH6kybJ) is spam:
Spam:
http://spamaway.npgco.com/canit/b.php?i=01MH6kybJ&m=051366e69c89&t=2014082
5&c=s
Not spam:
http://spamaway.npgco.com/canit/b.php?i=01MH6kybJ&m=051366e69c89&t=2014082
5&c=n
Forget vote:
http://spamaway.npgco.com/canit/b.php?i=01MH6kybJ&m=051366e69c89&t=2014082
5&c=f
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
More information about the asterisk-users
mailing list