]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix a bug where the codecs of the called party leg were not properly sent back to...
authorJoshua Colp <jcolp@digium.com>
Mon, 18 May 2009 13:53:39 +0000 (13:53 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 18 May 2009 13:53:39 +0000 (13:53 +0000)
(closes issue #13569)
Reported by: bkw918

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@195095 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c
main/rtp.c

index b1358175ae191905961d60ec1ad1c031f741bcf2..3bc29bb75b5e7e8fe7a0b509bd649aea4a9e9c63 100644 (file)
@@ -18559,11 +18559,8 @@ static int sip_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struc
                changed = 1;
        }
        if (codecs) {
-               if ((p->redircodecs != codecs)) {
+               if (p->redircodecs != codecs && (p->jointcapability & codecs) != p->jointcapability) {
                        p->redircodecs = codecs;
-                       changed = 1;
-               }
-               if ((p->capability & codecs) != p->capability) {
                        p->jointcapability &= codecs;
                        p->capability &= codecs;
                        changed = 1;
index de4ab9a2f51621683e4c069d73fa92e576379919..4250661d3812695f049bc3bc5db4ea3668eaa111 100644 (file)
@@ -3019,7 +3019,8 @@ static enum ast_bridge_result bridge_native_loop(struct ast_channel *c0, struct
                        oldcodec1 = codec1;
                }
                if ((inaddrcmp(&t0, &ac0)) ||
-                   (vp0 && inaddrcmp(&vt0, &vac0))) {
+                   (vp0 && inaddrcmp(&vt0, &vac0)) ||
+                   (codec0 != oldcodec0)) {
                        if (option_debug > 1) {
                                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);