Store DTMF in external database

For an application I’m developing now, users have to call a number and dial a unique pincode (8 digits).

How can I achieve that Asterisk does the following:
[]Check if the pincode exists in an external MySQL database (simple SQL query)
If it exists:
]Immediately after confirming the pincode: store the call start timestamp in the external database
[*]On call end: store the call end timestamp in the external database

I have a little experience in writing dialplans but this goes way above my head. Thanks in advance for pointing me in the right direction!


You can start reading the book all can be done via dialplan with READ and maybe using the deprecated app_mysql or using an AGI very easy with php-agi class

This is pretty simple my friend, i have done similar projects, using the PHPAGI class. i have some examples in my blog of similar projects … es-de.html

This is pretty simple if you make use of the phpagi class. In my blog you can find some examples of similar projects. … es-de.html

you can write this by dialplan using func_odbc or AGI ( with the help of AGI libraries . phpagi , perlagi ,etc )