[Asterisk-cvs] asterisk/channels chan_sip.c,1.625,1.626
markster at lists.digium.com
markster at lists.digium.com
Mon Jan 10 13:54:21 CST 2005
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv733/channels
Modified Files:
chan_sip.c
Log Message:
Send "not compatible here" instead of "unavailable" on codec mismatch (bug #3306)
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.625
retrieving revision 1.626
diff -u -d -r1.625 -r1.626
--- chan_sip.c 10 Jan 2005 05:46:25 -0000 1.625
+++ chan_sip.c 10 Jan 2005 19:58:35 -0000 1.626
@@ -2790,7 +2790,7 @@
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) {
@@ -7778,12 +7778,20 @@
}
} else {
if (p && !ast_test_flag(p, SIP_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);
- ast_set_flag(p, SIP_NEEDDESTROY);
+ if (!p->jointcapability) {
+ if (ignore)
+ transmit_response(p, "488 Not Acceptable Here", req);
+ else
+ transmit_response_reliable(p, "488 Not Acceptable Here", req, 1);
+ ast_set_flag(p, SIP_NEEDDESTROY);
+ } 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);
+ ast_set_flag(p, SIP_NEEDDESTROY);
+ }
}
}
} else if (!strcasecmp(cmd, "REFER")) {
More information about the svn-commits
mailing list