[asterisk-users] ResetCDR after GotoIf doesn't set dst correctly, Is this a bug?

Zeeshan Zakaria zishanov at gmail.com
Wed Jul 15 09:18:34 CDT 2009


(Both on Asterisk 1.2 and 1.4)

I was struggling to find out why my CDR was recording dst = h after a call
hangup. It was working fine until I added a GotoIf statement before ResetCDR
to calculate some value for userfield column. Today I tested and found out
that if ResetCDR is put after GotoIf (or after if in AEL), it doesn't record
correct value in dst column, and isntead puts 'h' there. If GotoIf removed,
it works fine.

Is this is a bug, or is this how it is supposed to work? Is there any work
around it. In my production scenario, I can't move ResetCDR before GotoIf.

Here are the test context and macro:

[test]
exten => _NXXNXXXXXX,1,Dial(IAX2/XXXXX/${EXTEN},30)
exten => h,1,Macro(test-hangup)

[macro-test-hangup]
exten => s,1,GotoIf($["1"="1"]?2:3)
exten => s,n,NoOp(A)
exten => s,n,ResetCDR(vw)
exten => s,n,NoCDR()
exten => s,n,Hangup()


-- 
Zeeshan A Zakaria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090715/5fd42eda/attachment-0001.htm 


More information about the asterisk-users mailing list