<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:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>While I don&#8217;t question that this
works, I&#8217;ll state that for some reason it doesn&#8217;t work on my
1.4.26.2 on Centos 5.3<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Here&#8217;s my test snippet<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>exten =&gt; 333,1,answer<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>exten =&gt; 333,n,SetMusicOnHold(default)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>exten =&gt;
333,n,Background(pls-hold-while-try)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>exten =&gt; 333,n,WaitMusicOnHold(5)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>exten =&gt; 333,n,Background(vm-goodbye)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>exten =&gt; 333,n,Verbose(time
${CDR(billsec)})<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>exten =&gt; 333,n,Verbose(dur
${CDR(duration)})<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>exten =&gt; 333,n,Verbose(id
${CDR(uniqueid)})<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>exten =&gt; 333,n,Hangup<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>here&#8217;s cdr.conf<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>[general]<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>endbeforehexten = yes<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>[csv]<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>usegmtime = no    ; log date/time in GMT. 
Default is &quot;no&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>loguniqueid = yes  ; log uniqueid. 
Default is &quot;no&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>loguserfield = yes ; log user field. 
Default is &quot;no&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>here&#8217;s CLI output<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>-- Executing [333@DLPN_DialPlan1:1]
Answer(&quot;SIP/170-b3704ae0&quot;, &quot;&quot;) in new stack<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Executing [333@DLPN_DialPlan1:2]
SetMusicOnHold(&quot;SIP/170-b3704ae0&quot;, &quot;default&quot;) in new stack<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Executing [333@DLPN_DialPlan1:3]
BackGround(&quot;SIP/170-b3704ae0&quot;, &quot;pls-hold-while-try&quot;) in new
stack<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- &lt;SIP/170-b3704ae0&gt; Playing
'pls-hold-while-try' (language 'en')<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Executing [333@DLPN_DialPlan1:4]
WaitMusicOnHold(&quot;SIP/170-b3704ae0&quot;, &quot;5&quot;) in new stack<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Started music on hold, class
'default', on SIP/170-b3704ae0<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Stopped music on hold on
SIP/170-b3704ae0<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Executing [333@DLPN_DialPlan1:5]
BackGround(&quot;SIP/170-b3704ae0&quot;, &quot;vm-goodbye&quot;) in new stack<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- &lt;SIP/170-b3704ae0&gt; Playing
'vm-goodbye' (language 'en')<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Executing [333@DLPN_DialPlan1:6]
Verbose(&quot;SIP/170-b3704ae0&quot;, &quot;time 0&quot;) in new stack<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>time 0<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Executing [333@DLPN_DialPlan1:7]
Verbose(&quot;SIP/170-b3704ae0&quot;, &quot;dur 0&quot;) in new stack<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>dur 0<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Executing [333@DLPN_DialPlan1:8]
Verbose(&quot;SIP/170-b3704ae0&quot;, &quot;id 1256822108.6&quot;) in new stack<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>id 1256822108.6<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Executing [333@DLPN_DialPlan1:9]
Hangup(&quot;SIP/170-b3704ae0&quot;, &quot;&quot;) in new stack<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>  == Spawn extension (DLPN_DialPlan1, 333,
9) exited non-zero on 'SIP/170-b3704ae0'<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Executing [h@DLPN_DialPlan1:1]
Set(&quot;SIP/170-b3704ae0&quot;, &quot;CDR(userfield)= Hangupcause:16&quot;)
in new stack<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Executing [h@DLPN_DialPlan1:2]
DeadAGI(&quot;SIP/170-b3704ae0&quot;, &quot;userfield.agi|1256822108.6|
Hangupcause:16&quot;) in new stack<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Launched AGI Script
/var/lib/asterisk/agi-bin/userfield.agi<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- AGI Script userfield.agi completed,
returning 0<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Executing [h@DLPN_DialPlan1:3]
NoOp(&quot;SIP/170-b3704ae0&quot;, &quot;id 1256822108.6 time 8&quot;) in new
stack<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Executing [h@DLPN_DialPlan1:4]
NoOp(&quot;SIP/170-b3704ae0&quot;, &quot;caller hung up&quot;) in new stack<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>    -- Executing [h@DLPN_DialPlan1:5]
Hangup(&quot;SIP/170-b3704ae0&quot;, &quot;&quot;) in new stack<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>  == Spawn extension (DLPN_DialPlan1, h,
5) exited non-zero on 'SIP/170-b3704ae0'<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>FWIW, I&#8217;m only using the csv CDR;
perhaps these values are better preserved/presented if you use the SQL CDR&#8217;s?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Anahi Ludueña<br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, October 29, 2009
7:30 AM<br>
<b><span style='font-weight:bold'>To:</span></b>
asterisk-users@lists.digium.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [asterisk-users] R:
R: R: CDR(billsec)</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 face=Verdana><span
style='font-size:10.0pt;font-family:Verdana'>Thanks Matt!<br>
It works now! <br>
Bye...<o:p></o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><strong><b><font
size=2 face=Verdana><span style='font-size:10.0pt;font-family:Verdana;
font-weight:normal'>

