[asterisk-users] keep dst cdr record if context change

Daniel Knoll daniel at danielknoll.de
Fri Mar 30 16:51:07 CDT 2012


Looks nice, was also my first idea, but field dst is read only. I can't overwrite this and get an error like this

ERROR[2474]: cdr.c:345 ast_cdr_setvar: Attempt to set the 'dst' read-only variable!.


Am 30.03.2012 um 22:00 schrieb Warren Selby:

> On Fri, Mar 30, 2012 at 2:21 PM, Danny Nicholas <danny at debsinc.com> wrote:
> So you have a situation like so:
> [default]
> Exten => _X.,1,Answer
> Exten => _X.,n,Goto(foo,s,1)
> [foo[
> Exten => s,1,playback(vm-goodbye)
> Exten => s,n,hangup()
> 
> And you get two CDR records, 1 with default and 1 with foo?
> 
> No, he should be getting 1 record with "s" in the dst field.  
> 
> To the OP: have you tried setting a channel variable to "${EXTEN} before your Goto() command, and then in the "h" exten write it back into the cdr?  Something like:
> 
> [incoming]
> exten => _X.,1,Verbose(New call coming in - verify routing)
> exten => _X.,n,Set(finaldst=${EXTEN})
> exten => _X.,n,Goto(mainmenu,s,1)
> 
> exten => h,1,Verbose(Hanging up)
> exten => h,n,Set(CDR(dst)=${finaldst})
> 
> -- 
> Thanks,
> --Warren Selby, dCAP
> http://www.SelbyTech.com
> 
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120330/d881903a/attachment.htm>


More information about the asterisk-users mailing list