[asterisk-bugs] [Asterisk 0016289]: core show function CDR reports wrong disposition values
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri Nov 20 04:40:31 CST 2009
The following issue has been SUBMITTED.
======================================================================
https://issues.asterisk.org/view.php?id=16289
======================================================================
Reported By: wdoekes
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 16289
Category: Functions/func_cdr
Reproducibility: always
Severity: text
Priority: normal
Status: new
Asterisk Version: SVN
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-11-20 04:40 CST
Last Modified: 2009-11-20 04:40 CST
======================================================================
Summary: core show function CDR reports wrong disposition
values
Description:
When running:
exten => s,1,Answer()
exten => s,n,NoOp(exten => _X.,n,NoOp(QUEUE_ANS: ${CDR(disposition)} /
${CDR(disposition,u)})
I get:
voip-test*CLI>
<...snip...>
-- Executing [s at pi_incoming_queue:2] NoOp("SIP/1.2.3.4-0241c1e0",
"QUEUE_ANS: ANSWERED / 8") in new stack
<...snip...>
When checking the function description, I get:
voip-test*CLI> core show function CDR
<...snip...>
raw values for disposition:
1 = NO ANSWER
2 = BUSY
3 = FAILED
4 = ANSWERED
<...snip...>
This means that the raw disposition values in the documentation are wrong,
right?
According to svn blame it has always been like this in
include/asterisk/cdr.h:
#define AST_CDR_FAILED (1 << 0)
#define AST_CDR_BUSY (1 << 1)
#define AST_CDR_NOANSWER (1 << 2)
#define AST_CDR_ANSWERED (1 << 3)
Patch for 1.4:
walter at walter-desktop:0:~/src/asterisk-1.4.21.2~dfsg$ diff -uw
funcs/func_cdr.c{.orig,}
--- funcs/func_cdr.c.orig 2009-11-20 11:27:32.342565683 +0100
+++ funcs/func_cdr.c 2009-11-20 11:28:28.250790683 +0100
@@ -144,10 +144,10 @@
" variable, whose value can be changed with this function,\n"
" and this variable will be stored on the cdr.\n"
" raw values for disposition:\n"
-" 1 = NO ANSWER\n"
+" 1 = FAILED\n"
" 2 = BUSY\n"
-" 3 = FAILED\n"
-" 4 = ANSWERED\n"
+" 4 = NO ANSWER\n"
+" 8 = ANSWERED\n"
" raw values for amaflags:\n"
" 1 = OMIT\n"
" 2 = BILLING\n"
Patch for 1.6-svn:
walter at walter-desktop:0:~/src/asterisk-svn$ svn diff funcs/func_cdr.c
Index: funcs/func_cdr.c
===================================================================
--- funcs/func_cdr.c (revision 230582)
+++ funcs/func_cdr.c (working copy)
@@ -137,15 +137,15 @@
<para>Raw values for <literal>disposition</literal>:</para>
<enumlist>
<enum name="1">
- <para>NO ANSWER</para>
+ <para>FAILED</para>
</enum>
<enum name="2">
<para>BUSY</para>
</enum>
- <enum name="3">
- <para>FAILED</para>
+ <enum name="4">
+ <para>NO ANSWER</para>
</enum>
- <enum name="4">
+ <enum name="8">
<para>ANSWERED</para>
</enum>
</enumlist>
Regards,
Walter Doekes
OSSO B.V.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2009-11-20 04:40 wdoekes New Issue
2009-11-20 04:40 wdoekes Asterisk Version => SVN
2009-11-20 04:40 wdoekes Regression => No
2009-11-20 04:40 wdoekes SVN Branch (only for SVN checkouts, not tarball
releases) => trunk
======================================================================
More information about the asterisk-bugs
mailing list