<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div>Sorry,&nbsp;correction:</div><div><br></div><b>The variable "${control}" is not defined, but if I write directly user_name works.</b><br><br><div><hr id="stopSpelling">From: ximop_22@hotmail.com<br>To: freeswitch-users@lists.freeswitch.org<br>Date: Wed, 2 Sep 2015 16:28:44 +0200<br>Subject: [Freeswitch-users] mod_odbc_query in dialplan no results<br><br>

<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}

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