${DIALSTATUS} is set only after hangup, try adding the NoOp() line to your &#39;h&#39; (hangup) extension like this:<br><br>exten =&gt; h,1,NoOp(${DIALSTATUS})<br>...<br><br>This is how I get the status of the call attempt, whether it&#39;s done through Originate or just plain manual dialing.
<br><br><div><span class="gmail_quote">On 2/1/07, <b class="gmail_sendername">Michael Collins</b> &lt;<a href="mailto:mcollins@fcnetwork.com">mcollins@fcnetwork.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>________________________________________<br>From: <a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a> [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com
</a>] On Behalf Of Roi Stork<br>Sent: Thursday, February 01, 2007 6:31 PM<br>To: Asterisk Users Mailing List - Non-Commercial Discussion<br>Subject: Re: [asterisk-users] API Originate Action - distinguishing between NoAnswer and Invalid phone number
<br><br>On 2/1/07, Michael Collins &lt;<a href="mailto:mcollins@fcnetwork.com">mcollins@fcnetwork.com</a>&gt; wrote:<br>Is there a way to distinguish between a no answer and an invalid?For<br>me, a &#39;failed&#39; attempt is dialing an invalid number, and I&#39;d like the
<br>CDRs to reflect that.I&#39;d like a no answer to be as &#39;successful&#39; as a<br>busy.<br><br>The ${DIALSTATUS} channel variable stores the result of the dial attempt:<br><a href="http://www.voip-info.org/wiki-Asterisk+variable+DIALSTATUS">
http://www.voip-info.org/wiki-Asterisk+variable+DIALSTATUS</a><br><br>You can store it on the CDR&#39;s userfield column using the cdr function:<br>Set(CDR(userfield)=${DIALSTATUS})<br><br>Actually, I can&#39;t.&nbsp;&nbsp;The dialplan execution goes straight to the &#39;failed&#39; extension.&nbsp;&nbsp;When it does so, the DIALSTATUS variable gets cleared out.&nbsp;&nbsp;I have this in my dialplan:
<br><br>exten =&gt; failed,n,Noop(Dial status is &#39;${DIALSTATUS}&#39;)<br><br>The log yields this:<br>-- Executing NoOp(&quot;OutgoingSpoolFailed&quot;, &quot;Dial status is &quot;) in new stack<br><br>Is there perhaps a way to make DIALSTATUS persist or get populated when the dialplan hits the failed extension?
<br><br>-MC<br>_______________________________________________<br>--Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:
<br>&nbsp;&nbsp; <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br>