In my system (Asterisk 1.4.30) I found that if I have some playback() or saydigit() before dial(), the billsec in CDR count all the time includes the playback time. For example, if I dial a number, listen the playback, then just hangup before the call get answered, the CDR show me the time spent doing the playback in the billsec. CDR has two fields - duration and billsec. My understand is the billsec start count when a call is answered. Am I right? or Am I missing something here. -- Jian Gao IT Technician SJ Geophysics Ltd. <http://www.sjgeophysics.com> jian.gao at sjgeophysics.com <mailto:jian.gao at sjgeophysics.com> Tel: (604)582-1100
On 05-05-2010 18:00, Jian Gao wrote:> In my system (Asterisk 1.4.30) I found that if I have some playback() or > saydigit() before dial(), the billsec in CDR count all the time includes > the playback time. For example, if I dial a number, listen the playback, > then just hangup before the call get answered, the CDR show me the time > spent doing the playback in the billsec. >apps like playback do an implicit answer and this fires up the billsec counter.
adamk at 3a.hu wrote:> On 05-05-2010 18:00, Jian Gao wrote: > >> In my system (Asterisk 1.4.30) I found that if I have some playback() or >> saydigit() before dial(), the billsec in CDR count all the time includes >> the playback time. For example, if I dial a number, listen the playback, >> then just hangup before the call get answered, the CDR show me the time >> spent doing the playback in the billsec. >> >> > > > apps like playback do an implicit answer and this fires up the billsec > counter. > >OK, here is my dialplan: exten => _011X.,1,Set(remainMinutes=${DB(timer/bbFreeLDMinute)}) exten => _011X.,n,Playback(this-call-will-end-in) exten => _011X.,n,SayNumber(${remainMinutes}) exten => _011X.,n,Playback(minutes) exten => _011X.,n,Set(ms=${MATH(${remainMinutes}*60000,int)}) ;convert minutes to ms exten => _011X.,n,Dial(SIP/${EXTEN}@${LDTrunk1},60,L(${ms}:30000)) ;set call limit to ${ms}, warning when 30000ms(30 sec) left Is there any way that Asterisk will record the correct billsec? Or, is there a different approach? Thanks for help. -- Jian Gao IT Technician SJ Geophysics Ltd. <http://www.sjgeophysics.com> jian.gao at sjgeophysics.com <mailto:jian.gao at sjgeophysics.com> Tel: (604)582-1100
Hi!> > apps like playback do an implicit answer and this fires up the billsec > > counter. > > > OK, here is my dialplan: > exten => _011X.,n,Playback(this-call-will-end-in) > exten => > _011X.,n,Dial(SIP/${EXTEN}@${LDTrunk1},60,L(${ms}:30000)) > > Is there any way that Asterisk will record the correct billsec? Or, is > there a different approach?Place a ResetCDR() after your Playback() statement and before Dial(). Philipp
Philipp von Klitzing wrote:> Hi! > > >>> apps like playback do an implicit answer and this fires up the billsec >>> counter. >>> >>> >> OK, here is my dialplan: >> exten => _011X.,n,Playback(this-call-will-end-in) >> exten => >> _011X.,n,Dial(SIP/${EXTEN}@${LDTrunk1},60,L(${ms}:30000)) >> >> Is there any way that Asterisk will record the correct billsec? Or, is >> there a different approach? >> > > Place a ResetCDR() after your Playback() statement and before Dial(). > > Philipp > > >ResetCDR() works! Thank you very much! -- Jian Gao IT Technician SJ Geophysics Ltd. <http://www.sjgeophysics.com> jian.gao at sjgeophysics.com <mailto:jian.gao at sjgeophysics.com> Tel: (604)582-1100