<div dir="ltr">I&#39;m trying to use the API sofia_count_reg but all I&#39;m getting is an error or -1.<div>If I do &quot;sofia_count_reg 1000&quot; - whether there&#39;s multiple bindings or the user doesn&#39;t exist, I get -1.</div>

<div>When I try &quot;sofia_count_reg <a href="mailto:1000@domain.com">1000@domain.com</a>&quot; I get an sql error:</div><div><br></div><div><div>2011-09-08 08:22:29.381355 [ERR] switch_core_sqldb.c:825 ERR: [select count(*) from sip_registrations where (sip_user=&#39;&#39; or dir_user=&#39;1102&#39;) and (sip_host=&#39;1102&#39; or presence_hosts like &#39;%<a href="http://sip.getbestfone.com">sip.getbestfone.com</a>%&#39;)]</div>

<div>[STATE: 42S22 CODE 1054 ERROR: [unixODBC][MySQL][ODBC 3.51 Driver][mysqld-5.1.41-3ubuntu12.10-log]Unknown column &#39;dir_user&#39; in &#39;where clause&#39;</div></div><div><br></div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>

Thanks!</div><div><br clear="all"><div dir="ltr"><span style="font-family:Verdana, Arial, Helvetica, sans-serif"><span style="font-size:small">-Avi</span></span></div>
</div></div>