Add sayunixtime, chan_sip updates for codec negotiation

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2003-09-30 23:03:57 +00:00
parent 7db0e60486
commit 694d3435e1
3 changed files with 120 additions and 3 deletions

View File

@@ -2423,7 +2423,7 @@ static int add_sdp(struct sip_request *resp, struct sip_pvt *p, struct ast_rtp *
/* Start by sending our preferred codecs */
cur = prefs;
while(cur) {
if (p->capability & cur->codec) {
if (p->jointcapability & cur->codec) {
if (sipdebug)
ast_verbose("Answering with preferred capability %d\n", cur->codec);
codec = ast_rtp_lookup_code(p->rtp, 1, cur->codec);
@@ -2445,7 +2445,7 @@ static int add_sdp(struct sip_request *resp, struct sip_pvt *p, struct ast_rtp *
}
/* Now send any other common codecs, and non-codec formats: */
for (x = 1; x <= AST_FORMAT_MAX_AUDIO; x <<= 1) {
if ((p->capability & x) && !(alreadysent & x)) {
if ((p->jointcapability & x) && !(alreadysent & x)) {
if (sipdebug)
ast_verbose("Answering with capability %d\n", x);
codec = ast_rtp_lookup_code(p->rtp, 1, x);