[Home]

Summary:ASTERISK-15237: Custom CDR values not logged when dialing with local channels
Reporter:Andrew Parisio (parisioa)Labels:
Date Opened:2009-11-29 20:11:47.000-0600Date Closed:2011-06-07 14:00:35
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_cdr
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I'm using the AGI to generate outobund calls using local channels to provide a Dial button so that agents don't have to dial their phones.

The problem is if i use Channel: Local/$extension@inside-leg the custom CDR values i set do not get logged in cdr-custom.  If i use Channel: SIP/$extension the values do get logged properly.  The standard CDR values get logged, but anything else doesn't that i make up on my own for instance CDR(uicallid) will not get passed through.

if i show the channel during a call, it will not show the variables having been set, but if i turn on verbosity i can see the SET command set the variable, and if i do a NoOp on the variable it will print out on the console.  

core show channel SIP/OCS_TRUNK-00000016 (dialed directly using SIP/)

 CDR Variables:
level 1: uicallid=12341
level 1: acd=6166
level 1: extension=1594
level 1: clid="2128675309" <18002662278>
level 1: src=18002662278
level 1: dst=18002662278
level 1: dcontext=outbound-autodialer
level 1: channel=SIP/OCS_TRUNK-00000016
level 1: dstchannel=SIP/bandwidth-primary-00000017
level 1: lastapp=Dial
level 1: lastdata=SIP/+18002662278@bandwidth-primary,,M(setvmid^12341^1594)
level 1: start=2009-11-29 17:58:52
level 1: answer=2009-11-29 17:59:01
level 1: duration=11
level 1: billsec=3
level 1: disposition=ANSWERED
level 1: amaflags=DOCUMENTATION
level 1: accountcode=999
level 1: uniqueid=1259546332.28

core show channel SIP/1594-00000019 (created with local channel)

 CDR Variables:
level 1: clid=18002662278
level 1: src=18002662278
level 1: dst=18002662278
level 1: dcontext=outbound-autodialer
level 1: channel=SIP/1594-00000019
level 1: dstchannel=SIP/bandwidth-primary-0000001a
level 1: start=2009-11-29 17:59:45
level 1: answer=2009-11-29 17:59:49
level 1: duration=12
level 1: billsec=7
level 1: disposition=ANSWERED
level 1: amaflags=DOCUMENTATION
level 1: accountcode=999
level 1: uniqueid=1259546383.33

console output setting the variables:
   -- Executing [18002662278@outbound-autodialer:3] Set("Local/1594@inside-leg-0784;1", "CDR(extension)=1594") in new stack
   -- Executing [18002662278@outbound-autodialer:4] Set("Local/1594@inside-leg-0784;1", "CDR(acd)=6166") in new stack
   -- Executing [18002662278@outbound-autodialer:5] Set("Local/1594@inside-leg-0784;1", "CDR(accountcode)=999") in new stack
   -- Executing [18002662278@outbound-autodialer:6] Set("Local/1594@inside-leg-0784;1", "CDR(uicallid)=12341") in new stack



****** ADDITIONAL INFORMATION ******

i've checked several releases + the svn tree and have not found a build that this works in.  I'm wondering if maybe the channel variables are being lost becaues the channel gets rebuilt or something when the call is generated this way, and it is only re-creating the variables for the standard set of CDR's?
Comments:By: Leif Madsen (lmadsen) 2009-11-30 10:44:47.000-0600

Well you're assigning to a Local channel which isn't using /n from what I can see, which makes that channel get optimized out when a connection is made, and likely the channel variables etc... are then dropped from memory.

Try one of two things:

1) /n at the end of your Local channel, such as Local/${EXTEN}@myContext/n

2) Try making the information inherited to the next channel by prefixing your Set()'s with an underscore

Set(_CDR(extension)=1234)

Beyond that, I believe this is a feature request if it was never working, in which case a patch would need to be supplied to make this work. You are welcome to discuss on the asterisk-dev list to determine if this is true or not though.

Thanks!

By: Leif Madsen (lmadsen) 2009-11-30 10:45:24.000-0600

Closed for now as either a support issue, or feature request.