No CDR for Auto Dial failed calls

Hi all.

I’m auto dialing by creating output files in /var/lib/asterisk/outgoing. Failed calls are NOT writing cdrs in asterisk-1.4.22, but ARE writing cdrs in asterisk-1.4.17. CDRs for successful calls are written in both cases. Is it preferable to set extension to Local/8885551111 and having the context perform a Dial?

I am using the context/extension/priority format in the .call files, as described in:
voip-info.org/tiki-index.php … o-dial+out

===================
The format of the .call file is:

channel: SIP/8885551111@carrierout
callerid: 2125551212 <12125551212>
maxretries: 0
retrytime: 90
waittime: 9
account: 2125551212
context: calldrop
extension: 8885551111
priority: 1
Archive: No
set: PassedInfo=8885551111-2125551212-carrier_out

===================
The extensions.conf context is:

[calldrop]
exten => _X.,1,Answer
exten => _X.,n,Wait(2)
exten => _X.,n,Playback(goodbye)
exten => _X.,n,Wait(1)
exten => _X.,n,Hangup
exten => failed,1,NoOp(${PassedInfo} failed)
exten => failed,n,Set(CDR(userfield)="${PassedInfo} R${REASON}")
exten => failed,n,Hangup

===================
Asterisk-1.4.17 output from /var/log/asterisk/messages:

[2008-10-04 01:31:00] VERBOSE[5121] logger.c: – Executing [failed@calldrop:1] NoOp(“OutgoingSpoolFailed”, “6265550077-8885557777-carrierout failed”) in new stack
[2008-10-04 01:31:00] VERBOSE[5121] logger.c: – Executing [failed@calldrop:2] Set(“OutgoingSpoolFailed”, "CDR(userfield)=“6265550077-8885557777-carrierout R0"”) in new stack
[2008-10-04 01:31:00] VERBOSE[5121] logger.c: – Executing [failed@calldrop:3] Hangup(“OutgoingSpoolFailed”, “”) in new stack
[2008-10-04 01:31:00] VERBOSE[5121] logger.c: == Spawn extension (calldrop, failed, 3) exited non-zero on ‘OutgoingSpoolFailed’
[2008-10-04 01:31:00] NOTICE[5121] pbx_spool.c: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)

Asterisk-1.4.17 logs two CDR records:
“8885557777”,“18885557777”,“6265550077”,“calldrop”,""“8885557777"” <18885557777>
",“SIP/carrierout-09415428”,"",“Dial”,“SIP/16265550077@carrierout”,“2008-10-04
01:31:00”,“2008-10-04 01:31:00”,0,0,“NO ANSWER”,“DOCUMENTATION”,""

“8885557777”,"",“failed”,“calldrop”,"",“OutgoingSpoolFailed”,"","","",“2008-10-0
4 01:31:00”,“2008-10-04 01:31:00”,0,0,“NO ANSWER”,“DOCUMENTATION”,“6265550077-8
885557777-carrierout R0”

===================
Asterisk-1.4.22 has the same output from /var/log/asterisk/messages, but no CDRs:

[2008-10-04 01:30:51] VERBOSE[31211] logger.c: – Executing [failed@calldrop:1] NoOp(“OutgoingSpoolFailed”, “6195559584-8005556337-carrierout failed”) in new stack
[2008-10-04 01:30:51] VERBOSE[31211] logger.c: – Executing [failed@calldrop:2] Set(“OutgoingSpoolFailed”, "CDR(userfield)=“6195559584-8005556337-carrierout R0"”) in new stack
[2008-10-04 01:30:51] VERBOSE[31211] logger.c: – Executing [failed@calldrop:3] Hangup(“OutgoingSpoolFailed”, “”) in new stack
[2008-10-04 01:30:51] VERBOSE[31211] logger.c: == Spawn extension (calldrop, failed, 3) exited non-zero on ‘OutgoingSpoolFailed’
[2008-10-04 01:30:51] NOTICE[31211] pbx_spool.c: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)

I think there was a slight change to cdr processing between those versions you posted. Try setting unanswered = yes in the [general] section of cdr.conf

Thanks for the hint Dave. That setting did make a difference, but unfortunately the additional CDR contains no data. Although it appears to be going to the default context, the trace itself clearly shows the failed extension of the calldrop context is executing, and even setting CDR fields. My guess is the CDR data is cleared before writing the final CDR.

