[VoIP] Blocking Individual Calls

Doug Alderdice ka2wft at arrl.net
Sun Mar 4 15:58:00 CST 2007


At 03:27 PM 3/4/2007 -0600, Russ Price wrote:
>Something like this should work (where BBBB is a caller ID digit string)
>
>; Pay attention to the placement of dollar signs and brackets
>exten => 1234,1,GotoIf($[${CALLERID(num)} = BBBB]?3:2)
>exten => 1234,2,Macro(dialswitch, ${EXTEN})     ; ok, go to switch
>exten => 1234,3,Answer
>exten => 1234,4,Playback(tt-weasels)            ; bad guy
>exten => 1234,5,Wait(1)
>exten => 1234,6,Hangup


Thanks to all who have sent suggested routines.  I have adapted Russ's 
above -- I have an old 'Head' version of Asterisk so I needed CALLERIDNUM 
as the variable, not what's above, but it appears to work ... at least it's 
letting me in!  I tried to fool it by putting the offending CID into my 
Diax client, forgetting I have callerid statements in iax.conf for the 
client that overrides what the client has!

Thanks again to all.

Doug.




More information about the VoIP mailing list