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:[email protected]
[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:[email protected]
[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 [email protected] Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users