I am trying to obtain results of an SQL query, the query is:
<extension name="lookup_the_control" continue="true">
<condition>
<action application="odbc_query" inline="true" data="SELECT CONCAT(caronte,callerid_mal_formado) AS control FROM company WHERE account_number='${user_name}'"/>
</condition>
</extension>
The variable "$ {check}" is not defined, but if I write directly user_name works.
The output is:
Dialplan: sofia/external/965462224@78.136.81.1 Action odbc_query(SELECT CONCAT(caronte,callerid_mal_formado) AS control FROM company WHERE account_number='${user_name}') INLINE
EXECUTE sofia/external/965462224@78.136.81.1 odbc_query(SELECT CONCAT(caronte,callerid_mal_formado) AS control FROM company WHERE account_number='117201')
Dialplan: sofia/external/965462224@78.136.81.1 ANTI-Action set(control_origen=${control})
2015-09-02 16:21:08.046388 [DEBUG] mod_dptools.c:1498 SET sofia/external/965462224@78.136.81.1 [control_origen]=[UNDEF]
Any ideas?