[asterisk-users] Including doesn't have any effect

Steve Edwards asterisk.org at sedwards.com
Sat Jun 4 14:58:30 CDT 2016


On Sat, 4 Jun 2016, Markus wrote:

> n00b question, but I can't figure it out:
>
> [callthrough]
> exten => _+X.,1,NoOp(nothing here)
> #include "blockedall.conf"
> exten => _+X.,n(hangup),Hangup
> exten => _+X.,n(nohangup),GotoIf($["${CALLERID(num)}" = 
> "anonymous"]?nocli:cli)
> ... more stuff that is handling the call ...
>
> I'm putting CLIs that I don't want to be able to call my system into 
> blockedall.conf:
>
> exten => _+X.,n,GotoIf($["${CALLERID(num)}" = "+493456789"]?hangup:nohangup)
> exten => _+X.,n,GotoIf($["${CALLERID(num)}" = "+492345678"]?hangup:nohangup)
> exten => _+X.,n,GotoIf($["${CALLERID(num)}" = "+491234567"]?hangup:nohangup)
>
> But it never moves to "hangup" when I call from any of those CLIs :-(

0) You should use 'verbose()' instead of 'noop()'

1) If the caller ID matches '+493456789' (the first one), you goto the 
'hangup' label. If it does not match, you goto the 'nohangup' label -- 
skipping the subsequent tests.

2) Please show the CLI output from 'dialplan show callthrough'

3) Please show the CLI output from a call matching the first test and from 
a call matching the second test.

-- 
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