I’m having some issues with CDRs not being recorded for some outbound calls. I am originating calls through the call file interface. I am routing through a local channel that then uses the “Dial” application to send out the call. I was hoping that asterisk would treat this whole interaction as one call and give me a CDR for the entire interaction. Instead, I am only getting a CDR for the call until the end user picks up the Dial.
Specifically, here is the dial plan I am working with:
[dial] ; Used for local channel loop by the calling program exten => s,1,Verbose(1,Entering Dial Context) exten => s,n,Dial(${AstChannel},55) exten => s,n,Verbose(1,Call Complete)
[default]
; Default context for the calling program
;
exten => _1XXXXXXXXXX,1,Verbose(1,Incoming call from ${EXTEN})
exten => _1XXXXXXXXXX,n,Set(TIMEOUT(absolute)=235)
exten => _1XXXXXXXXXX,n,Set(answerTime=${EPOCH})
exten => _1XXXXXXXXXX,n,Answer
exten => _1XXXXXXXXXX,n,Set(msgPlayedTime=${EPOCH});${STRFTIME(${EPOCH},"%Y-%m-%d %H:%M:%S")})
exten => _1XXXXXXXXXX,n,Playback(${WaveFile})
exten => _1XXXXXXXXXX,n,Set(msgFinishedTime=${EPOCH});${STRFTIME(${EPOCH},"%Y-%m-%d %H:%M:%S")})
exten => _1XXXXXXXXXX,n(hangupnow),NoOp
exten => _1XXXXXXXXXX,n,Hangup
This works as expected. The local channel in context “dial” calls out to a phone and the call is handled by context “default”. The problem is when the CDR is being written. As soon as the call is picked up, I’m getting a CDR. Then when I finally hang up the call, no CDR is written out. Any ideas on how to get a CDR record for a dial inside a local channel, not just the cdr for the local channel?
This is for asterisk 11.18.0
Edit:
This was resolved by upgrading to asterisk 13.10.0, where the CDR functions as I expected.