I can’t tell if this is a bug, or some other setting that I’m failing to set. I may just drop back to 1.4.17 to get the data I need.

“8885557800”,“18885557800”,“7325557596”,“calldrop”,""“8885557800"” <18885557800>
",“SIP/outbound-0982a710”,"",“Dial”,“SIP/17325557596@outbound”,“2008-10-14 13:34
:11”,“2008-10-14 13:34:11”,0,0,“NO ANSWER”,“DOCUMENTATION”,""

“”,"",“s”,“default”,"",“Unknown”,"","","",“2008-10-14 13:34:11”,“2008-10-14
13:34:11”,0,0,“FAILED”,“DOCUMENTATION”,""

“8885553333”,“18885553333”,“6095554131”,“calldrop”,""“8885553333"” <18885553333>
",“SIP/outbound-098265f0”,"",“Dial”,“SIP/16095554131@outbound”,“2008-10-14 13:34
:11”,“2008-10-14 13:34:11”,0,0,“NO ANSWER”,“DOCUMENTATION”,""

“”,"",“s”,“default”,"",“Unknown”,"","","",“2008-10-14 13:34:11”,“2008-10-14
13:34:11”,0,0,“FAILED”,“DOCUMENTATION”,""

[2008-10-14 13:34:02] VERBOSE[23416] logger.c: – Attempting call on SIP/16095554131@outbound for 6095554131@calldrop:1 (Retry 1)
[2008-10-14 13:34:02] VERBOSE[23419] logger.c: – Attempting call on SIP/17325557596@outbound for 7325557596@calldrop:1 (Retry 1)
[2008-10-14 13:34:11] VERBOSE[23419] logger.c: – Executing [failed@calldrop:1] NoOp(“OutgoingSpoolFailed”, “7325557596-8885557800-outbound failed”) in new stack
[2008-10-14 13:34:11] VERBOSE[23419] logger.c: – Executing [failed@calldrop:2] Set(“OutgoingSpoolFailed”, "CDR(userfield)=“7325557596-8885557800-outbound R-0"”) in new stack
[2008-10-14 13:34:11] VERBOSE[23419] logger.c: – Executing [failed@calldrop:3] Hangup(“OutgoingSpoolFailed”, “”) in new stack
[2008-10-14 13:34:11] VERBOSE[23419] logger.c: == Spawn extension (calldrop, failed, 3) exited non-zero on ‘OutgoingSpoolFailed’
[2008-10-14 13:34:11] NOTICE[23419] pbx_spool.c: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)

[2008-10-14 13:34:11] VERBOSE[23416] logger.c: – Executing [failed@calldrop:1] NoOp(“OutgoingSpoolFailed”, “6095554131-8885553333-outbound failed”) in new stack
[2008-10-14 13:34:11] VERBOSE[23416] logger.c: – Executing [failed@calldrop:2] Set(“OutgoingSpoolFailed”, "CDR(userfield)=“6095554131-8885553333-outbound R-0"”) in new stack
[2008-10-14 13:34:11] VERBOSE[23416] logger.c: – Executing [failed@calldrop:3] Hangup(“OutgoingSpoolFailed”, “”) in new stack
[2008-10-14 13:34:11] VERBOSE[23416] logger.c: == Spawn extension (calldrop, failed, 3) exited non-zero on ‘OutgoingSpoolFailed’
[2008-10-14 13:34:11] NOTICE[23416] pbx_spool.c: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)

Another thought, how about sending the outbound channel through a local channel? Not sure exactly how this will work with the call file & retries since I’ve mainly used the manager originate to send calls and handled them myself.

Instead of this:

channel: SIP/8885551111@carrierout

Try this:

channel: Local/8885551111@carrierout_context

and in extensions.conf

[carrierout_context]

exten => _NXXNXXXXXX,1,Dial(SIP/${EXTEN}@carrierout)

I confirm I am seeing the same exact issues.

Does anyone know if this is a known bug? Or at what release this started happening?

I know 2.4.10 is works

2.4.19 does not seem to.

–PD

Maybe the following bug:

http://bugs.digium.com/view.php?id=14167