[Asterisk-Users] Is there a way to not propagate a context
included inside other context?
Moises Silva
moises.silva at gmail.com
Wed May 10 10:25:11 MST 2006
Alvaro:
I dont think such a thing exists for a simple reason. I you think
things "right", you will be able to end with a good combination of
contexts.
In your case, having:
[internal]
include => invalid
exten => _XX,1,Dial(SIP/12345${EXTEN}) ; Short alias for internal lines
exten => _12345XX,1,Dial(SIP/${EXTEN}) ; Long alias for internal lines
does not seems fine to me for your purposes. "internal" is a concept
that does not include the "invalid" concept. So may be it would be
better
[internal]
exten => _XX,1,Dial(SIP/12345${EXTEN}) ; Short alias for internal lines
exten => _12345XX,1,Dial(SIP/${EXTEN}) ; Long alias for internal lines
and then
[full]
include => invalid
include => internal
include => local
[full.local]
include => invalid
include => local
[full.internal]
include => invalid
include => internal
besides, including invalid at the beginning, it will cause to match
always, you should include it at the end.
read docs about pattern matching in voip-info.org
Best Regards
On 5/10/06, Álvaro Palma <apalma at opschile.cl> wrote:
> I've defined my dialplan as showed below. My internal lines are numbered
> as 12345XX, and internal users can call another by the entire 7-digits
> extension, or by just last 2 digits.
>
> [invalid]
> exten => _X.,1,Playback(pbx-invalid)
> exten => _X.,2,Hangup()
>
> [internal]
> include => invalid
> exten => _XX,1,Dial(SIP/12345${EXTEN}) ; Short alias for internal lines
> exten => _12345XX,1,Dial(SIP/${EXTEN}) ; Long alias for internal lines
>
> [local]
> exten => _XXXXXXX,1,Dial(Zap/g1/${EXTEN}) ; Local area calls
>
> [full]
> include => internal
> include => local
>
> (As it's defined, local also include invalid context)
>
> My idea is that, if any user authorized to make only internal calls dial
> any number different than 12345XX, he/she'll receive the invalid
> message. Besides if any user authorized to make local calls dial any
> internal number, the call is routed internally (not via a NOT toll free
> call through the Zap channel).
>
> My question is: Is there a way to NOT propagate the "invalid" context
> when the "internal" context is included by other? The problem I see is
> that, if any user authorized to make local and internal calls (e.g., in
> the full context), dial a number different than 12345XX, it receives the
> PBX-INVALID message, instead of dialing the external number through the
> Zap channel. Or if I switch the include order in the "full" context,
> even internal calls are routed through the Zap channel!!!
>
> I know that maybe this dialplan is not the best in this case, but my
> final question is how to avoid the propagation of "preincluded" context
> beyond the scope of the context that explicitaly include it.
>
> Thanks a lot for your answer.
>
> --
> Atly.
> Álvaro Palma
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"
More information about the asterisk-users
mailing list