[asterisk-users] Asterisk 11 - Change CDR in hangup exten [Was: CDR values changed in hangup handler not saved]
Olivier
oza_4h07 at yahoo.fr
Fri Mar 29 05:02:09 CDT 2013
2013/3/29 Julian Lyndon-Smith <asterisk at 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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130329/a689df12/attachment.htm>
More information about the asterisk-users
mailing list