<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;
        position:relative;
        top:0pt;
        mso-text-raise:0pt;
        letter-spacing:0pt;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-GB link=blue vlink=purple>

<div class=WordSection1>

<p class=MsoNormal>Hi,<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I have been experimenting with CEL in a trunk version of asterisk
for some time and have upgraded my test machine to 1.8.0 today. <o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Made a few calls and it looks like the eventtype field is
missing in the CEL insert query when using ODBC. I see the following errors on
the console:<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>[Oct 22 21:46:09] WARNING[952]: res_odbc.c:634 ast_odbc_prepare_and_execute:
SQL Execute returned an error -1: 23502: ERROR: null value in column
&quot;eventtype&quot; violates not-null constraint;<o:p></o:p></p>

<p class=MsoNormal>Error while executing the query (101)<o:p></o:p></p>

<p class=MsoNormal>[Oct 22 21:46:09] WARNING[952]: res_odbc.c:646
ast_odbc_prepare_and_execute: SQL Execute error -1! Attempting a reconnect...<o:p></o:p></p>

<p class=MsoNormal>[Oct 22 21:46:09] WARNING[952]: res_odbc.c:742
ast_odbc_sanity_check: Connection is down attempting to reconnect...<o:p></o:p></p>

<p class=MsoNormal>[Oct 22 21:46:09] NOTICE[952]: res_odbc.c:1472
odbc_obj_connect: Connecting PostgreSQL-asterisk<o:p></o:p></p>

<p class=MsoNormal>[Oct 22 21:46:09] NOTICE[952]: res_odbc.c:1502
odbc_obj_connect: res_odbc: Connected to PostgreSQL-asterisk
[asterisk-connector]<o:p></o:p></p>

<p class=MsoNormal>[Oct 22 21:46:09] WARNING[952]: cel_odbc.c:733 odbc_log:
Insert failed on 'PostgreSQL-asterisk:celnew'.&nbsp; CEL failed: INSERT INTO
celnew (uniqueid,linkedid,eventtime,userdeftype,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,accountcode,peeraccount,userfield,peer,amaflags)
VALUES ('co-1287780365.0','co-1287780365.0',{ ts '2010-10-22 21:46:06' },'','135','441XXXXXXXXX','441XXXXXXXXX','','136','136','internal','SIP/135-00000000','','','SIP/135','SIP/135','','',3)<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I have copied my old config files and am using the postgresql
database which worked fine with the old (trunk) version from ages ago.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>When I use the PGSQL native driver instead of ODBC with the
same postgresql table it works fine.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Is this a bug?<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>P.s. great work on 1.8.0 by the way, thanks to all the
developers, testers and everyone involved.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Thanks,<o:p></o:p></p>

<p class=MsoNormal>Nic Colledge<o:p></o:p></p>

<p class=MsoNormal><a href="mailto:nic@njcolledge.net">nic@njcolledge.net</a><o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>