yes on home pbx i love the s/CALLERID..<br><br>maybe you should <br><br>f($[${CALLERID(number)} = "15552221313"]?15:5)<br><br>try to isolate string to strings.<br><br>this is not good i think<br><br>you need qhotes on the callerid part too if you evaluate to the "1555xxx"
<br><br>f($["${CALLERID(number)}" = "15552221313"]?15:5)<br><br>maybe im wrong need another cofee<br><br><div><span class="gmail_quote">On 6/6/07, <b class="gmail_sendername">Steve Murphy</b> <<a href="mailto:murf@parsetree.com">
murf@parsetree.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Wed, 2007-05-30 at 20:05 -0400, Steve Finkelstein wrote:
<br>> Thanks for the help on this thread all.<br>><br>> It would make sense if I write an AGI and incorporate a DB backend to<br>> check against numbers I want explicitly dropped. If anyone has such a<br>> utility, I'd love to -not- reinvent the wheel. Otherwise, I'll go whip
<br>> it up and probably provide a web frontend for adding/removing numbers.<br>><br><br>You can still use the dialplan with the DB func to check incoming<br>CID info. Also, the Dial() app has several options for call screening
<br>and<br>privacy; these would be performed when dialing your extension.<br><br>You can have Dial keep a DB of callers, and remember whether to always<br>just patch them right thru, play them a polite "go away and don't come
<br>back",<br>or send them off to torture scripts, or just route them straight to VM.<br>And, Dial() will ask you what you want to do, on the first call. Read<br>thru the Dial doc you get with "core show application dial". There's
<br>an option to store an intro from each caller, where it records in a<br>sound file, who they say they are. I have several hundreds of these, and<br>play them as the<br>call comes in, so we know who's calling without having to run to a CID
<br>display.<br>For those who have poor to no vision, this can be a cool feature.<br><br>murf<br><br><br>> - sf<br>><br>> C F wrote:<br>> > It fails because the right function is ${CALLERID(num)}<br>> >
<br>> > On 5/30/07, Steve Finkelstein <<a href="mailto:sf@stevefink.net">sf@stevefink.net</a>> wrote:<br>> >> Hi all,<br>> >><br>> >> I'm looking for some rudimentary insight on GotoIf() which seems to be
<br>> >> failing on me in my dial plan. All I basically wish to do is block a<br>> >> particular caller. Sounds easy enough, but my ternary operator/plan<br>> >> currently is not properly being implemented. Can anyone spot where I'm
<br>> >> being a momo?<br>> >><br>> >> All extensions get forwarded to the following macro:<br>> >><br>> >> [macro-forward]<br>> >> ; arg1 = phone number<br>> >> ; arg2 = timeout
<br>> >> ; arg3 = extension (voicemail)<br>> >> ; arg4 = mobile number<br>> >> exten => s,1,Zapateller(answer|nocallerid)<br>> >> exten => s,2,PrivacyManager<br>> >> exten => s,3,Wait(1)
<br>> >> exten => s,4,GotoIf($[${CALLERID(number)} = "15552221313"]?15:5)<br>> >> exten => s,5,GotoIf($[${LEN(${CALLERID(number)})} = 4]?6:8)<br>> >> exten => s,6,AGI(didextlookup.agi|${CALLERID
(number)})<br>> >> exten => s,7,Set(CALLERID(number)=${didlookup})<br>> >> exten => s,8,GotoIf($[${LEN(${CALLERID(number)})} = 10]?9:10)<br>> >> exten => s,9,Set(CALLERID(number)=1${CALLERID(number)})
<br>> >> exten => s,10,Dial(${ARG1},${ARG2})<br>> >> exten => s,11,GotoIf($[${EXISTS(${ARG4})}]?11:12)<br>> >> exten => s,12,Dial(${ARG4},${ARG2})<br>> >> exten => s,13,Voicemail(u${ARG3})
<br>> >> exten => s,14,Playback(vm-goodbye)<br>> >> exten => s,15,HangUp<br>> >> exten => s,105,HangUp<br>> >><br>> >> As you can tell, exten => s,4,GotoIf($[${CALLERID(number)} =
<br>> >> "15552221313"]?15:5) is what I recently added.<br>> >><br>> >> Here's what I see in the CLI logs:<br>> >><br>> >> -- Executing [5609@fromlime:1] Macro("IAX2/lime-3",
<br>> >> "forward|SIP/5609|15|5609|IAX2/limemed@lime/15164766201") in new stack<br>> >> -- Executing [s@macro-forward:1] Zapateller("IAX2/lime-3",<br>> >> "answer|nocallerid") in new stack
<br>> >> -- Executing [s@macro-forward:2] PrivacyManager("IAX2/lime-3", "")<br>> >> in new stack<br>> >> -- CallerID Present: Skipping<br>> >> -- Executing [
s@macro-forward:3] Wait("IAX2/lime-3", "1") in new<br>> >> stack<br>> >> -- Executing [s@macro-forward:4] GotoIf("IAX2/lime-3", "0?15:5") in<br>> >> new stack
<br>> >> -- Goto (macro-forward,s,5)<br>> >><br>> >> It evaluates to false, hence goes to s,5. I keep dialing from that<br>> >> particular number (the one in the example is clearly masked as a false
<br>> >> CID), and verified it's showing up as that number on callerID.<br>> >><br>> >> Also one last question. Say I need to add more numbers to block in the<br>> >> future, is there an easier way to do this than renumbering my entire
<br>> >> macro? Renumbering everything is just begging for a typo which can<br>> >> effectively render my dial plan broken.<br>> >><br>> >> Thank you kindly, everyone!<br>> >><br>
> >> - sf<br>> >> _______________________________________________<br>> >> --Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br>> >><br>> >> asterisk-users mailing list
<br>> >> To UNSUBSCRIBE or update options visit:<br>> >> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>> >><br>
> > _______________________________________________<br>> > --Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br>> ><br>> > asterisk-users mailing list<br>> > To UNSUBSCRIBE or update options visit:
<br>> > <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>> ><br>> > !DSPAM:1020,465db390179485209328925!<br>> ><br>
> _______________________________________________<br>> --Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br>><br>> asterisk-users mailing list<br>> To UNSUBSCRIBE or update options visit:
<br>> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br><br>_______________________________________________<br>--Bandwidth and Colocation provided by
<a href="http://Easynews.com">Easynews.com</a> --<br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users
</a><br><br><br></blockquote></div><br><br clear="all"><br>-- <br>Mike<br>Sales Manager<br><a href="http://www.voicemeup.com">http://www.voicemeup.com</a><br>Making it happen<br>1.877.807.VOIP (8647)<br>1.514.312.7030