[asterisk-users] Including doesn't have any effect
Steve Edwards
asterisk.org at sedwards.com
Sat Jun 4 17:19:31 CDT 2016
On Sat, 4 Jun 2016, Frank Vanoni wrote:
> Another possible approach to blacklist two (or more) specific callers
> (098765432 and 012345678 as example)
>
> exten => _+x.,1,Gosub(blacklist,s,1)
> exten => _+x.,n,....
> exten => black,1,playback(tt-monkeys)
>
> In blacklist.conf
>
> exten => s/098765432,1,Goto(black,1)
> exten => s/012345678,1,Goto(black,1)
Using a 'goto' to exit from a gosub is a bad idea. A better idea would be
to set a channel variable and check it's value after the return, in the
calling context.
Also, can a 'goto' in a subroutine reference an extension in the calling
context? Seems weird, but 'dialplan' is a weird language :)
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281
More information about the asterisk-users
mailing list