Thanks Michael and James, I try to put this code in my extension.com under incoming to block a range to blocking call centers but all calls are blocked through Blacklist-Zap
I have all incoming calls in international format and would like to check first 11 digits and use loonies sample code. ;exten => nedi_ch,1,GotoIf($[${DB_EXISTS(blacklist/${CALLERID(num)})} = 0]?200) ; blacklist exten => nedi_ch,1,GotoIf(${DB_EXISTS(blacklist/${CALLERID(num):0:11})} = 0]?200) ; blacklist exten => nedi_ch,n,GotoIf($["${DB_RESULT}" = "0"]?110) exten => nedi_ch,n,GotoIf($["${DB_RESULT}" = "2"]?120) exten => nedi_ch,n,Goto(Blacklist-Zap,s,1) ; ì1″ TN in blacklist database, answer and Zapateller exten => nedi_ch,110,Goto(Blacklist-Hangup,s,1) ; ì0″ TN in blacklist, Hangup exten => nedi_ch,120,Goto(Blacklist-VM,s,1) ; ì2″ TN in blacklist, direct to voicemail ;exten => nedi_ch,200,Dial(local/10@10) exten => nedi_ch,200,Goto(interno,10,1) I tried first this code as static entry exten => nedi_ch,n,GotoIf(${DB_EXISTS(blacklist/${CALLERID(num):0:11})}?200) ; blacklist and second time I tried edit this to exten => nedi_ch,1,GotoIf(${DB_EXISTS(blacklist/${CALLERID(num):0:11})} = 0]?200) ; blacklist both of them doesn't work there is something wrong ${CALLERID(num):0:11})} = 0]?200) ; blacklist has anyone a idea how to edit loonnies script and check only first 11 digits of CID Best Regards Nedi ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk _______________________________________________ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org.