Map SIP status to different dialstatus

Hi

I am having a bit of a problem with our SIP provider, whenever we dial a non-existing number they send back a SIP response 480, however it seems my asterisk is registering this as a busy.

How do I configure asterisk to recognize this as a non-existent number?

480 is temporarily unavailable, which RFC 4497 (tools.ietf.org/html/rfc4497) says should be mapped to a ${HANGUPCAUSE} of 18 (no user responding). Asterisk actually maps this to 19 (no answer from this subscriber). Whilst this doesn’t exactly match the RFC, given that 19 translates to 480, it is not unreasonable.

Asterisk is not reporting this as BUSY, but as CONGESTION, which, given the limited set of DIALSTATUS values is the correct DIALSTATUS. If you are unable to get your provider to fix their system, you will need to change this line in chan_sip.c and recompile:

case 480: /* No answer */ return AST_CAUSE_NO_ANSWER;

Alternatively, look for the HANGUPCAUSE value and act accordingly, e.g. call
Hangup (1).

With recent versions, it is also possible to obtain the raw SIP status.

Thanks for your very thorough answer.

From the RFC, I can see that it is probably the QSIG 20 -> SIP 480 that is causing the problem. I will discuss it with my ISP, but you also gave me enough info for workaround if they dont play ball :smiley: