<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt">Tilghman<br />
<br />
This does not make any sense. In the voip-info posting for the "h" extension it specifically states that to handle "h" while in a macro that the macro needs an "h" extension.&nbsp; The "h" extension runs inside the macro but the CDR data is not being updated correctly. Also the rc-ANSWER entry in the macro does not update the CDR with the ${HANGUPCAUSE} either after the far end hangs up. This is diffently inconsistent behavior here.&nbsp; Both the DIAL and "h" extension are inside the macro so the behaivior should be consistent.&nbsp; If I am understanding you correctly the only way we can get a CDR to update after a dial is to not do any DIAL calls in a MACRO is this what you are saying? Otherwise your logic may be flawed or we have a very big logic bug in the Asterisk Macro system.<br />
<br />
From: <a href="http://www.voip-info.org/wiki/view/Asterisk+h+extension">http://www.voip-info.org/wiki/view/Asterisk+h+extension</a><br />
&nbsp;&nbsp;&nbsp; Be aware: <a href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Macro" title="Asterisk cmd Macro">Macros</a> require their own h extension as they do not make use of the calling context's h extension! <br />
<br />
<br />
Tilghamn thanks for the feed back the back and forth here is great and helps a lot it is giving me more ideas to test against. <br />
<br />
Bryant<br />
<br />
<div id="divSignature"></div>
<br />
<br />
<span style="font-family: tahoma,arial,sans-serif; font-size: 10pt;"><hr width="100%" size="2" align="center" />
<b>From</b>: "Tilghman Lesher" &lt;tilghman@meg.abyt.es&gt;<br />
<b>Sent</b>: Thursday, December 23, 2010 12:30 AM<br />
<b>To</b>: "Asterisk Users Mailing List - Non-Commercial Discussion" &lt;asterisk-users@lists.digium.com&gt;<br />
<b>Subject</b>: Re: [asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR)</span><br />
<br />
On Wednesday 22 December 2010 21:08:56 Bryant Zimmerman wrote:<br />
&gt; My "h" extension is in the same context as my Dial commands. Here is a<br />
&gt; cut back version of the code.<br />
&gt; The cause_code value is never stored in the mysql databae even when set<br />
&gt; in the "h" extension or the<br />
&gt; when set in "rc-ANSWER' OR "doDialStd"<br />
&gt; <br />
&gt; [macro-OBD-DoOutboundDial]<br />
&gt; exten =&gt; h,1,NoOp(Cause Code = ${HANGUPCAUSE})<br />
&gt; exten =&gt; h,n,Set(CDR(cause_code)=${HANGUPCAUSE})<br />
&gt; exten =&gt; h,n,Goto(rc-${DIALSTATUS},1)<br />
<br />
There's the problem. The "h" extension should be in whatever context is<br />
calling the Macro, not in the Macro context itself.<br />
<br />
-- <br />
Tilghman<br />
<br />
--<br />
_____________________________________________________________________<br />
-- Bandwidth and Colocation Provided by http://www.api-digital.com --<br />
New to Asterisk? Join us for a live introductory webinar every Thurs:<br />
http://www.asterisk.org/hello<br />
<br />
asterisk-users mailing list<br />
To UNSUBSCRIBE or update options visit:<br />
http://lists.digium.com/mailman/listinfo/asterisk-users<br />
<br /></span>