[VoIP] Blocking Individual Calls

Russ Price kxt at fubegra.net
Sun Mar 4 15:27:58 CST 2007


Doug Alderdice wrote:
> Hi gang,
> 
> What's the Asterisk language for extensions.conf to block calls from a 
> particular CID?  I've had someone calling through John Covert's PSTN port 
> making a number of calls on my system here over the last 14 hours and 
> generally making a nuisance of himself/herself

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

	Russ
	CNET: 1-442-7877
	FWD: 699408


More information about the VoIP mailing list