[Asterisk-Dev] MYSQL application

Constantine Filin cfilin at intermedia.net
Fri Jul 30 10:52:49 MST 2004

Greetings -

I coded a new Asterisk application called MYSQL which is similar to
application PGSQL but works with MYSQL. The syntax of the application 

*CLI> show application Mysql

  -= Info about application 'MYSQL' =-

Do several mySQLy things

MYSQL(): Do several mySQLy things
  MYSQL(Connect connid dhhost dbuser dbpass dbname)
    Connects to a database. Arguments contain standard MySQL parameters
    passed to function mysql_real_connect. Connection identifer returned
    in ${var}
  MYSQL(Query resultid ${connid} query-string)
    Executes standard MySQL query contained in query-string using
    established connection identified by ${connection_identifier}. 
    Result of query is stored in ${var}.
  MYSQL(Fetch fetchid ${resultid} var1 var2 ... varn)
    Fetches a single row from a result set contained in 
    ${result_identifier}. Assigns returned fields to ${var1} ... 
    ${varn}. ${fetchid} is set TRUE if additional rows exist in 
    result set.
  MYSQL(Clear ${resultid})
    Frees memory and datastructures associated with result set.
  MYSQL(Disconnect ${connid})
    Disconnects from named connection to MySQL.

The source code is uploaded 

If anybody is willing to test this out, I will help with installation.



More information about the asterisk-dev mailing list