[asterisk-users] Solved : Re: h exten no getting run ...
Steve Edwards
asterisk.org at sedwards.com
Mon Mar 30 13:03:04 CDT 2009
On Mon, 30 Mar 2009, Julian Lyndon-Smith wrote:
> Thanks for all the help and pointers - Steve, I'm getting to like
> templates ;)
Congratulations on finding your solution.
I "discovered" templates after a couple of years of coding dialplans and
fell in love.
In case they're of any use, here are my "standard" templates:
; templates
[h](!)
exten = h,1, goto(settle-card,s,1)
[i](!)
exten = i,1, goto(${CONTEXT},s,1)
[s](!)
exten = s,1, verbose(1,[${CONTEXT}:${EXTEN}:${PRIORITY}])
[x](!)
exten = _x.,1, verbose(1,[${CONTEXT}:${EXTEN}:${PRIORITY}])
[max-timeout](!)
exten = T,1, goto(max-time,s,1)
[digit-timeout](!)
exten = t,1, goto(${CONTEXT},s,1)
And a sample usage:
; 1on1
[1on1](digit-timeout,h,i,max-timeout,s)
Veering off-topic, another "feature" I recently discovered is
"appending to a context" which works really well in sip.conf or iax.conf.
For example, you can place the registration statement next to the context
for a provider like:
; calls from example1
[general](+)
register = user:pass at example1.com
[example1]
context = block-ani
deny = 0.0.0.0/0
host = example1.com
permit = a.b.c.d/32
secret = example1
type = user
username = example1
; calls from example2
[general](+)
register = user:pass at example2.com
[example2]
context = block-ani
deny = 0.0.0.0/0
host = example2.com
permit = a.b.c.d/32
secret = example2
type = user
username = example2
I prefer to organize iax|sip.conf this way.
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