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       [email protected]      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

Reply via email to