I just confirmed both the Master.csv file which shows cdr-&gt;disposition as &quot;ANSWERED&quot;  is using the same channel for the same call in my code, but my code gets all the cdr-&gt;disposition results as &quot;NO ANSWER&quot;.<br>
<br><div class="gmail_quote">On Wed, Jul 15, 2009 at 9:03 AM, Joel Jn-Francois <span dir="ltr">&lt;<a href="mailto:voirtech@gmail.com">voirtech@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks for the feedback. I know for sure that the code is being executed at the same time.  I will take a look at the channels and see if its losing its value at some point.  However, the exact code worked on asterisk 1.4.20 on another 32 bit Linux box running Fedora core.<div>
<div></div><div class="h5"><br>
<br><div class="gmail_quote">On Wed, Jul 15, 2009 at 4:49 AM, Kai Hoerner <span dir="ltr">&lt;<a href="mailto:kai@ciphron.de" target="_blank">kai@ciphron.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hi Joel,<br>
<br>
if your data structure does not actually represent a call but the<br>
resulting CSV does, i see two possible reasons for this:<br>
<br>
1) you code handles another channel than is written to CSV.  where does<br>
&quot;chan&quot; come from?<br>
2) your code is executed during an active call - the CDR is populated<br>
later.  when does asterisk execute your code?<br>
<br>
<br>
Regards,<br>
<br>
Kaii<br>
<br>
Joel Jn-Francois schrieb:<br>
<div><div></div><div>&gt;  Hi everyone,<br>
&gt;<br>
&gt; I am running Opensuse 11.0 on an AMD dual core 64 bit machine.  On<br>
&gt; either asterisk 1.6.1 or 1.4.25.1 using asterisk-addons-1.6.1.0 I or<br>
&gt; asterisk-addons-1.4.8,  I get incorrect CDR values.  cdr-&gt;billsec,<br>
&gt; ast_cdr_disp2str(cdr-&gt;disposition) and cdr-&gt;duration seem to all have<br>
&gt; wrong values. cdr-&gt;billsec is always equal to zero and<br>
&gt; ast_cdr_disp2str(cdr-&gt;disposition)  is always equal to &#39;NO ANSWER&#39; and<br>
&gt; cdr-&gt;duration is equal to zero.  However the values in the cdr<br>
&gt; master.csv file has the correct values.<br>
&gt;<br>
&gt; Here are a list of CDR methods and members I am using in my software.<br>
&gt; Some of these methods seem to be working fine, but the values they<br>
&gt; generate are wrong.   Should I be using different functions to<br>
&gt; accomplish the same thing instead of having to depend on the cdr routines?<br>
&gt;<br>
&gt;<br>
&gt; ast_cdr_setaccount(chan, chan-&gt;exten);<br>
&gt; ast_cdr_setapp(chan-&gt;cdr, app, cd-&gt;destination);<br>
&gt; cdr-&gt;lastdata<br>
&gt; cdr-&gt;channel<br>
&gt; cdr-&gt;uniqueid<br>
&gt; ast_cdr_disp2str(cdr-&gt;disposition)<br>
&gt; cdr-&gt;billsec<br>
&gt; ast_cdr_end(cdr);<br>
&gt;<br>
&gt;<br>
&gt; Thanks so much for your help.<br>
&gt;<br>
&gt; Joel<br>
</div></div>&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; --Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
&gt;<br>
&gt; asterisk-dev mailing list<br>
&gt; To UNSUBSCRIBE or update options visit:<br>
&gt;    <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
<br>
<br>
_______________________________________________<br>
--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
</blockquote></div><br>
</div></div></blockquote></div><br>