Asterisk 13, CDR: Disposition says busy or not answered, and Billsec reports time greater than 0 seconds

Dear all,
a bit confused and not sure if Disposition is reliable enough for me to assume that a call has been answered.

I am originating a call via AMI, second leg of the call is not picking up, disposition reports the call as busy, billsec and duration of call are both > 0.

Billsec should start counting from the moment a call is answered right? and disposition should change to answered. Is disposition getting it wrong? or Billsec?

Thank you

Which Asterisk version?

I am using version 13, and a bit confused at the moment, not sure if billsec is counted wrongly or if something else is at play here

I checked this with an Asterisk vs. 13.14 server. There is likely something else and I cannot reproduce your problem. One would probably more details.

Thank you for trying, it might be because i am originating the call, not exactly sure but noticed it with previous versions as well when dialing using voip providers to reach outside numbers to different countries. Not sure why this would be the case

Asterisk ultimately only knows what it is told. As you’ve discovered some upstream providers can lie, and providers they rely on can also lie.

Thank you for the feedback, so best way is to the count on billsecs? Is
asterisk counting those from the moment it bridges a call?

You’d need to provide the actual console output and SIP signaling (if SIP is in use) to be able to understand that.

So not a plain logic behind it then. Safest in my case is to just calculate
anything with more than 5 seconds as a successful call then

CDRs are based off of events on channels and logic, without knowing what has happened it’s hard to answer.

I understand, i will see if i can dig up some more information

Returning to this with some more weird behavior and and some background info. So on Asterisk 13 the following takes place
Bob is trying to call Alice, the call will be originated.

  1. A call is originated. According to documentation once Bob picks up his phone and the first channel is established. A CDR record is created for this and is not finalized
  2. A new channel is established with Bob being party A and Alice being party B (Dialed through the dial plan). As per documentation a second CDR record is created.

Here is where things get interesting. If Alice answers the call and the call completes, only one CDR record is written, with a source and destination channel listed.
If Alice doesn’t pick up then 2 cdr records appear, the last being for the first channel, with 0 duration and reported as answered, with the last application listed as hangup().

This leaves me confused as to when to expected 1 channel to appear and when 2, with the second being the originate channel’s CDR record.

Any ideas?

Is it that since in the case nobody picks up, that the channels never get bridged and as such the 2 cdr records never “merge” ? That 2 are created and if the phone is picked up on the other end and a bridge is established, they get merged into one? but if they not and they are not bridged, that the second CDR finalizes with a not ANSWERED disposition, gets dispatched and then the first CDR record gets finalized and dispatched after?

If the second channel and a bridge is created does that result in the 2 CDR records “merging” into 1?