[Home]

Summary:ASTERISK-04831: Calling a macro before calling a dial command causes billsec and duration to be the same and also reflect incorrect elapsed time
Reporter:Carey (cmould)Labels:
Date Opened:2005-08-14 17:40:32Date Closed:2011-06-07 14:10:28
Priority:MinorRegression?No
Status:Closed/CompleteComponents:CDR/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:In my dial plan I call a macro to validate a pin before calling the dial command. I noticed that my duration and billsec columns in the cdr table of my mysql db were set to the same amount and also both contained elapsed times greater than that actually used.

I removed the call to the macro and the elapsed times reflected the correct numbers, duration was greater than billsec, and total elapsed time was correct.

To eliminate any problems with particlular macro code I created a 1 line macro that assigned a value to a variable. This caused the behaviour to retpeat. (ie duration = billsec and total duration > than elapsed time).

I am able to repeat this behaviour consistently.



****** ADDITIONAL INFORMATION ******

I am using asterisk-1.0.9 on Mandrake 10.1. My mysql version is 4.0.20. I was initiating a call from an analog phone connected to a mediatrix 1104. My sip type is peer.
Comments:By: Michael Jerris (mikej) 2005-08-14 18:38:45

downgrading to minor as removing the macro is a workaround (although inconveinient).  Can you test if this is also the case on cvs head please.

By: Mark Spencer (markster) 2005-08-14 18:51:42

Also please supply the macro

By: Carey (cmould) 2005-08-14 23:18:39

Further testing reveals that the macro is not the problem. If I use the read, Playback, Background commands before the dial command my billsec and duration are set to the same elapsed time. However the ${ANSWEREDTIME) and ${DIALEDTIME} variables are correct inboth the cdr.csv and the cdr table in mysql.

By: Mark Spencer (markster) 2005-08-14 23:21:15

Playback answers the line.  You need to use the ResetCDR application.

By: Tilghman Lesher (tilghman) 2005-08-15 13:37:18

Or use the options to Playback or Background to not answer the channel:
Playback(file,noanswer)
Background(file,n)