(Both on Asterisk 1.2 and 1.4)<br><br>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&#39;t record correct value in dst column, and isntead puts &#39;h&#39; there. If GotoIf removed, it works fine.<br>
<br>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&#39;t move ResetCDR before GotoIf.<br><br>Here are the test context and macro:<br><br>[test]<br>exten =&gt; _NXXNXXXXXX,1,Dial(IAX2/XXXXX/${EXTEN},30)<br>
exten =&gt; h,1,Macro(test-hangup)<br><br>[macro-test-hangup]<br>exten =&gt; s,1,GotoIf($[&quot;1&quot;=&quot;1&quot;]?2:3)<br>exten =&gt; s,n,NoOp(A)<br>exten =&gt; s,n,ResetCDR(vw)<br>exten =&gt; s,n,NoCDR()<br>exten =&gt; s,n,Hangup()<br>
<br clear="all"><br>-- <br>Zeeshan A Zakaria<br>