[asterisk-bugs] [JIRA] Commented: (ASTERISK-16475) CDR user fields not updated and CDR() returns invalid data when using Queue with "c" flag
André Emerich (JIRA)
noreply at issues.asterisk.org
Wed Aug 1 16:45:21 CDT 2012
[ https://issues.asterisk.org/jira/browse/ASTERISK-16475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=195388#comment-195388 ]
André Emerich commented on ASTERISK-16475:
------------------------------------------
I have a tip to turn around this problem..
Put this before Queue:
exten => _X.,n,Set(STARTCALL=${CDR(start)})
exten => _X.,n,Set(ANSWERTIME=${CDR(answer)})
And in h exten, I had put:
exten => h,n,Set(DURATION=$[${EPOCH} - ${STRPTIME(${STARTCALL},,%Y-%m-%d %H:%M:%S)}])
exten => h,n,Set(BILLSEC=$[${EPOCH} - ${STRPTIME(${ANSWERTIME},,%Y-%m-%d %H:%M:%S)}])
It was enough to me to "cheat" this problem.
I hope it helps.
> CDR user fields not updated and CDR() returns invalid data when using Queue with "c" flag
> -----------------------------------------------------------------------------------------
>
> Key: ASTERISK-16475
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-16475
> Project: Asterisk
> Issue Type: Bug
> Components: CDR/General
> Reporter: Kirill Katsnelson
> Severity: Minor
>
> When Queue() is called with the "c" flag (continue dialplan after agent hangup):
> 1. assignments made to CDR(...) values from the h extension are not written to the database; these are the userfield and all additional custom fields (used with adaptive_odbc).
> 2. CDR() fields are reset to defaults. These are CDR(billsec), CDR(duration), CDR(disposition) -- possibly more.
> ****** STEPS TO REPRODUCE ******
> context cdr-bug {
> 777 => {
> QUEFLAGS = "ct";
> CDR(userfield)="before queue";
> Verbose(1, Before Queue: QS:${QUEUESTATUS} T:${CDR(billsec)}/${CDR(duration)} D:${CDR(disposition)} A:${CDR(amaflags)});
> Queue(QTest,${QUEFLAGS});
> CDR(userfield)="after queue";
> Verbose(1, After Queue: QS:${QUEUESTATUS} T:${CDR(billsec)}/${CDR(duration)} D:${CDR(disposition)} A:${CDR(amaflags)});
> }
> h => {
> CDR(userfield)="hangup";
> Verbose(1, Hangup: T:${CDR(billsec)}/${CDR(duration)} D:${CDR(disposition)} A:${CDR(amaflags)});
> }
> }
> Send a call to 777 at cdr-bug ("Customer" originates). Have a device in the queue QTest answer (this is the "Agent"). set core verbose 1 to see Verbose() output from the script.
> Test1: "Customer" hangs up 10 seconds into the call.
> Before Queue: QS: T:0/0 D:NO ANSWER A:DOCUMENTATION
> Hangup: T:0/0 D:NO ANSWER A:DOCUMENTATION
> Values of 0/0 and "NO ANSWER" are wrong.
> CDR userfield set in the database to "before queue" -- expected "hangup".
> Test2: "Agent" hangs up 10 seconds into the call. The same problem.
> Agent hangup, CT
> Before Queue: QS: T:0/0 D:NO ANSWER A:DOCUMENTATION
> After Queue: QS:CONTINUE T:0/0 D:NO ANSWER A:DOCUMENTATION
> Hangup: T:0/0 D:NO ANSWER A:DOCUMENTATION
> userfield: "before queue"
> Control. Change QUEFLAGS to "t" (remove the c flag), and the same 2 tests act normally.
> Customer hangup
> Before Queue: QS: T:0/0 D:NO ANSWER A:DOCUMENTATION
> Hangup: T:10/10 D:ANSWERED A:DOCUMENTATION
> Userfield:hangup
> Agent hangup
> Before Queue: QS: T:0/0 D:NO ANSWER A:DOCUMENTATION
> Hangup: T:8/8 D:ANSWERED A:DOCUMENTATION
> Userfield:hangup
> All values are present and database is updated with the correct value.
> ****** ADDITIONAL INFORMATION ******
> I think that Dial() with the g flag has the same problem.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list