Help needed in asterisk development

Hello Everybody,

I am new to Asterisk/AGI scripting. I need to make a program over asterisk that will get the caller ID of incoming call, match the caller ID in a mysql database and get extension against caller ID and redirect the call to that extension. Would you please let me know what should I learn and how should I start? What language will be best for this purpose?


You shouldn’t need AGI. See Chapter 12, and Appendix G, of Asterisk: The Future of Telephony. You may even be able to get away with ASTDB over SQL or even Asterisk “Realtime”. The program needn’t be more than 5 or 6 lines, if done directly in the dialplan.

Note that you can do this in the dialplan, without the use of a database, although it is more difficult to change the configuration and it is not suitable for very large numbers of caller IDs.

If this is real world, rather than student homework, you should consider putting the table into ASTDB and defining a special extension that lets you maintain it from a phone keypad.