IVR, Matching Digits and returning a Voice Message

I want to play an IVR message for my customers, The IVR will ask for 10 digit code and a hash sign at the end. Once the hash sign is pressed it will match those 10 digits entered by the client in the database field, may be, placed on some other server. If the number is not found in the database the user must be promted with unsuccessful search message. In case of success, some action will be performed. The way it normally happens in telecom companies while recharging a card. Is this possible with asterisk. Is there any script present to do this job or we need to write a code for that. Any hint or help will be very much appreciated. Thanks.

It is a common thing to do in Asterisk but there is not prebuilt code that comes with Asterisk becuase everyone’s needs a a bit different.

You will want to learn about the Asterisk Dial Plan (extensions.conf) and the following topics in particular.

Playback()
Read()
GotoIf()

Also, Asterisk can connect up to an ODBC datasource for lookups.

You will need to work with res_odbc.conf and func_odbc.conf files creating ODBC lookup functions. Or you could write the SQL withing the dialplan.

To make things even more interesting, you could move the whole script into an AGI script in the language of choice. Then the logic may be cleaner for you to develop and maintain in the long term.

All of these topics have been discussed on this forum before and much information can be obtained via a good Google search.

Thanks for the reply. I ll definitely check this out and let you know in case of any issue.