Forward Error Code Beetwen Legs

Home » Asterisk Users » Forward Error Code Beetwen Legs
Asterisk Users 2 Comments

Hello asterisk users,

I have a strange behaviour with asterisk and error code forwarding in asterisk 11.

Please find below my setup:

Phone -> ASTERISK -> SIP TRUNK PROVIDER

A phone start a call, asterisk start a leg to my SIP trunk provider. I have a simple dialplan to handle it:

[gotoexternal]
exten => _X.,1,Dial(SIP/${EXTEN}@provider)

When my SIP provider return to asterisk a 404 SIP error code, asterisk return to phone a 503 error code.

Why 503 error code has been returned, and not the original error = 404
error ?

Asterisk’s cli said: == Everyone is busy/congested at this time (1:0/0/1)

How can i return the 404 error ? Forward this 404 error to the original leg
?

Thanks in advance, Regards.

2 thoughts on - Forward Error Code Beetwen Legs

  • To lazy to look it up exactly, but add something like:
    exten => _X.,n,Hangup(${HANGUPCAUSE})

  • Exact Daniel, it’works with this line.

    Thanks for your help.

    Regards.

    2017-06-01 21:16 GMT+02:00 Daniel Tryba :