[asterisk-biz] Returning Error Codes

Trixter aka Bret McDanel trixter at 0xdecafbad.com
Mon Nov 3 13:30:08 CST 2008


On Mon, 2008-11-03 at 14:05 -0500, Jared Smith wrote:
> On Sun, 2008-11-02 at 12:24 -0500, Igor Hernandez wrote:
> > Recently we've had a client come to us requesting a specific error
> > code
> > be returned from our switch because they need it for their LCR.
> > 
> > Is there a way in Asterisk to return a specific error code instead of
> > just passing down the error code returned from the carrier's switch?
> 
> Recent versions of Asterisk allow you to pass a cause code as the first
> (and only) argument to the Hangup() application.
> 

can you get and respond to the error code from someone else and make a
choice based on that?  It seems that his problem was (based on the above
description, and I may be wrong) that he sends a call via Dial() and
that the error code they send is being sent back, granted you can
intercept that with an additional hangup and you can do the dialplan
stuff to see noanswer, busy, etc but that does not mean that you get the
code itself, for example can you differentiate between a 503 and a 500
or something equally similar?

Sometimes the numeric is handy, although its channel specific so a
mapping to something else may be useful, but if you know its sip getting
the sip response code itself may be useful.
-- 
Trixter http://www.0xdecafbad.com     Bret McDanel
Belfast +44 28 9099 6461        US +1 516 687 5200
http://www.trxtel.com the phone company that pays you!




More information about the asterisk-biz mailing list