[Asterisk-Users] Ex-girlfriend-logic

jeffpowen at comcast.net jeffpowen at comcast.net
Thu Oct 28 06:27:14 MST 2004


Here is the logic that I wanted b/c my bro-n-law is in AU and uses my phone number in the US as his now for his family to contact him as an extension off my * server.

The need was defined to use something like the ex-g/f logic to route calls to his extension instead of me getting all the calls then forwarding them to him.  Since his address book is much larger than I had expected or wanted to write up in extensions.conf here is how I achieved it:

I created a *db named 'route'.  Basically in there I would input a CID# and an extension to route to.

database put route <phone_num> <extension>

In the extensions.conf I put in the following:

[incoming]
exten => s,1,NoOp("Incoming:" ${CALLERID})
exten => s,2,LookupCIDName
exten => s,3,LookupBlackList
exten => s,4,DBget(exten=route/${CALLERIDNUM})
exten => s,5,NoOp("Transfering to extension: " ${exten})
exten => s,6,Goto(default,${exten},1)
exten => s,104,Goto(2200)
exten => s,105,GotoIfTime(06:00-22:30|*|*|*?default,2200,1)
exten => s,106,Goto(2200)
exten => s,2200,Background(press1tospeaktome)
exten => s,2201,Wait(3)
exten => s,2202,Voicemail(u2200)
exten => s,2203,Hangup

Then the next problem was how to deal with my family and what to do with them.  Since my parents are in the US and my sister is in AU, I created a menu context and send them to an extension that sends them to a menu context so they can decide to press 1 for me and 2 for my sister & bro-n-law.

We have been very happy with this solution and the only draw back is that if there is no caller id number presented, I get those calls but have handled them various ways and plan to re-impliment shortly.

Also, I used the WIKI setup for the PHP and CID name lookup (LookupCIDName) to allow my bro-n-law to input all his phone numbers and point them to his extension so there wasn't any resources of me to input his address book into the *database of route and he could update on demand or his leisure.

Enjoy.

-Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041028/88a075cf/attachment.htm


More information about the asterisk-users mailing list