I was looking for a way to bypass my menu tree, for friends calling into my line. I didn’t want them to have to listen to my menu each and every time they call. Since I have my own CID Rolodex using the Asterisk Database, I figured I could quickly bypass the menu for any entries already in my “known friends” database. With a little help from the asterisk users mailing list, I got this all sorted out and working like a charm. So, To do this yourself you must do something like the following on your menu. I even got extra special and added in a cepstral (app_swift) command to greet “known” callers.. check out the code example below..
exten => s,1,Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})})
exten => s,2,GotoIf($["${CALLERID(name)}" = ""]?3:100)
exten => s,3,**[CONTINUE ON WITH YOUR MENU TREE HERE]**
exten => s,100,Answer
exten => s,101,Swift( Hello ${CALLERID(name)}. Please wait while we dial your party immediately )
exten => s,102,**[GOTO YOUR DIRECT DIAL CONTEXT HERE]**