[Asterisk-cvs] asterisk/channels chan_sip.c,1.517,1.518
markster at lists.digium.com
markster at lists.digium.com
Mon Oct 4 09:02:16 CDT 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv29151/channels
Modified Files:
chan_sip.c
Log Message:
Have SIP_CODEC variable override replace all other codecs (bug #2566)
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.517
retrieving revision 1.518
diff -u -d -r1.517 -r1.518
--- chan_sip.c 3 Oct 2004 19:59:45 -0000 1.517
+++ chan_sip.c 4 Oct 2004 13:03:53 -0000 1.518
@@ -1853,7 +1853,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