[asterisk-users] bypass menu for certain numbers?

Tzafrir Cohen tzafrir.cohen at xorcom.com
Thu Jan 4 05:44:54 MST 2007


On Thu, Jan 04, 2007 at 05:14:30AM -0500, Matt Gibson wrote:
> Hi All,
> 
> I'm about to modify my menu to allow for certain callers to bypass my
> menu entirely, and just ring my phone. I don't need friends hearing my
> business menu all the time.
> 
> So, my idea was to use my already enabled callerid asterisk database
> and lookup the callerid info from it, if it exists consider it a
> friend and send them to a direct dial context. If the callerid is new,
> not found, or unknown then send them to the regular menu. This would
> be done with astdb, gotoif and lookupcidname commands I suppose.
> Haven't looked into this end of it much yet.
> 
> My question - is this the best/quickest way of going about this? I am
> wondering if with many numbers in this database if it will add delay
> to the call while it looks up to see where it needs to go.
> 
> I've also seen things like the following, which is another option
> 
> exten => s,1,GotoIf($["${CALLERIDNUM}" = "KNOWN (ie.
> 5552221212)"]?direct-dial,s,1)
> exten => s,2,GotoIf($["${CALLERIDNUM}" = "KNOWN (ie.
> 5552221313)"]?direct-dial,s,1)
> exten => s,3,Go on with the menu as regular
> 
> Any help would be appreciated.

Funny that they chose to use that, as Asterisk has a nicer and more
efficient syntax for dial-plan decisions based on caller ID:

exten => s/5552221212,1,Goto(direct-dial,s,1)
exten => s/5552221313,1,Goto(direct-dial,s,1)
exten =>s,1NoOp(Only other continue here...)

This is also sometimes known as "ex-girlfriend logic" (as it was
originally used to block someone's ex-girlfriend from calling).

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir


More information about the asterisk-users mailing list