[asterisk-biz] Returning Error Codes
Igor Hernandez
emistz at gmail.com
Mon Nov 3 14:01:24 CST 2008
Hey Bret,
Thanks for the response. What we actually need is nothing as complicated
as that. For whatever reason the client needs to see code 34 regardless
of the cause of call failure. So basically if the call doesn't connect
I'm supposed to send back code 34.
Does that make sense?
Trixter aka Bret McDanel wrote:
> 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.
More information about the asterisk-biz
mailing list