Pbx_extension_helper: No application 'MYSQL' for extension

Hi All.

I am new to this freepbx. when i try to connect mysql from freepbx i am getting error message.
" pbx_extension_helper: No application ‘MYSQL’ for extension".

Please help me to resolve to this issue.

This is my dial plan code.

exten => 888,n,MYSQL(Connect connid freepbx fpbx asterisk)
exten => 888,n,MYSQL(Query resultid ${connid} SELECT ivrid FROM ivr_setting WHERE ivrid=${code}))
exten => 888,n,MYSQL(Fetch fetchid ${resultid})
exten => 888,n,SayAlpha(${ivrid})
exten => 888,n,MYSQL(Disconnect ${connid})

At the Asterisk CLI, confirm the mysql module is loaded and running:

lgaetzdev2*CLI> module show like mysql
Module                         Description                              Use Count  Status      Support Level
app_mysql.so                   Simple Mysql Interface                   0          Running        deprecated

If it is not present, you need to compile Asterisk with the appropriate options.

… and since it’s deprecated, it’s probably not included by default anymore.


Could you please help me , how to do that?

Hi finally i installed asterisk add-on app_mysql.so .
When i try to connect i am getting some error message

my mysql version is 14.11
MYSQL(“SIP/2009-0000000c”, “Connect connid root ****** asterisk”) in new stack
MYSQL(“SIP/2009-0000000c”, “Query resultid 1 SELECT\ dest\ FROM\ ivr_entries\ WHERE\ selection=\2”) in new stack
WARNING[4680][C-0000000c]: app_mysql.c:405 aMYSQL_query: aMYSQL_query: mysql_query failed. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘\ dest\ FROM\ ivr_entries\ WHERE\ selection=\2’ at line 1

MYSQL(“SIP/2009-0000000c”, “Fetch fetchid test”) in new stack
WARNING[4680][C-0000000c]: app_mysql.c:506 aMYSQL_fetch: aMYSQL_fetch: missing some arguments

Executing [[email protected]:11] MYSQL(“SIP/2009-0000000c”, “Disconnect 1”) in new stack

How to find out the correct syntax for my mysql version.

You don’t need the \ characters in front of spaces in the query, you are following an old guide.

Your query should look like this:

SELECT dest FROM ivr_entries WHERE selection = "2"


SELECT dest from ivr_entries WHERE selection = 2

The difference is whether the selection field is a CHAR or an INT. The first should work for either, the second should only work if the field is an INT.

I am trying to connect through odbc, i am getting following error

ERROR[1843][C-00000000]: func_odbc.c:542 acf_odbc_read: Unable to execute query [SELECT dest FROM ivr_entries WHERE selection =‘1’]

func_odbc.conf is like below

readsql=SELECT dest FROM ivr_entries WHERE selection =’${ARG1}’

Doesn’t the readsql command need to be in quotation marks in the odbc_func.conf file?