Summary:ASTERISK-06895: SIP answer 480 is translated incorrectly by hangup_sip2cause
Reporter:Niels Thomsen (kanoop)Labels:
Date Opened:2006-05-04 06:07:53Date Closed:2006-05-11 02:41:50
Versions:Frequency of
Description:hangup_sip2cause is translating a SIP response 480 (temporarily unavailable) into AST_CAUSE_FAILURE.  On a SNOM, when placed in DND (do-not-disturb) mode, this causes the phone to display a "500: Server Error" message, rather than the more sensible "Temporarily Unavailable" message that a 480 response corresponds to.


This issue appeared in our system when we upgraded from a version 0.9.x to the latest version.

I have fixed this in hangup_sip2cause by changing:

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


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

However, I do not have enough SIP experience to tell whether this is an appropriate and complete fix.  A brief look around the code seems to indicate that there are no bad side effects from this, but I'd like someone out there to check this.
Comments:By: Serge Vecher (serge-v) 2006-05-04 08:21:06

kanoop: with this change, does the phone respond correctly?

By: Niels Thomsen (kanoop) 2006-05-04 08:29:44

Yes, in so far as it shows a less confusing message to the user.  Showing "Server Error" to a user caused lots of calls to the help desk to report that the pabx had failed, when in fact it was just a normal situation being responded to badly.

It could be argued that perhaps AST_CAUSE_BUSY is a more appropriate response, but my users seem to prefer being able to distinguish between someone being "on the phone" and someone being DND.

By: Olle Johansson (oej) 2006-05-09 10:26:21

We need to follow the guidelines set by the ISDN to SIP conversion RFCs and guides from Cisco, so the phone need to accept this, sorry.

By: Niels Thomsen (kanoop) 2006-05-10 03:41:24


The issue isn't really that the phone doesn't respond properly - which it does - but rather that the mapping of the error code is wrong.  

RFC3398, for instance, maps a 480 response to "18 No user responding" which is distinct from its mapping of a 500 response "41 Temporary failure".  So Asterisk mapping a 480 response to "failure" still seems wrong to me...

By: Olle Johansson (oej) 2006-05-11 02:41:34

Ok, you're right. Fixed in svn trunk. Thanks!