Sorry, correction:

The variable "${control}" is not defined, but if I write directly user_name works.


From: ximop_22@hotmail.com
To: freeswitch-users@lists.freeswitch.org
Date: Wed, 2 Sep 2015 16:28:44 +0200
Subject: [Freeswitch-users] mod_odbc_query in dialplan no results

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?

_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org