[asterisk-users] FYI: Block Comments
Steve Edwards
asterisk.org at sedwards.com
Mon Aug 25 13:20:13 CDT 2014
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
More information about the asterisk-users
mailing list