Doesn't it give an error/warning about duplicate extensions when you do
that?

I've been doing something similar but without the duplicate context
definitions like so:

extensions.conf:
[default]
exten => 1111,1,Dial(sip/abc123)
#include extensions-extra.conf

extensions-extra.conf:
exten => 2222,1,Dial(sip/def456)

---
And I'm curious how the matching would work if, in your example the
extensions had wildcard matching?

-- 
John Lange
http://www.johnlange.ca


On Thu, 2010-07-22 at 10:54 -0400, Simon P. Ditner wrote:
> This has probably been in Asterisk for quite awhile, but I hadn't seen
> it documented anywhere and I thought it was pretty handy:
> 
> Contexts are cumulative, and can override existing values:
> 
> extensions.conf:
> #include extensions-extra.conf
> [default]
> exten => 1111,1,Dial(sip/abc123)
> 
>    +
> 
> extensions-extra.conf:
> [default]
> exten => 1111,1,Goto(2222,1)
> exten => 2222,1,Dial(sip/def456)
> 
>    =
> 
> [default]
> exten => 1111,1,Goto(2222,1)
> exten => 2222,1,Dial(sip/def456)
> 
> verify:
> cli> dialplan show default
> cli> dialplan show 1...@default
> 
> When replacing steps (1111), it will overwrite existing ones, leaving
> any extras in place. So that if you only declared 1-3 in the -extra
> file, steps 4-6 would still exist.
> 
> The behavior is slightly different for the globals section, you need
> to add a (+) to the context
> 
> extensions.conf:
> [global]
> A=B
> #include extensions-extra.conf
> 
>    +
> 
> extensions-extra.conf:
> [global](+)
> B=C
> 
>    =
> 
> [global]
> A=B
> B=C
> 
> verify:
> cli> core show globals
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to