[asterisk-users] API Originate Action - distinguishing between NoAnswer and Invalid phone number

Roi Stork roi.stork at gmail.com
Tue Feb 6 23:59:21 MST 2007


${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 <mcollins at fcnetwork.com> wrote:
>
>
> ________________________________________
> From: asterisk-users-bounces at lists.digium.com [mailto:
> asterisk-users-bounces at lists.digium.com] 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 <mcollins at fcnetwork.com> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070206/5a1a3c09/attachment.htm


More information about the asterisk-users mailing list