Re: keep dst cdr record if context change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxxxxxxx> 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

--
_____________________________________________________________________
-- 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

[Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [DCCP]     [Gimp]     [100% Free Online Dating]     [Yosemite News]     [Arts & Crafts]     [Yosemite Photos]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]


Add to Google Powered by Linux