I think he does have one mistake in the below section. exten => 520xxxxxx,2,GotoIf($["${CALLERID(num)}" = "0666XXxxxx" ]?3:4) should be exten => 520xxxxxx,2,GotoIf($["${CALLERID(num)}" = "0666XXxxxx" ]?4:3)
If the callerid is a match, then we go straight to hangup, otherwise we allow it. Using Asterisk, this is the most complete block you are going to get. If you want anything further, then you need to block it up at your telephone provider level. Your pbx must accept the call in to read the caller ID number, but by hanging up immediately, it is not tying up a line. It accepts, reads the caller id, and dumps in the span of milliseconds in the case of a SIP or PRI trunk. Analog line would take just a bit more time. Kevin Larsen - Systems Analyst - Pioneer Balloon - Ph: 316-688-8208 From: Salaheddine Elharit <salah.elharit...@gmail.com> To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com>, Date: 01/14/2013 10:51 AM Subject: Re: [asterisk-users] block one number in incoming calls Sent by: asterisk-users-boun...@lists.digium.com hi Zohair Raza thanks for your replay but this script will allow just this 0666XXxxxx to call my number 520xxxxxx what i want is block this number to call 520xxxxxx not allow it thank you exten => 520xxxxxx,1,NoOp(Caller-ID: ${CALLERID(all)}) exten => 520xxxxxx,2,GotoIf($["${CALLERID(num)}" = "0666XXxxxx" ]?3:4) exten => 520xxxxxx,3,Dial(SIP/224, 30) exten => 520xxxxxx,4,hangup 2013/1/14 Salaheddine Elharit <salah.elharit...@gmail.com> thanks danny i think i didn’t explain correctly may question i revive a lot of calls from this number _0666XXXXXX and i wants to block it to call my number 520xxxxxx . 2013/1/14 Danny Nicholas <da...@debsinc.com> Exten => _0666XXXXXX,1,answer() Exten => _0666XXXXXX,n,playback(tt-monkeys) Exten => _0666XXXXXX,n,hangup() -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users