${DIALSTATUS} is set only after hangup, try adding the NoOp() line to your
'h' (hangup) extension like this:
exten => h,1,NoOp(${DIALSTATUS})
...
This is how I get the status of the call attempt, whether it's done through
Originate or just plain manual dialing.
On 2/1/07, Michael Collins <[EMAIL PROTECTED]> wrote:
________________________________________
From: [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] On Behalf Of Roi Stork
Sent: Thursday, February 01, 2007 6:31 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] API Originate Action - distinguishing
between NoAnswer and Invalid phone number
On 2/1/07, Michael Collins <[EMAIL PROTECTED]> wrote:
Is there a way to distinguish between a no answer and an invalid?For
me, a 'failed' attempt is dialing an invalid number, and I'd like the
CDRs to reflect that.I'd like a no answer to be as 'successful' as a
busy.
The ${DIALSTATUS} channel variable stores the result of the dial attempt:
http://www.voip-info.org/wiki-Asterisk+variable+DIALSTATUS
You can store it on the CDR's userfield column using the cdr function:
Set(CDR(userfield)=${DIALSTATUS})
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:
exten => failed,n,Noop(Dial status is '${DIALSTATUS}')
The log yields this:
-- Executing NoOp("OutgoingSpoolFailed", "Dial status is ") in new stack
Is there perhaps a way to make DIALSTATUS persist or get populated when
the dialplan hits the failed extension?
-MC
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users