My objectives: Client(SIP phone, i use 3CX phone) dial to asterisk server, asterisk then connect with external relational database(not located in the same place with asterisk server), and if database response something, asterisk server play a voice file(predefined .gsm file) to response client.
What i already have: I have installed AsteriskNow in VirtualBox as a asterisk server, the client is using softphone to connect with Asterisk server in SIP channel. When the Client dial to asterisk server, the server can execute the dialplan.
My question: If i want asterisk server establish connection to external database, for example, MySQL. and access the request data, Do i need to let dialplan invoke AGI script to do that? If so, using creating AGI script in PHP is much easier to achieve? If not, what should do to connect mysql? Using ODBC?
Is it possible to manipulate the data in asterisk server using dialplan, not using other programming language? But it seems dialplan does not have complete syntax support like other programming language?