Better way to save data into the database

I need to collect calls data in my dialplan and have some doubts about what is the better way to capture and develop it.

Is it better I develop the dialplan with MYSQL application for example, or is it better use application as System() or AGI()?

I would like to know what is faster and have better performance basically.

Pretty much the same because at the end using AGI or System, you re running a third part script or command in the Asterisk framework, difference I have found AGI provide a debug tool and system () allows you execute Linux command directly from Asterisk

Func_odbc can help a lot when you have many points at dialplan to collect data and in this way you will have a few functions for all your stuffs.
When you use AGI you must avoid to have a single point of failure splitting your necessities across more than one script.

and MYSQL? is it not recommended?

No is not, is an app based on a deprecated module, it was substituted by ODBC configuration

I would also recommend func_odbc… this will create a custom dialplan function that will allow you to set or retrieve values in the database.

1 Like

See Asterisk to mySQL via AGI/fastAGI or function ODBC](Asterisk to mySQL via AGI/fastAGI or function ODBC)

Similar question, similar answer.

Well, the end solution was create new variables in the dialplan and columns in cdr table and save the informations on these table/columns.

I choosed that because looks is easier way and better performance.

Thanks to all answers.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.