2013/3/29 Julian Lyndon-Smith <aster...@dotr.com> > check out the endbeforehexten option in cdr.conf > > this needs to set to "yes" > > Julian >
Unfortunately, this doesn't help. Let's drop the hangup handler at the moment, and focus on the "saving to file" part. Then my issue is I can't update CDR value is hangup exten. Here is a dialplan that illustrate this: [from-foobar] exten => _X.,1,Verbose(0,Entering context ${CONTEXT} from channel ${CHANNEL(channeltype)} ${CHANNEL} with EXTEN and CID set to ${EXTEN} and ${CALLERID(num)}) same => n, Set(CDR(userfield)=foo) same => n, Dial(SIP/foobar/${EXTEN}) same => n, Set(CDR(userfield)=bar) same => n, Hangup() exten => h,1,Verbose(0,Entering context ${CONTEXT} from ${CHANNEL(channeltype)} channel ${CHANNEL} with EXTEN and CID set to ${EXTEN} and ${CALLERID(num)}) same => n, ExecIf($["x${CHANNEL(channeltype)}"="xLocal"]?Set(CDR(userfield)=baz1:baz2) My goal is to get either baz1 or baz2 value in /var/log/asterisk/cdr-csv/Master.csv. Typing channel originate Local/7005@from-foobar application Playback tt-monkeys, I can see that the line with ExecIf is run but CDR still contains foo value (the one set before Dial). The strange thing is : 1. a CDR is written at the moment extension 7005 answers, 2. no other CDR is added when 7005 hangs up (so can't tell how long extension 7005 listened to monkeys fellows). (Setting endbeforehexten to either yes or no has no effect on this behaviour. My question are: 1. Is it simply possible to update CDR in hangup exten ? 2. How can I have a CDR for the application Playback part (see above) ? 3. Any tip or suggestion ? Cheers
-- _____________________________________________________________________ -- 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