[svn-commits] tilghman: trunk r130951 - in /trunk: ./ channels/ configs/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Jul 15 11:20:36 CDT 2008
Author: tilghman
Date: Tue Jul 15 11:20:35 2008
New Revision: 130951
URL: http://svn.digium.com/view/asterisk?view=rev&rev=130951
Log:
Additional option for videosupport (always) that disables the optimization to
fail to setup video RTP if the two endpoints will not support it. This assists
with call files and certain transfers to ensure that if two video phones are
ever connected, they will always share a video feed.
Modified:
trunk/CHANGES
trunk/channels/chan_sip.c
trunk/configs/sip.conf.sample
Modified: trunk/CHANGES
URL: http://svn.digium.com/view/asterisk/trunk/CHANGES?view=diff&rev=130951&r1=130950&r2=130951
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Tue Jul 15 11:20:35 2008
@@ -127,6 +127,10 @@
* 'sip show peers' and 'sip show users' display their entries sorted in
alphabetical order, as opposed to the order they were in, in the config
file or database.
+ * Videosupport now supports an additional option, "always", which always sets
+ up video RTP ports, even on clients that don't support it. This helps with
+ callfiles and certain transfers to ensure that if two video phones are
+ connected, they will always share video feeds.
IAX Changes
-----------
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=130951&r1=130950&r2=130951
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Jul 15 11:20:35 2008
@@ -1056,11 +1056,13 @@
#define SIP_PAGE2_BUGGY_MWI (1 << 26) /*!< DP: Buggy CISCO MWI fix */
#define SIP_PAGE2_REGISTERTRYING (1 << 29) /*!< DP: Send 100 Trying on REGISTER attempts */
#define SIP_PAGE2_UDPTL_DESTINATION (1 << 30) /*!< DP: Use source IP of RTP as destination if NAT is enabled */
+#define SIP_PAGE2_VIDEOSUPPORT_ALWAYS (1 << 31) /*!< DP: Always set up video, even if endpoints don't support it */
#define SIP_PAGE2_FLAGS_TO_COPY \
(SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_VIDEOSUPPORT | \
SIP_PAGE2_T38SUPPORT | SIP_PAGE2_RFC2833_COMPENSATE | SIP_PAGE2_BUGGY_MWI | \
- SIP_PAGE2_TEXTSUPPORT | SIP_PAGE2_UDPTL_DESTINATION)
+ SIP_PAGE2_TEXTSUPPORT | SIP_PAGE2_UDPTL_DESTINATION | \
+ SIP_PAGE2_VIDEOSUPPORT_ALWAYS)
/*@}*/
@@ -4147,7 +4149,10 @@
ast_copy_flags(&dialog->flags[0], &peer->flags[0], SIP_FLAGS_TO_COPY);
ast_copy_flags(&dialog->flags[1], &peer->flags[1], SIP_PAGE2_FLAGS_TO_COPY);
dialog->capability = peer->capability;
- if ((!ast_test_flag(&dialog->flags[1], SIP_PAGE2_VIDEOSUPPORT) || !(dialog->capability & AST_FORMAT_VIDEO_MASK)) && dialog->vrtp) {
+ if (!ast_test_flag(&dialog->flags[1], SIP_PAGE2_VIDEOSUPPORT_ALWAYS) &&
+ (!ast_test_flag(&dialog->flags[1], SIP_PAGE2_VIDEOSUPPORT) ||
+ !(dialog->capability & AST_FORMAT_VIDEO_MASK)) &&
+ dialog->vrtp) {
ast_rtp_destroy(dialog->vrtp);
dialog->vrtp = NULL;
}
@@ -5509,7 +5514,9 @@
We also check for vrtp. If it's not there, we are not allowed do any video anyway.
*/
if (i->vrtp) {
- if (i->prefcodec)
+ if (ast_test_flag(&i->flags[1], SIP_PAGE2_VIDEOSUPPORT))
+ needvideo = AST_FORMAT_VIDEO_MASK;
+ else if (i->prefcodec)
needvideo = i->prefcodec & AST_FORMAT_VIDEO_MASK; /* Outbound call */
else
needvideo = i->jointcapability & AST_FORMAT_VIDEO_MASK; /* Inbound call */
@@ -11793,7 +11800,10 @@
if (p->peercapability)
p->jointcapability &= p->peercapability;
p->maxcallbitrate = peer->maxcallbitrate;
- if ((!ast_test_flag(&p->flags[1], SIP_PAGE2_VIDEOSUPPORT) || !(p->capability & AST_FORMAT_VIDEO_MASK)) && p->vrtp) {
+ if (!ast_test_flag(&p->flags[1], SIP_PAGE2_VIDEOSUPPORT_ALWAYS) &&
+ (!ast_test_flag(&p->flags[1], SIP_PAGE2_VIDEOSUPPORT) ||
+ !(p->capability & AST_FORMAT_VIDEO_MASK)) &&
+ p->vrtp) {
ast_rtp_destroy(p->vrtp);
p->vrtp = NULL;
}
@@ -20008,8 +20018,13 @@
ast_set_flag(&mask[0], SIP_PROMISCREDIR);
ast_set2_flag(&flags[0], ast_true(v->value), SIP_PROMISCREDIR);
} else if (!strcasecmp(v->name, "videosupport")) {
- ast_set_flag(&mask[1], SIP_PAGE2_VIDEOSUPPORT);
- ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_VIDEOSUPPORT);
+ if (!strcasecmp(v->value, "always")) {
+ ast_set_flag(&mask[1], SIP_PAGE2_VIDEOSUPPORT_ALWAYS);
+ ast_set_flag(&flags[1], SIP_PAGE2_VIDEOSUPPORT_ALWAYS);
+ } else {
+ ast_set_flag(&mask[1], SIP_PAGE2_VIDEOSUPPORT);
+ ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_VIDEOSUPPORT);
+ }
} else if (!strcasecmp(v->name, "textsupport")) {
ast_set_flag(&mask[1], SIP_PAGE2_TEXTSUPPORT);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_TEXTSUPPORT);
@@ -20936,7 +20951,7 @@
/* Copy the default jb config over global_jbconf */
memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf));
- ast_clear_flag(&global_flags[1], SIP_PAGE2_VIDEOSUPPORT);
+ ast_clear_flag(&global_flags[1], SIP_PAGE2_VIDEOSUPPORT | SIP_PAGE2_VIDEOSUPPORT_ALWAYS);
ast_clear_flag(&global_flags[1], SIP_PAGE2_TEXTSUPPORT);
Modified: trunk/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/sip.conf.sample?view=diff&rev=130951&r1=130950&r2=130951
==============================================================================
--- trunk/configs/sip.conf.sample (original)
+++ trunk/configs/sip.conf.sample Tue Jul 15 11:20:35 2008
@@ -211,11 +211,17 @@
;compactheaders = yes ; send compact sip headers.
;
-;videosupport=yes ; Turn on support for SIP video. You need to turn this on
- ; in the this section to get any video support at all.
- ; You can turn it off on a per peer basis if the general
- ; video support is enabled, but you can't enable it for
- ; one peer only without enabling in the general section.
+;videosupport=yes ; Turn on support for SIP video. You need to turn this
+ ; on in this section to get any video support at all.
+ ; You can turn it off on a per peer basis if the general
+ ; video support is enabled, but you can't enable it for
+ ; one peer only without enabling in the general section.
+ ; If you set videosupport to "always", then RTP ports will
+ ; always be set up for video, even on clients that don't
+ ; support it. This assists callfile-derived calls and
+ ; certain transferred calls to use always use video when
+ ; available. [yes|NO|always]
+
;maxcallbitrate=384 ; Maximum bitrate for video calls (default 384 kb/s)
; Videosupport and maxcallbitrate is settable
; for peers and users as well
More information about the svn-commits
mailing list