[asterisk-users] Asterisk Manager API Action Originate

Matthew Nicholson mnicholson at digium.com
Thu May 14 16:38:33 CDT 2009


The response code corresponds directly to the control frame types in
frame.h.  The code will be different depending on the technology used to
dial.  The 0 code is some sort of failure not involving any other
control frames.  Usually timeout is 3 (RINGING).  I have provided a list
taken from frame.h (1.4 svn r194356).

0 = FAILURE
1 = HANGUP (rarely seen on PRI in my experience)
3 = RINGING (i.e. timeout)
4 = ANSWER
5 = BUSY (that is where your 5 errors are coming from)
8 = CONGESTION


On Tue, 2009-05-12 at 11:48 -0700, Nicholas Blasgen wrote:
> Matt & Others,
> 
> So to continue the issue, here's what I've learned.
> 
> Tested on Asterisk:
> 
> 1.4.24.1
> SVN 193870
> SVN 191778
> 
> So I think that covers most everything.  What I've learned is that any
> Timeout sends back a response code of ZERO instead of what I would
> have expected, ONE.  Anyone offer any other suggestions to try?
> 
> My way to test this was to make a simple script to perform an AMI
> Originate call with a 4 second timeout.  I then have a standard tool
> to display all AMI Events.  On every system I tried I would get
> Response of "Failure" and Error Code of ZERO.
> 
> On Tue, May 12, 2009 at 10:13 AM, Nicholas Blasgen
> <nicholas at refractivedialer.com> wrote:
>         Matt,
>         
>         Oh, I thought it was Asterisk 1.4.23 like I wrote in my first
>         email, but turns out to be Asterisk SVN-branch-1.4-r191778.
>         
>         But yes, I am talking about originateresponse.  I'm going to
>         do some more debugging today to see if I can get the more
>         information about the issue.  When I either Originate from the
>         CLI or from AMI, I don't get anything on the console for
>         either the errors or the initial connection.  I've had a lot
>         of issues trying to debug Originate as a result.  And no CDR
>         logs are being recorded.
>         
>         
>         
>         On Tue, May 12, 2009 at 5:36 AM, Matt Riddell
>         <lists at venturevoip.com> wrote:
>                 On 12/05/2009 3:44 p.m., Nicholas Blasgen wrote:
>                 > Has anyone else had issues with Originate returning
>                 the wrong error
>                 > code?  According to the docs, the following errors
>                 are supposed to be
>                 > returned:
>                 >
>                 > 0 = no such extension or number
>                 > 1 = no answer
>                 > 4 = answered
>                 > 8 = congested or not available
>                 
>                 
>                 Are you referring to the originateresponse event?
>                 
>                 Which version of Asterisk?
>         
>         
> 
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
Matthew Nicholson
Digium, Inc. | Software Developer




More information about the asterisk-users mailing list