summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2005-01-10 19:58:35 +0000
committerMark Spencer <markster@digium.com>2005-01-10 19:58:35 +0000
commite4d79daa751b41ed02d298a8b822b588718308a5 (patch)
treec843430c934347029f59352c3ff2a00c4d62bae7 /channels
parent92eb0c2018018027bce11ece6b126cdabf3b25ea (diff)
Send "not compatible here" instead of "unavailable" on codec mismatch (bug #3306)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_sip.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 62b5c509e..d2ed0ddeb 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -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,12 +7778,20 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
}
} 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")) {