Fix a bug where the codecs of the called party leg were not properly sent back to the caller call leg when reinvited.

(closes issue #13569)
Reported by: bkw918


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@195095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2009-05-18 13:53:39 +00:00
parent 85483848d0
commit ac71a26c0f
2 changed files with 3 additions and 5 deletions

View File

@@ -18559,11 +18559,8 @@ static int sip_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struc
changed = 1; changed = 1;
} }
if (codecs) { if (codecs) {
if ((p->redircodecs != codecs)) { if (p->redircodecs != codecs && (p->jointcapability & codecs) != p->jointcapability) {
p->redircodecs = codecs; p->redircodecs = codecs;
changed = 1;
}
if ((p->capability & codecs) != p->capability) {
p->jointcapability &= codecs; p->jointcapability &= codecs;
p->capability &= codecs; p->capability &= codecs;
changed = 1; changed = 1;

View File

@@ -3019,7 +3019,8 @@ static enum ast_bridge_result bridge_native_loop(struct ast_channel *c0, struct
oldcodec1 = codec1; oldcodec1 = codec1;
} }
if ((inaddrcmp(&t0, &ac0)) || if ((inaddrcmp(&t0, &ac0)) ||
(vp0 && inaddrcmp(&vt0, &vac0))) { (vp0 && inaddrcmp(&vt0, &vac0)) ||
(codec0 != oldcodec0)) {
if (option_debug > 1) { if (option_debug > 1) {
ast_log(LOG_DEBUG, "Oooh, '%s' changed end address to %s:%d (format %d)\n", ast_log(LOG_DEBUG, "Oooh, '%s' changed end address to %s:%d (format %d)\n",
c0->name, ast_inet_ntoa(t0.sin_addr), ntohs(t0.sin_port), codec0); c0->name, ast_inet_ntoa(t0.sin_addr), ntohs(t0.sin_port), codec0);