[Asterisk-cvs] asterisk/channels chan_sip.c,1.510.2.2,1.510.2.3

russell at lists.digium.com russell at lists.digium.com
Mon Oct 4 22:11:26 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv526/channels

Modified Files:
      Tag: v1-0
	chan_sip.c 
Log Message:
make SIP_CODEC behave as it suggests (bug #2566)
Correction: The last commit for cdr_odbc.c was actually bug #2569.


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.510.2.2
retrieving revision 1.510.2.3
diff -u -d -r1.510.2.2 -r1.510.2.3
--- chan_sip.c	3 Oct 2004 20:22:41 -0000	1.510.2.2
+++ chan_sip.c	5 Oct 2004 02:13:00 -0000	1.510.2.3
@@ -1851,7 +1851,11 @@
 			fmt=ast_getformatbyname(codec);
 			if (fmt) {
 				ast_log(LOG_NOTICE, "Changing codec to '%s' for this call because of ${SIP_CODEC) variable\n",codec);
-				p->jointcapability=fmt;
+				if (p->jointcapability & fmt) {
+					p->jointcapability &= fmt;
+					p->capability &= fmt;
+				} else
+					ast_log(LOG_NOTICE, "Ignoring ${SIP_CODEC} variable because it is not shared by both ends.\n");
 			} else ast_log(LOG_NOTICE, "Ignoring ${SIP_CODEC} variable because of unrecognized/not configured codec (check allow/disallow in sip.conf): %s\n",codec);
 		}
 




More information about the svn-commits mailing list