]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix message sent on codec mismatch (bug #3306)
authorRussell Bryant <russell@russellbryant.com>
Thu, 13 Jan 2005 04:34:01 +0000 (04:34 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 13 Jan 2005 04:34:01 +0000 (04:34 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4776 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 184af347d35c56af08136aa22d5f0ed2ba5ea079..a9692ade2713f0f8af837751870e14275a772b7c 100755 (executable)
@@ -2770,7 +2770,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
                        ast_getformatname_multiple(s3, slen, p->noncodeccapability));
        }
        if (!p->jointcapability) {
-               ast_log(LOG_WARNING, "No compatible codecs!\n");
+               ast_log(LOG_NOTICE, "No compatible codecs!\n");
                return -1;
        }
        if (p->owner) {
@@ -7385,12 +7385,20 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
                        }
                } else {
                        if (p && !p->needdestroy) {
-                               ast_log(LOG_NOTICE, "Unable to create/find channel\n");
-                               if (ignore)
-                                       transmit_response(p, "503 Unavailable", req);
-                               else
-                                       transmit_response_reliable(p, "503 Unavailable", req, 1);
-                               p->needdestroy = 1;
+                               if (!p->jointcapability) {
+                                       if (ignore)
+                                               transmit_response(p, "488 Not Acceptable Here", req);
+                                       else
+                                               transmit_response_reliable(p, "488 Not Acceptable Here", req, 1);
+                                       p->needdestroy = 1;     
+                               } else {
+                                       ast_log(LOG_NOTICE, "Unable to create/find channel\n");
+                                       if (ignore)
+                                               transmit_response(p, "503 Unavailable", req);
+                                       else
+                                               transmit_response_reliable(p, "503 Unavailable", req, 1);
+                                       p->needdestroy = 1;     
+                               }
                        }
                }
        } else if (!strcasecmp(cmd, "REFER")) {