<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’t question that this
works, I’ll state that for some reason it doesn’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’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 => 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 => 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 =>
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 => 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 => 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 => 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 => 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 => 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 => 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’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> </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 "no"<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 "no"<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 "no"<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’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("SIP/170-b3704ae0", "") 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("SIP/170-b3704ae0", "default") 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("SIP/170-b3704ae0", "pls-hold-while-try") 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'> -- <SIP/170-b3704ae0> 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("SIP/170-b3704ae0", "5") 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("SIP/170-b3704ae0", "vm-goodbye") 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'> -- <SIP/170-b3704ae0> 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("SIP/170-b3704ae0", "time 0") 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("SIP/170-b3704ae0", "dur 0") 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("SIP/170-b3704ae0", "id 1256822108.6") 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("SIP/170-b3704ae0", "") 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("SIP/170-b3704ae0", "CDR(userfield)= Hangupcause:16")
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("SIP/170-b3704ae0", "userfield.agi|1256822108.6|
Hangupcause:16") 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("SIP/170-b3704ae0", "id 1256822108.6 time 8") 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("SIP/170-b3704ae0", "caller hung up") 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("SIP/170-b3704ae0", "") 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> </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’m only using the csv CDR;
perhaps these values are better preserved/presented if you use the SQL CDR’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> </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> </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'> <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>
> Date: Fri, 30 Oct 2009 01:20:02 +1300<br>
> From: <st1:PersonName w:st="on">lists@venturevoip.com</st1:PersonName><br>
> To: asterisk-users@lists.digium.com<br>
> Subject: Re: [asterisk-users] R: R: R: CDR(billsec)<br>
> <br>
> On 30/10/09 1:10 AM, Alexandru Oniciuc wrote:<br>
> ><br>
> > 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>
> ><br>
> > WOW: "On 29/10/09 5:56 AM, Alexandru Oniciuc wrote:" 12h
difference!<br>
> <br>
> :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>
> fact it's 1:20 in the morning so I probably should go to sleep :)<br>
> <br>
> -- <br>
> Cheers,<br>
> <br>
> Matt Riddell<br>
> Director<br>
> _______________________________________________<br>
> <br>
> http://www.venturevoip.com/news.php (Daily Asterisk News)<br>
> http://www.venturevoip.com/st.php (SmoothTorque Predictive Dialer)<br>
> http://www.venturevoip.com/c3.php (ConduIT3 PABX Systems)<br>
> <br>
> _______________________________________________<br>
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --<br>
> <br>
> asterisk-users mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
> 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>