[asterisk-bugs] [Asterisk 0013799]: stdexten no longer logs incoming dialled digits in CDR

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Oct 29 21:46:47 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13799 
====================================================================== 
Reported By:                davidw
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   13799
Category:                   Applications/app_stack
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.0 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-10-29 10:56 CDT
Last Modified:              2008-10-29 21:46 CDT
====================================================================== 
Summary:                    stdexten no longer logs incoming dialled digits in
CDR
Description: 
This is really about the deprecation of Macro(), but stdexten provides a
good example of the failure that results from trying to replicate Macro
with Gosub.

Just adding:

exten => _X.,1,Gosub(stdexten,s,1(${EXTEN},SIP/${EXTEN})

to the sample extensions.conf and dialling 6106 produced the following
CDR:

"","6906","s","stdexten","""XXXXXXXXXXXX 6906""
<6906>","SIP/192.168.10.10-0939dec8","SIP/6106-093925e8","Dial","SIP/6106,20","2008-10-29
14:54:52","2008-10-29 14:54:54","2008-10-29
14:54:55",3,1,"ANSWERED","DOCUMENTATION","1225292092.19","
"

Historically, "s" would have been "6106" and "stdexten" would have been
"default", which I believe are much more useful.
====================================================================== 

---------------------------------------------------------------------- 
 (0094384) crjw (reporter) - 2008-10-29 21:46
 http://bugs.digium.com/view.php?id=13799#c94384 
---------------------------------------------------------------------- 
I happen to be using AEL which converts "macro" calls to "gosub" calls.
For each macro, AEL creates a dedicated context with one extension named
"s".
Since I use an AEL "stdexten" macro in the dialplan, all my CDRs end up
containing "stdexten" and "s" instead of the original context and the
dialed extension.

Note: the variables ${CDR(dcontext)} and ${CDR(dst)}, when referenced in
the AEL macro, show the original context and the dialed extension.
I discovered this by adding two lines to the begining of my stdexten AEL
macro:
    NoOp(${CDR(dst)});
    NoOp(${CDR(dcontext)});
The fact that these CDR variables don't reflect what is being logged in
the CDR should be treated as a bug.

For those not using AEL, the bug can be seen with the following dialplan
in extension.conf:
[junk]
exten => 750,1,GoSub(subroutines,stdexten,1(SIP/750))
[subroutines]
exten => stdexten,1,NoOp(${CDR(dst)})
exten => stdexten,n,NoOp(${CDR(dcontext)}) 
exten => stdexten,n,Dial(${ARG1})
exten => stdexten,n,Return
;;;; compare the output from the "NoOp" operations with the entries logged
in the CDR; you will find they are not the same.

If anybody wishes to tackle this bug, I would prefer to see the CDR fixed
to match the variables instead of the variables fixed to match the CDR!

And if anybody asks, I am using 1.6.0.1 on top of Solaris. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-29 21:46 crjw           Note Added: 0094384                          
======================================================================




More information about the asterisk-bugs mailing list