#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)
/*@}*/
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;
}
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 */
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;
}
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);
/* 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);
;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