* You are viewing Posts Tagged ‘exten’

Blocking Spammer By CallerID “name”

I have a subroutine to block spammer by CALLERID(number)

exten => 4,1,GotoIf(${BLACKLIST()}?blacklisted,s,1)
exten => 4,n,Set(goaway=${CALLERID(number):0:2})
exten => 4,n,GotoIf($["${goaway}" = "V4" ]?blacklisted,s,1)
exten => 4,n,GotoIf($["${goaway}" = "V3" ]?blacklisted,s,1)

but I just got another spammer (automated calls) who rotates his callerID number that starts with valid area code so blocking by prefix is not practical but it seems to me he uses the same (or few same) caller name like:

“Brit. Columbia “” <16047726633>”
“KHAN SHARON “” <16042984429>”
“Brit. Columbia “” <16042231781>“

So I was thinking the same subroutine can be used to block by CALLERID(name), isn’t it:

exten => 4,n,Set(goaway2=${CALLERID(name):0:11})
exten => 4,n,GotoIf($["${goaway2}" = "Brit. Colum" ]?blacklisted,s,1)
exten => 4,n,GotoIf($["${goaway2}" = "KHAN SHARON" ]?blacklisted,s,1)

The spammer is soliciting lowering credit card interest charges etc. anybody know who it is :-/

Asterisk 11 Dtmf Not Recognised

Hi

I have a dialplan as per the following,

extensions.conf
[avgtest]
exten = 100,n,Playback(avgtest/message1)
exten = 100,n,Set(rightPIN=1)
exten = 100,n,Read(inPIN,,1,,5,3) ; Attempts for 5 times with 3 seconds of timeout exten = 100,n,GotoIf($["${inPIN}" = "${rightPIN}"]?pin-accepted,1)
exten = 100,n,Hangup() ; Didn’t go to pin-accepted, so play badPIN and hangup exten=pinaccepted,1,Playback(avgtest/message2) ; correct pin, play

sipconf
[1001]
uername01
secret01
context=avgtest disallow=all allow=ulaw allow=alaw dtmfmode=auto type=friend host=dynamic canreinvite=yes relaxdtmf=yes

This looks very simple but dtmf is not recognised.

Am using asterisk 11.

Any suggestions is much appreciated.

Regards

Get Channel Variables In AMI Event NewExten

Hi, I’m stucked in situation, and look for a work around if possible in Asterisk. I have a dialplan,

[default]
exten => 111222,n,Set(fu_callerid=141688xyxzz)
exten => _X.,n,NoOp(Callerid ${fu_callerid})
exten => _X.,n,wait(2)
exten => _X.,n,Answer()

My “blacklist” Is Not Working

In my blacklist I have: database show

/blacklist/Manitoba : advertising


[incoming]

; First, lets take care of telemarketers

exten => 4,1,GotoIf(${BLACKLIST()}?blacklisted,s,1)
exten => 4,n,Set(goaway=${CALLERID(number):0:2})
exten => 4,n,GotoIf($["${goaway}" = "V4" ]?blacklisted,s,1)
exten => 4,n,GotoIf($["${goaway}" = "V3" ]?blacklisted,s,1)


I just received a call from the same telemarketer with caller ID: Manitoba How did he get through? Why blacklist is not working. The second part is working OK I tested it: (anything starting with V4 ro V3 is forwarded to: “blacklisted,s,1″

exten => 4,n,Set(goaway=${CALLERID(number):0:2})
exten => 4,n,GotoIf($["${goaway}" = "V4" ]?blacklisted,s,1)
exten => 4,n,GotoIf($["${goaway}" = "V3" ]?blacklisted,s,1)

But the first line suppose to compare the caller “ID” to the one in database and jump to “blacklisted,s,1″ context.

Asterisk 11, Hangup-handlers, Local Channels And Channel Originate [SOLVED]

2013/3/26 Richard Mudgett

Thanks to the above suggestion, the dialplan bellow made it. Thanks for helping.


[pre-dial-handler]
exten => s,1,Verbose(0,Entering context ${CONTEXT} in channel ${CHANNEL}
with EXTEN and CID set to ${EXTEN} and ${CALLERID(num)})
same => n, Set(CHANNEL(hangup_handler_push)=hangup-handler,s,1)

[hangup-handler]
exten => s,1,Verbose(0,Entering context ${CONTEXT} in channel ${CHANNEL}
with EXTEN and CID set to ${EXTEN} and ${CALLERID(num)})

[to-foobar]
exten => _X.,1,Verbose(0,Entering context ${CONTEXT} with EXTEN and CID set to ${EXTEN} and ${CALLERID(num)})
; same => n, Set(CHANNEL(hangup_handler_push)=hangup-handler,s,1)
same => n, Dial(SIP/foobar/${EXTEN},,b(pre-dial-handler^s^1))
same => n, Hangup()

[from-foobar]
exten => _X.,1,Verbose(0,Entering context ${CONTEXT} with EXTEN and CID set to ${EXTEN} and ${CALLERID(num)})
same => n, Dial(SIP/foobar/${EXTEN})
same => n, Hangup()