<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Can you get these same values in xml-cdr? &nbsp;I don't think csv was ever intended to work with different cdrs for a and b leg, it was more intended as a more familiar interface for those coming over from asterisk.<div><br></div><div>Mike</div><div><br><div><div>On Sep 24, 2009, at 6:10 AM, Tihomir Culjaga wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">hello,<br><br>i'm on latest trunk and for some reason i cannot get timestamps dumped in my cdrs. I use mod_cdr_csv with default settings plus i enabled to get both a and b legs dumped.<br><br><br>cdr_csv.conf.xml:<br><br>
&lt;configuration name="cdr_csv.conf" description="CDR CSV Format"&gt;<br>&nbsp; &lt;settings&gt;<br>&nbsp;&nbsp;&nbsp; &lt;!-- 'cdr-csv' will always be appended to log-base --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;!--&lt;param name="log-base" value="/var/log"/&gt;--&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;param name="default-template" value="example"/&gt;<br>&nbsp;&nbsp;&nbsp; &lt;!-- This is like the info app but after the call is hung up --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;!--&lt;param name="debug" value="true"/&gt;--&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;param name="rotate-on-hup" value="true"/&gt;<br>&nbsp;&nbsp;&nbsp; &lt;!-- may be a b or ab --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;param name="legs" value="ab"/&gt;<br>&nbsp; &lt;/settings&gt;<br>&nbsp; &lt;templates&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;template name="sql"&gt;INSERT INTO cdr VALUES ("${caller_id_name}","${caller_id_number}","${destination_number}","${context}","${s<br>tart_stamp}","${answer_stamp}","${end_stamp}","${duration}","${billsec}","${hangup_cause}","${uuid}","${bleg_uuid}", "${accountcode}<br>
");&lt;/template&gt;<br>&nbsp;&nbsp;&nbsp; &lt;template name="example"&gt;"${caller_id_name}","${caller_id_number}","${destination_number}","${context}","${start_stamp}","${answ<br>
er_stamp}","${end_stamp}","${duration}","${billsec}","${hangup_cause}","${uuid}","${bleg_uuid}","${accountcode}","${read_codec}","${<br>
write_codec}"&lt;/template&gt;<br>&nbsp;&nbsp;&nbsp; &lt;template name="snom"&gt;"${caller_id_name}","${caller_id_number}","${destination_number}","${context}","${start_stamp}","${answer_<br>
stamp}","${end_stamp}","${duration}","${billsec}","${hangup_cause}","${uuid}","${bleg_uuid}", "${accountcode}","${read_codec}","${wr<br>
ite_codec}","${sip_user_agent}","${call_clientcode}","${sip_rtp_rxstat}","${sip_rtp_txstat}","${sofia_record_file}"&lt;/template&gt;<br>&nbsp;&nbsp;&nbsp; &lt;template name="linksys"&gt;"${caller_id_name}","${caller_id_number}","${destination_number}","${context}","${start_stamp}","${answ<br>
er_stamp}","${end_stamp}","${duration}","${billsec}","${hangup_cause}","${uuid}","${bleg_uuid}","${accountcode}","${read_codec}","${<br>
write_codec}","${sip_user_agent}","${sip_p_rtp_stat}"&lt;/template&gt;<br>&nbsp;&nbsp;&nbsp; &lt;template name="asterisk"&gt;"${accountcode}","${caller_id_number}","${destination_number}","${context}","${caller_id}","${channel_<br>
name}","${bridge_channel}","${last_app}","${last_arg}","${start_stamp}","${answer_stamp}","${end_stamp}","${duration}","${billsec}",<br>
"${hangup_cause}","${amaflags}","${uuid}","${userfield}"&lt;/template&gt;<br>&nbsp; &lt;/templates&gt;<br>&lt;/configuration&gt;<br><br><br><br><br><br>call flow is the following:<br><br>
<br>CALLER =&gt; FS =&gt;&nbsp; CALLED<br><br><br>FS answers the call from CALLER, plays an announcement and bridges towards CALLED.<br><br><br>I get different behavior when the call is released by Caller and by Called.<br><br>
<br>Released by Caller:&nbsp;&nbsp; the CDR is ok having all timestamps<br><br>OK CDR:<br><br style="font-family: arial,helvetica,sans-serif;"><font style="font-family: arial,helvetica,sans-serif;" size="2">Outbound LEG =&gt; "016659280","016659280","0914392122","public","2009-09-24 12:02:48","2009-09-24 12:02:54","2009-09-24 12:03:01","13","7","NORMAL_CLEARING","699cc2d0-a8f1-11de-962a-e328afdb9d8d","","","PCMA","PCMA"<br>
Inbound LEG&nbsp; =&gt; "016659280","016659280","05000403","public","2009-09-24 12:02:27","2009-09-24 12:02:41","2009-09-24 12:03:01","34","20","NORMAL_CLEARING","5d530192-a8f1-11de-962a-e328afdb9d8d","699cc2d0-a8f1-11de-962a-e328afdb9d8d","","PCMA","PCMA"<br>
</font><br><br>Released by Called:&nbsp; the CDR is NOT OK as timestamps are missing<br><br><br>NOT OK CDR:<br><br>Inbound LEG =&gt; "016659280","016659280","0914392122","public","2009-09-24 12:05:20","2009-09-24 12:05:30","2009-09-24 12:05:39","19","9","NORMAL_CLEARING","c479411a-a8f1-11de-962a-e328afdb9d8d","","","PCMA","PCMA"<br>
Outbound LEG =&gt;"016659280","016659280","015000403","public",<b style="color: rgb(255, 0, 0);">"","","",</b>"0","0","NORMAL_CLEARING","b82f2046-a8f1-11de-962a-e328afdb9d8d","c479411a-a8f1-11de-962a-e328afdb9d8d","","PCMA","PCMA"<br>
<br><br></blockquote></div><br></div></body></html>