[asterisk-users] Need application, CID number match list to call cell phone

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue Aug 26 19:53:14 CDT 2008


On Tuesday 26 August 2008 19:28:17 JR Richardson wrote:
> I received a request for a special application and need some guidance.
>  Cust has there own Asterisk PBX with SIP phones, pretty standard
> setup.
>
> They want an after hours application that checks inbound caller ID
> numbers and matches them to a list, say 5 to 10 numbers of special VIP
> customers, if there is a match on the list, then forward the call
> straight to a cell phone, instead of ringing local extension and then
> to voicemail.
>
> The customer also wants to be able to manage this VIP list and the
> call forward cell phone number themselves, so it needs to be
> configured, numbers added and deleted, through a web page on the PBX.
>
> So I'm thinking I need a dialplan app that has to interface with a
> MySQL database that holds the list of numbers, so I can build a
> webpage to add/delete the numbers.
>
> Any ideas would be much appreciated.

Sounds like a good use of func_odbc, something along the lines of:

func_odbc.conf:
[APPROVED]
dsn=asterisk-mysql
read=SELECT COUNT(*) FROM approved_table WHERE callerid='${ARG1}'

extensions.conf:
exten => foo,1,GotoIf(${ODBC_APPROVED(${CALLERID(num)})}?callout)
exten => foo,n,Voicemail(foo,u)

And then your web app is pretty easily just a frontend to your database table.

-- 
Tilghman



More information about the asterisk-users mailing list