<hr size=2 width="100%" align=center>

</span></font></b></strong></div>

<p class=MsoNormal align=center style='text-align:center'><strong><b><font
size=2 face=Verdana><span style='font-size:10.0pt;font-family:Verdana'>Anahi
Ludueña</span></font></b></strong><o:p></o:p></p>

<p class=MsoNormal align=center style='text-align:center'><font size=2
face=Verdana><span style='font-size:10.0pt;font-family:Verdana'>&nbsp;<o:p></o:p></span></font></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 face=Verdana><span
style='font-size:10.0pt;font-family:Verdana'><br>
<br>
<br>
<br>
&gt; Date: Fri, 30 Oct 2009 01:20:02 +1300<br>
&gt; From: <st1:PersonName w:st="on">lists@venturevoip.com</st1:PersonName><br>
&gt; To: asterisk-users@lists.digium.com<br>
&gt; Subject: Re: [asterisk-users] R: R: R: CDR(billsec)<br>
&gt; <br>
&gt; On 30/10/09 1:10 AM, Alexandru Oniciuc wrote:<br>
&gt; &gt;<br>
&gt; &gt; Thank you! My bad,the CDR function was working on 1.4, I can confirm
that endbeforehexten=yes does the trick, I've just tried it :]<br>
&gt; &gt;<br>
&gt; &gt; WOW: &quot;On 29/10/09 5:56 AM, Alexandru Oniciuc wrote:&quot; 12h
difference!<br>
&gt; <br>
&gt; :D Yeah based in <st1:country-region w:st="on"><st1:place w:st="on">New
  Zealand</st1:place></st1:country-region> - we're just about ahead of
everybody - in <br>
&gt; fact it's 1:20 in the morning so I probably should go to sleep :)<br>
&gt; <br>
&gt; -- <br>
&gt; Cheers,<br>
&gt; <br>
&gt; Matt Riddell<br>
&gt; Director<br>
&gt; _______________________________________________<br>
&gt; <br>
&gt; http://www.venturevoip.com/news.php (Daily Asterisk News)<br>
&gt; http://www.venturevoip.com/st.php (SmoothTorque Predictive Dialer)<br>
&gt; http://www.venturevoip.com/c3.php (ConduIT3 PABX Systems)<br>
&gt; <br>
&gt; _______________________________________________<br>
&gt; -- Bandwidth and Colocation Provided by http://www.api-digital.com --<br>
&gt; <br>
&gt; asterisk-users mailing list<br>
&gt; To UNSUBSCRIBE or update options visit:<br>
&gt; http://lists.digium.com/mailman/listinfo/asterisk-users<o:p></o:p></span></font></p>

<div class=MsoNormal align=center style='text-align:center'><font size=2
face=Verdana><span style='font-size:10.0pt;font-family:Verdana'>

<hr size=2 width="100%" align=center>

</span></font></div>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>¿Para qué descargarte juegos, si tienes los más divertidos
online? <a href="http://juegosonline.es.msn.com/" target="_new">Entra ya en
Juegos y prepárate para muchas horas de diversión</a><o:p></o:p></span></font></p>

</div>

</body>

</html>