Handle 501 right
authorMark Spencer <markster@digium.com>
Sun, 10 Aug 2003 19:36:46 +0000 (19:36 +0000)
committerMark Spencer <markster@digium.com>
Sun, 10 Aug 2003 19:36:46 +0000 (19:36 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1287 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 70ea4fd..86455c3 100755 (executable)
@@ -4338,6 +4338,12 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
                        } else
                                p->needdestroy = 1;
                        break;
+               case 501: /* Not Implemented */
+                       if (!strcasecmp(msg, "INVITE"))
+                               ast_queue_control(p->owner, AST_CONTROL_CONGESTION, 0);
+                       else
+                               ast_log(LOG_WARNING, "Host '%s' does not implement '%s'\n", inet_ntoa(p->sa.sin_addr), msg);
+                       break;
                default:
                        if ((resp >= 300) && (resp < 700)) {
                                if ((option_verbose > 2) && (resp != 487))
@@ -4367,7 +4373,6 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
                                case 404: /* Not Found */
                                case 410: /* Gone */
                                case 500: /* Server error */
-                               case 501: /* Not Implemented */
                                        if (owner)
                                                ast_queue_control(p->owner, AST_CONTROL_CONGESTION, 0);
                                        break;