Don't forget that you might be able to write that: exten => s,3,... exten => s/8585979857,4,Goto(15) exten => s/8585970327,4,Goto(15) exten => s,4,Goto(5) exten => s,5,...
The closest-matching priority 4 will be chosen, even if it's simply "well go on to priority 5 then"
Moj C. Chad Wallace wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Steve Finkelstein wrote:Hi all, I have the following in my extensions.conf: exten => s,4,GotoIf($["${CALLERID(number)}" = "8585979857" | "8585970327"]?15:5) The numbers listed above are known spammer numbers. However, when I call from any other CALLERID, it still directs me to s,15 which is the Hangup() application. Here are logs from the asterisk CLI:You have two problems there: 1. You have CALLERID(number), which I'm pretty sure should be CALLERID(num). 2. You are trying to combine two values with the | operator to check them both against CALLERID(num). It can't be used that way. You have to have two sets of comparisons. Here's how the line should look: exten => s,4,GotoIf($["${CALLERID(num)}" = "8585979857" | "${CALLERID(num)}" = "8585970327"]?15:5) TTYL.-- Executing [EMAIL PROTECTED]:1] Macro("IAX2/lime-3", "forward|SIP/8995&SIP/31337|15|8995|IAX2/[EMAIL PROTECTED]/13476681546") in new stack -- Executing [EMAIL PROTECTED]:1] Zapateller("IAX2/lime-3", "answer|nocallerid") in new stack -- Executing [EMAIL PROTECTED]:2] PrivacyManager("IAX2/lime-3", "") in new stack -- CallerID Present: Skipping -- Executing [EMAIL PROTECTED]:3] Wait("IAX2/lime-3", "1") in new stack -- Executing [EMAIL PROTECTED]:4] GotoIf("IAX2/lime-3", "("8585970327")?15:5") in new stack -- Goto (macro-forward,s,15) -- Executing [EMAIL PROTECTED]:15] Hangup("IAX2/lime-3", "") in new stack == Spawn extension (macro-forward, s, 15) exited non-zero on 'IAX2/lime-3' in macro 'forward' == Spawn extension (macro-forward, s, 15) exited non-zero on 'IAX2/lime-3' -- Hungup 'IAX2/lime-3'- -- C. Chad Wallace, B.Sc. The Lodging Company http://www.skihills.com/ OpenPGP Public Key ID: 0x262208A0 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGbuUBKeSNHCYiCKARAlPVAKCBYdUm4nRQd4clYphLg4bOzjeRrgCgxIgs inueeqMYByPtpNDFgypNgLo= =Z7qz -----END PGP SIGNATURE----- _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
