Send "not compatible here" instead of "unavailable" on codec mismatch (bug #3306)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4749 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
c47ebe99cf
commit
fa146f6d76
1 changed files with 15 additions and 7 deletions
|
@ -2790,7 +2790,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) {
|
||||
|
@ -7778,6 +7778,13 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
|
|||
}
|
||||
} else {
|
||||
if (p && !ast_test_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);
|
||||
|
@ -7786,6 +7793,7 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
|
|||
ast_set_flag(p, SIP_NEEDDESTROY);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (!strcasecmp(cmd, "REFER")) {
|
||||
ast_log(LOG_DEBUG, "We found a REFER!\n");
|
||||
if (ast_strlen_zero(p->context))
|
||||
|
|
Reference in a new issue