${DIALSTATUS} is set only after hangup, try adding the NoOp() line to your 'h' (hangup) extension like this:<br><br>exten => h,1,NoOp(${DIALSTATUS})<br>...<br><br>This is how I get the status of the call attempt, whether it'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> <<a href="mailto:mcollins@fcnetwork.com">mcollins@fcnetwork.com</a>> 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 <<a href="mailto:mcollins@fcnetwork.com">mcollins@fcnetwork.com</a>> wrote:<br>Is there a way to distinguish between a no answer and an invalid?For<br>me, a 'failed' attempt is dialing an invalid number, and I'd like the
<br>CDRs to reflect that.I'd like a no answer to be as 'successful' 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's userfield column using the cdr function:<br>Set(CDR(userfield)=${DIALSTATUS})<br><br>Actually, I can't. The dialplan execution goes straight to the 'failed' extension. When it does so, the DIALSTATUS variable gets cleared out. I have this in my dialplan:
<br><br>exten => failed,n,Noop(Dial status is '${DIALSTATUS}')<br><br>The log yields this:<br>-- Executing NoOp("OutgoingSpoolFailed", "Dial status is ") 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> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br>