[Home]

Summary:ASTERISK-22430: AMI Originated calls are logged only if answered
Reporter:Lelio della Pietra (leliodp)Labels:
Date Opened:2013-08-30 04:04:10Date Closed:2013-08-31 10:58:29
Priority:MinorRegression?
Status:Closed/CompleteComponents:Applications/app_originate Core/Logging
Versions:1.8.23.1 Frequency of
Occurrence
Related
Issues:
Environment:Tested on Asterisk 1.8.23.1 with a Digium B410PAttachments:
Description:I place a call with the following AMI command:

{noformat}
Action: Originate
Channel: DAHDI/g1/08112345678
Context: DLPN_test2
Timeout: 8000
Exten: 08112345678
Priority: 1
Async: true
ActionID: 123
{noformat}

The referenced context is the following:

{noformat}
[DLPN_test2]
include => default
exten = s,1,NoOp(Remote-Answered)
exten = s,n,Wait(900)
exten = s,n,Hangup()
exten = failed,1,NoOp(Remote-Failed)
exten = failed,n,Hangup()
exten = h,1,NoOp(Remote-Hangup)
exten = h,n,Hangup()
{noformat}

If the call is answered I see it logged in /var/log/asterisk/cdr-csv/Master.csv:

{noformat}
"","","s","CCEasy_test2","","DAHDI/i1/08112345678-2","","Wait","900","2013-08-29 15:54:21","2013-08-29 15:54:27","2013-08-29 15:55:05",44,38,"ANSWERED","DOCUMENTATION","1377791661.2",""
{noformat}

But if the called is unanswered or gets busy nothing is logged.

Of course, placing the same call from a SIP account gets a log line in all cases (answered, no answer, busy).
Comments:By: Matt Jordan (mjordan) 2013-08-31 10:58:22.878-0500

This behavior is expected.

In Asterisk 1.8/11, Origination is not treated the same as Dialing. Unanswered CDRs will only be displayed if the {{unanswered}} setting is enabled in {{cdr.conf}}. Otherwise, they will not be recorded.

Note that you could also get the behavior you want by Originating a Local channel and performing a Dial operation directly in the dialplan.