[Home]

Summary:ASTERISK-21127: Empty custom CDR value
Reporter:Ishtiyaq Husain (ishtiyaq)Labels:
Date Opened:2013-02-17 08:09:47.000-0600Date Closed:2013-02-18 19:16:03.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:CDR/General
Versions:1.8.19.0 Frequency of
Occurrence
Related
Issues:
duplicatesASTERISK-21124 cdr_adaptative_odbc does not populate cdr information
Environment:Ubuntu 10.04 LTS ServerAttachments:
Description:Empty custom CDR value for NO ANSWER calls.

extensions.conf:
{noformat}
[from-pstn]
exten => _ 325127104,1,Goto(325127105,s,1)

[325127105]
exten => s,1,Set(CALLERID(num)=${CALLERID(num):0:40})
exten => s,n,Set(CDR(voicemsg)=${MSG})
exten => s,n,Set(CDR(rmobileno)=${CUST})
exten => s,n,Answer()
exten => s,n,Playback(${MSG})
exten => s,n,Hangup
{noformat}

/var/spool/asterisk/outgoing/obd_test.call:

{noformat}
Channel: Dahdi/i1/09910231231
CallerId: 9910231231
MaxRetries: 2
RetryTime: 900
WaitTime: 60
Account: AO_OW
Context: from-pstn
Extension: 325127105
Priority: 1
Archive: Yes
Set: MSG=20130217-161246-488
Set: CUST=1234567890
Set: ACCOUNT=AO_OW
{noformat}

ANSWERED CALL CDR (ok):
{noformat}
AO_OW,1234567890,9910231231,20130217-161246-488,2013-02-17 17:23:17,2013-02-17 17:23:29,2013-02-17 17:23:33,16,4,ANSWERED,1361101997.36
{noformat}

In this CDR some values are missing.

NO ANSWERED CALL CDR (problem):
{noformat}
AO_OW,,9910231231,,2013-02-17 17:38:16,,2013-02-17 17:38:16,0,0,NO ANSWER,1361102896.37
{noformat}
Comments:By: Matt Jordan (mjordan) 2013-02-18 19:15:54.115-0600

I would actually expect this.

If the DAHDI channel never answers, then the dialplan at 325127105,s,1 is never executed. With call files, the context,extension,priority specified in the callfile isn't executed unless the channel specified first answers. As such, there is nothing that executes the CDR statements, and so they are never appended to the CDR record.

There are work arounds to this - rather than dial the DAHDI channel directly, dial a Local channel first. You can then set up the CDR information directly on the Local channel or on the DAHDI channel when you Dial() it (using pre-dial handlers).