]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Issue #8592 - handle 504 as 503 - congestion
authorOlle Johansson <oej@edvina.net>
Fri, 15 Dec 2006 10:51:53 +0000 (10:51 +0000)
committerOlle Johansson <oej@edvina.net>
Fri, 15 Dec 2006 10:51:53 +0000 (10:51 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48484 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 764ca032d8958cd4c77f455cd9f6e332682e4ed3..96dd99cf596b72e425962a2e7cbba479fc32c7cc 100644 (file)
@@ -2325,6 +2325,7 @@ static int hangup_sip2cause(int cause)
                case 502:       
                        return AST_CAUSE_DESTINATION_OUT_OF_ORDER;
                case 503:       /* Service unavailable */
+               case 504:       /* Server timeout */
                        return AST_CAUSE_CONGESTION;
                default:
                        return AST_CAUSE_NORMAL;
@@ -10206,6 +10207,7 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
                                case 400: /* Bad Request */
                                case 500: /* Server error */
                                case 503: /* Service Unavailable */
+                               case 504: /* Server Timeout */
                                        if (owner)
                                                ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
                                        break;
@@ -10299,6 +10301,7 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
                                case 603: /* Decline */
                                case 500: /* Server error */
                                case 503: /* Service Unavailable */
+                               case 504: /* Server timeout */
 
                                        if (sipmethod == SIP_INVITE && !ignore) {       /* re-invite failed */
                                                sip_cancel_destroy(p);