[asterisk-bugs] [JIRA] (ASTERISK-22874) CDR Lines Missing

Daniel Journo (JIRA) noreply at issues.asterisk.org
Wed Nov 20 17:06:03 CST 2013


     [ https://issues.asterisk.org/jira/browse/ASTERISK-22874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Journo updated ASTERISK-22874:
-------------------------------------

    Description: 
I've noticed that CDR lines are intermittently missing. I WAS logging to ODBC and I thought it was an issue with that. But when I enabled CDR-CSV, I found that lines are missing on that too.

The first line is always logged, but then the call goes to a Local channel, which is intermittently logged.

Here is the dialplan. Sorry for the complexity. It is build automatically by our backend.

I am testing by hanging up after the call enters the queue, when the caller can hear music. Although, I think the issue occurs randomly but repeatable. I would say 1 in 10 calls.

exten => 0800123456,1,Set(__EXTERNALCALL=YES)
exten => 0800123456,2,Set(__CALLFROM=${CALLERID(number)})
exten => 0800123456,3,Set(TIMEOUT(absolute)=18000)
exten => 0800123456,4,Set(CDR(userfield)=${UNIQUEID})
exten => 0800123456,5,Set(__UNIQUECALLID=${UNIQUEID})
exten => 0800123456,6,Set(GROUP(ActiveCallsToNumber)=0800123456)
exten => 0800123456,7,Set(GROUP(ConcCallsForcompany)=1)
exten => 0800123456,8,NoOp(ActiveCallsToNumber = ${GROUP_COUNT(0800123456 at ActiveCallsToNumber)})
exten => 0800123456,9,NoOp(Total Active Calls to company = ${GROUP_COUNT(1 at ConcCallsForcompany)})
exten => 0800123456,10,ExecIf($["${CALLERID(number)}"=="08450040040"]?Set(CALLERID(number)=01618208353))
exten => 0800123456,11,ExecIf($["${CALLERID(name)}"=="08450040040"]?Set(CALLERID(name)=01618208353))
exten => 0800123456,12,Set(__TRANSFER_CONTEXT=company_phones)
exten => 0800123456,13,Set(CDR(accountcode)=company)
exten => 0800123456,14,AGI(/var/lib/asterisk/scripts/pre_incomingcall_check.php)
exten => 0800123456,15,AGI(/var/lib/asterisk/scripts/SetRecordingName.pl,${CALLERID(number)})
exten => 0800123456,16,SET(DB(RECORDINGNAME/${CHANNEL(name)})=${RecordingFilename})
exten => 0800123456,17,Set(__VOICEMAILBOX=4)
exten => 0800123456,18,GotoIf($["${CALLERID(number):0:2}"!="44"]?20)
exten => 0800123456,19,Set(CALLERID(number)=0${CALLERID(number):2})
exten => 0800123456,20,GotoIf($["${CALLERID(number)}"=""]?23)
exten => 0800123456,21,Set(CALLERID(number)=9${CALLERID(number)})
exten => 0800123456,22,Goto(25)
exten => 0800123456,23,Set(CALLERID(number)=Withheld)
exten => 0800123456,24,Set(CALLERID(name)=Withheld)
exten => 0800123456,25,Set(CDR(accountcode)=company)
exten => 0800123456,26,Dial(LOCAL/company_648 at features/n)

exten => company_648,1,Set(CDR(userfield)=${UNIQUECALLID})
exten => company_648,2,GotoIf($[${REGEX("^()$" ${CALLFROM})}]?additional,hangup,1)
exten => company_648,3,Goto(features,company_47,1)

exten => company_47,1,Set(CDR(userfield)=${UNIQUECALLID})
exten => company_47,2,GotoIfTime(0:00-23:59,mon,*,*,?features,company_409,1)
exten => company_47,3,GotoIfTime(0:00-23:59,tue,*,*,?features,company_409,1)
exten => company_47,4,GotoIfTime(0:00-23:59,wed,*,*,?features,company_409,1)
exten => company_47,5,GotoIfTime(0:00-23:59,thu,*,*,?features,company_409,1)
exten => company_47,6,GotoIfTime(0:00-23:59,fri,*,*,?features,company_409,1)
exten => company_47,7,GotoIfTime(0:00-23:59,sat,*,*,?features,company_409,1)
exten => company_47,8,GotoIfTime(0:00-23:59,sun,*,*,?features,company_409,1)

exten => company_409,1,Set(CDR(userfield)=${UNIQUECALLID})
exten => company_409,2,Set(FailedAttempts=0)
exten => company_409,3,ExecIf($["${CHANNEL(state)}"="Ring"]?Ringing())
exten => company_409,4,ExecIf($["${CHANNEL(state)}"="Ring"]?Wait(1.5))
exten => company_409,5,Answer()
exten => company_409,6,Wait(0.5)
exten => company_409,7,Playback(/var/lib/asterisk/clientsounds/features/1/409/1)
exten => company_409,8,Goto(menu_1_409,s,1)

[menu_1_409]

exten => s,1,Set(TIMEOUT(digit)=2)
exten => s,2,Background(/var/lib/asterisk/clientsounds/features/1/409/2)
exten => s,3,WaitExten(5)
exten => 1,1,Goto(queue,company_101,1)
exten => 2,1,Goto(company_phones,202,1)
exten => t,1,Goto(features,company_409,1)
exten => 201,1,Goto(company_phones,201,1)
exten => 202,1,Goto(company_phones,202,1)

The caller presses option 1.

exten => company_101,1,Set(__CALLTO=company_201)
exten => company_101,2,Macro(mixmon,nobeep)
exten => company_101,3,Answer()
exten => company_101,4,Wait(1)
exten => company_101,5,Playback(/var/lib/asterisk/clientsounds/features/1/queues/1)
exten => company_101,6,Set(CDR(userfield)=${UNIQUECALLID})
exten => company_101,7,Queue(company_101,tC,,,9999)
exten => company_101,8,GotoIf($["${QUEUESTATUS}"="TIMEOUT"]?108:208)
exten => company_101,108,Set(CALLERID(number)=9${CALLERID(number)})
exten => company_101,109,Set(CDR(accountcode)=company)
exten => company_101,110,Goto(voicemail,company_2,1)
exten => company_101,208,Set(CALLERID(number)=9${CALLERID(number)})
exten => company_101,209,Set(CDR(accountcode)=company)
exten => company_101,210,Goto(voicemail,company_1,1)




  was:
I've noticed that CDR lines are intermittently missing. I'm logging to ODBC and I thought it was an issue with that. But, when I enabled CDR-CSV, I found that lines are missing on that too.

The first line is always logged, but then the call goes to a Local channel, which is intermittently logged.

Here is the dialplan. Sorry for the complexity. It is build automatically by our backend.

I am testing by hanging up after the call enters the queue, when the caller can hear music. Although, I think the issue occurs randomly but repeatable. I would say 1 in 10 calls.

exten => 0800123456,1,Set(__EXTERNALCALL=YES)
exten => 0800123456,2,Set(__CALLFROM=${CALLERID(number)})
exten => 0800123456,3,Set(TIMEOUT(absolute)=18000)
exten => 0800123456,4,Set(CDR(userfield)=${UNIQUEID})
exten => 0800123456,5,Set(__UNIQUECALLID=${UNIQUEID})
exten => 0800123456,6,Set(GROUP(ActiveCallsToNumber)=0800123456)
exten => 0800123456,7,Set(GROUP(ConcCallsForcompany)=1)
exten => 0800123456,8,NoOp(ActiveCallsToNumber = ${GROUP_COUNT(0800123456 at ActiveCallsToNumber)})
exten => 0800123456,9,NoOp(Total Active Calls to company = ${GROUP_COUNT(1 at ConcCallsForcompany)})
exten => 0800123456,10,ExecIf($["${CALLERID(number)}"=="08450040040"]?Set(CALLERID(number)=01618208353))
exten => 0800123456,11,ExecIf($["${CALLERID(name)}"=="08450040040"]?Set(CALLERID(name)=01618208353))
exten => 0800123456,12,Set(__TRANSFER_CONTEXT=company_phones)
exten => 0800123456,13,Set(CDR(accountcode)=company)
exten => 0800123456,14,AGI(/var/lib/asterisk/scripts/pre_incomingcall_check.php)
exten => 0800123456,15,AGI(/var/lib/asterisk/scripts/SetRecordingName.pl,${CALLERID(number)})
exten => 0800123456,16,SET(DB(RECORDINGNAME/${CHANNEL(name)})=${RecordingFilename})
exten => 0800123456,17,Set(__VOICEMAILBOX=4)
exten => 0800123456,18,GotoIf($["${CALLERID(number):0:2}"!="44"]?20)
exten => 0800123456,19,Set(CALLERID(number)=0${CALLERID(number):2})
exten => 0800123456,20,GotoIf($["${CALLERID(number)}"=""]?23)
exten => 0800123456,21,Set(CALLERID(number)=9${CALLERID(number)})
exten => 0800123456,22,Goto(25)
exten => 0800123456,23,Set(CALLERID(number)=Withheld)
exten => 0800123456,24,Set(CALLERID(name)=Withheld)
exten => 0800123456,25,Set(CDR(accountcode)=company)
exten => 0800123456,26,Dial(LOCAL/company_648 at features/n)

exten => company_648,1,Set(CDR(userfield)=${UNIQUECALLID})
exten => company_648,2,GotoIf($[${REGEX("^()$" ${CALLFROM})}]?additional,hangup,1)
exten => company_648,3,Goto(features,company_47,1)

exten => company_47,1,Set(CDR(userfield)=${UNIQUECALLID})
exten => company_47,2,GotoIfTime(0:00-23:59,mon,*,*,?features,company_409,1)
exten => company_47,3,GotoIfTime(0:00-23:59,tue,*,*,?features,company_409,1)
exten => company_47,4,GotoIfTime(0:00-23:59,wed,*,*,?features,company_409,1)
exten => company_47,5,GotoIfTime(0:00-23:59,thu,*,*,?features,company_409,1)
exten => company_47,6,GotoIfTime(0:00-23:59,fri,*,*,?features,company_409,1)
exten => company_47,7,GotoIfTime(0:00-23:59,sat,*,*,?features,company_409,1)
exten => company_47,8,GotoIfTime(0:00-23:59,sun,*,*,?features,company_409,1)

exten => company_409,1,Set(CDR(userfield)=${UNIQUECALLID})
exten => company_409,2,Set(FailedAttempts=0)
exten => company_409,3,ExecIf($["${CHANNEL(state)}"="Ring"]?Ringing())
exten => company_409,4,ExecIf($["${CHANNEL(state)}"="Ring"]?Wait(1.5))
exten => company_409,5,Answer()
exten => company_409,6,Wait(0.5)
exten => company_409,7,Playback(/var/lib/asterisk/clientsounds/features/1/409/1)
exten => company_409,8,Goto(menu_1_409,s,1)

[menu_1_409]

exten => s,1,Set(TIMEOUT(digit)=2)
exten => s,2,Background(/var/lib/asterisk/clientsounds/features/1/409/2)
exten => s,3,WaitExten(5)
exten => 1,1,Goto(queue,company_101,1)
exten => 2,1,Goto(company_phones,202,1)
exten => t,1,Goto(features,company_409,1)
exten => 201,1,Goto(company_phones,201,1)
exten => 202,1,Goto(company_phones,202,1)

The caller presses option 1.

exten => company_101,1,Set(__CALLTO=company_201)
exten => company_101,2,Macro(mixmon,nobeep)
exten => company_101,3,Answer()
exten => company_101,4,Wait(1)
exten => company_101,5,Playback(/var/lib/asterisk/clientsounds/features/1/queues/1)
exten => company_101,6,Set(CDR(userfield)=${UNIQUECALLID})
exten => company_101,7,Queue(company_101,tC,,,9999)
exten => company_101,8,GotoIf($["${QUEUESTATUS}"="TIMEOUT"]?108:208)
exten => company_101,108,Set(CALLERID(number)=9${CALLERID(number)})
exten => company_101,109,Set(CDR(accountcode)=company)
exten => company_101,110,Goto(voicemail,company_2,1)
exten => company_101,208,Set(CALLERID(number)=9${CALLERID(number)})
exten => company_101,209,Set(CDR(accountcode)=company)
exten => company_101,210,Goto(voicemail,company_1,1)




    
> CDR Lines Missing
> -----------------
>
>                 Key: ASTERISK-22874
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22874
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: CDR/cdr_csv
>    Affects Versions: 11.6.0
>         Environment: Centos
>            Reporter: Daniel Journo
>
> I've noticed that CDR lines are intermittently missing. I WAS logging to ODBC and I thought it was an issue with that. But when I enabled CDR-CSV, I found that lines are missing on that too.
> The first line is always logged, but then the call goes to a Local channel, which is intermittently logged.
> Here is the dialplan. Sorry for the complexity. It is build automatically by our backend.
> I am testing by hanging up after the call enters the queue, when the caller can hear music. Although, I think the issue occurs randomly but repeatable. I would say 1 in 10 calls.
> exten => 0800123456,1,Set(__EXTERNALCALL=YES)
> exten => 0800123456,2,Set(__CALLFROM=${CALLERID(number)})
> exten => 0800123456,3,Set(TIMEOUT(absolute)=18000)
> exten => 0800123456,4,Set(CDR(userfield)=${UNIQUEID})
> exten => 0800123456,5,Set(__UNIQUECALLID=${UNIQUEID})
> exten => 0800123456,6,Set(GROUP(ActiveCallsToNumber)=0800123456)
> exten => 0800123456,7,Set(GROUP(ConcCallsForcompany)=1)
> exten => 0800123456,8,NoOp(ActiveCallsToNumber = ${GROUP_COUNT(0800123456 at ActiveCallsToNumber)})
> exten => 0800123456,9,NoOp(Total Active Calls to company = ${GROUP_COUNT(1 at ConcCallsForcompany)})
> exten => 0800123456,10,ExecIf($["${CALLERID(number)}"=="08450040040"]?Set(CALLERID(number)=01618208353))
> exten => 0800123456,11,ExecIf($["${CALLERID(name)}"=="08450040040"]?Set(CALLERID(name)=01618208353))
> exten => 0800123456,12,Set(__TRANSFER_CONTEXT=company_phones)
> exten => 0800123456,13,Set(CDR(accountcode)=company)
> exten => 0800123456,14,AGI(/var/lib/asterisk/scripts/pre_incomingcall_check.php)
> exten => 0800123456,15,AGI(/var/lib/asterisk/scripts/SetRecordingName.pl,${CALLERID(number)})
> exten => 0800123456,16,SET(DB(RECORDINGNAME/${CHANNEL(name)})=${RecordingFilename})
> exten => 0800123456,17,Set(__VOICEMAILBOX=4)
> exten => 0800123456,18,GotoIf($["${CALLERID(number):0:2}"!="44"]?20)
> exten => 0800123456,19,Set(CALLERID(number)=0${CALLERID(number):2})
> exten => 0800123456,20,GotoIf($["${CALLERID(number)}"=""]?23)
> exten => 0800123456,21,Set(CALLERID(number)=9${CALLERID(number)})
> exten => 0800123456,22,Goto(25)
> exten => 0800123456,23,Set(CALLERID(number)=Withheld)
> exten => 0800123456,24,Set(CALLERID(name)=Withheld)
> exten => 0800123456,25,Set(CDR(accountcode)=company)
> exten => 0800123456,26,Dial(LOCAL/company_648 at features/n)
> exten => company_648,1,Set(CDR(userfield)=${UNIQUECALLID})
> exten => company_648,2,GotoIf($[${REGEX("^()$" ${CALLFROM})}]?additional,hangup,1)
> exten => company_648,3,Goto(features,company_47,1)
> exten => company_47,1,Set(CDR(userfield)=${UNIQUECALLID})
> exten => company_47,2,GotoIfTime(0:00-23:59,mon,*,*,?features,company_409,1)
> exten => company_47,3,GotoIfTime(0:00-23:59,tue,*,*,?features,company_409,1)
> exten => company_47,4,GotoIfTime(0:00-23:59,wed,*,*,?features,company_409,1)
> exten => company_47,5,GotoIfTime(0:00-23:59,thu,*,*,?features,company_409,1)
> exten => company_47,6,GotoIfTime(0:00-23:59,fri,*,*,?features,company_409,1)
> exten => company_47,7,GotoIfTime(0:00-23:59,sat,*,*,?features,company_409,1)
> exten => company_47,8,GotoIfTime(0:00-23:59,sun,*,*,?features,company_409,1)
> exten => company_409,1,Set(CDR(userfield)=${UNIQUECALLID})
> exten => company_409,2,Set(FailedAttempts=0)
> exten => company_409,3,ExecIf($["${CHANNEL(state)}"="Ring"]?Ringing())
> exten => company_409,4,ExecIf($["${CHANNEL(state)}"="Ring"]?Wait(1.5))
> exten => company_409,5,Answer()
> exten => company_409,6,Wait(0.5)
> exten => company_409,7,Playback(/var/lib/asterisk/clientsounds/features/1/409/1)
> exten => company_409,8,Goto(menu_1_409,s,1)
> [menu_1_409]
> exten => s,1,Set(TIMEOUT(digit)=2)
> exten => s,2,Background(/var/lib/asterisk/clientsounds/features/1/409/2)
> exten => s,3,WaitExten(5)
> exten => 1,1,Goto(queue,company_101,1)
> exten => 2,1,Goto(company_phones,202,1)
> exten => t,1,Goto(features,company_409,1)
> exten => 201,1,Goto(company_phones,201,1)
> exten => 202,1,Goto(company_phones,202,1)
> The caller presses option 1.
> exten => company_101,1,Set(__CALLTO=company_201)
> exten => company_101,2,Macro(mixmon,nobeep)
> exten => company_101,3,Answer()
> exten => company_101,4,Wait(1)
> exten => company_101,5,Playback(/var/lib/asterisk/clientsounds/features/1/queues/1)
> exten => company_101,6,Set(CDR(userfield)=${UNIQUECALLID})
> exten => company_101,7,Queue(company_101,tC,,,9999)
> exten => company_101,8,GotoIf($["${QUEUESTATUS}"="TIMEOUT"]?108:208)
> exten => company_101,108,Set(CALLERID(number)=9${CALLERID(number)})
> exten => company_101,109,Set(CDR(accountcode)=company)
> exten => company_101,110,Goto(voicemail,company_2,1)
> exten => company_101,208,Set(CALLERID(number)=9${CALLERID(number)})
> exten => company_101,209,Set(CDR(accountcode)=company)
> exten => company_101,210,Goto(voicemail,company_1,1)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list