[asterisk-commits] oej: branch 1.4 r46992 -
/branches/1.4/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Nov 2 11:26:57 MST 2006
Author: oej
Date: Thu Nov 2 12:26:57 2006
New Revision: 46992
URL: http://svn.digium.com/view/asterisk?rev=46992&view=rev
Log:
Disable code for T38 over TCP and RTP since there's no trace of actual functionality for it :-)
Modified:
branches/1.4/channels/chan_sip.c
Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?rev=46992&r1=46991&r2=46992&view=diff
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Thu Nov 2 12:26:57 2006
@@ -759,8 +759,8 @@
#define SIP_PAGE2_INC_RINGING (1 << 19) /*!< Did this connection increment the counter of in-use calls? */
#define SIP_PAGE2_T38SUPPORT (7 << 20) /*!< T38 Fax Passthrough Support */
#define SIP_PAGE2_T38SUPPORT_UDPTL (1 << 20) /*!< 20: T38 Fax Passthrough Support */
-#define SIP_PAGE2_T38SUPPORT_RTP (2 << 20) /*!< 21: T38 Fax Passthrough Support */
-#define SIP_PAGE2_T38SUPPORT_TCP (4 << 20) /*!< 22: T38 Fax Passthrough Support */
+#define SIP_PAGE2_T38SUPPORT_RTP (2 << 20) /*!< 21: T38 Fax Passthrough Support (not implemented) */
+#define SIP_PAGE2_T38SUPPORT_TCP (4 << 20) /*!< 22: T38 Fax Passthrough Support (not implemented) */
#define SIP_PAGE2_CALL_ONHOLD (3 << 23) /*!< Call states */
#define SIP_PAGE2_CALL_ONHOLD_ONEDIR (1 << 23) /*!< 23: One directional hold */
#define SIP_PAGE2_CALL_ONHOLD_INACTIVE (2 << 24) /*!< 24: Inactive */
@@ -6047,10 +6047,12 @@
ast_log(LOG_DEBUG, "** Our prefcodec: %s \n", ast_getformatname_multiple(codecbuf, sizeof(codecbuf), p->prefcodec));
}
+#ifdef WHEN_WE_HAVE_T38_FOR_OTHER_TRANSPORTS
if (ast_test_flag(&p->t38.t38support, SIP_PAGE2_T38SUPPORT_RTP)) {
ast_build_string(&m_audio_next, &m_audio_left, " %d", 191);
ast_build_string(&a_audio_next, &a_audio_left, "a=rtpmap:%d %s/%d\r\n", 191, "t38", 8000);
}
+#endif
/* Check if we need video in this call */
if ((capability & AST_FORMAT_VIDEO_MASK) && !ast_test_flag(&p->flags[0], SIP_NOVIDEO)) {
@@ -9854,8 +9856,10 @@
ast_cli(fd, " Nat : %s\n", nat2str(ast_test_flag(&peer->flags[0], SIP_NAT)));
ast_cli(fd, " ACL : %s\n", (peer->ha?"Yes":"No"));
ast_cli(fd, " T38 pt UDPTL : %s\n", ast_test_flag(&peer->flags[1], SIP_PAGE2_T38SUPPORT_UDPTL)?"Yes":"No");
+#ifdef WHEN_WE_HAVE_T38_FOR_OTHER_TRANSPORTS
ast_cli(fd, " T38 pt RTP : %s\n", ast_test_flag(&peer->flags[1], SIP_PAGE2_T38SUPPORT_RTP)?"Yes":"No");
ast_cli(fd, " T38 pt TCP : %s\n", ast_test_flag(&peer->flags[1], SIP_PAGE2_T38SUPPORT_TCP)?"Yes":"No");
+#endif
ast_cli(fd, " CanReinvite : %s\n", ast_test_flag(&peer->flags[0], SIP_CAN_REINVITE)?"Yes":"No");
ast_cli(fd, " PromiscRedir : %s\n", ast_test_flag(&peer->flags[0], SIP_PROMISCREDIR)?"Yes":"No");
ast_cli(fd, " User=Phone : %s\n", ast_test_flag(&peer->flags[0], SIP_USEREQPHONE)?"Yes":"No");
@@ -10112,8 +10116,10 @@
ast_cli(fd, " IP ToS RTP audio: %s\n", ast_tos2str(global_tos_audio));
ast_cli(fd, " IP ToS RTP video: %s\n", ast_tos2str(global_tos_video));
ast_cli(fd, " T38 fax pt UDPTL: %s\n", ast_test_flag(&global_flags[1], SIP_PAGE2_T38SUPPORT_UDPTL) ? "Yes" : "No");
+#ifdef WHEN_WE_HAVE_T38_FOR_OTHER_TRANSPORTS
ast_cli(fd, " T38 fax pt RTP: %s\n", ast_test_flag(&global_flags[1], SIP_PAGE2_T38SUPPORT_RTP) ? "Yes" : "No");
ast_cli(fd, " T38 fax pt TCP: %s\n", ast_test_flag(&global_flags[1], SIP_PAGE2_T38SUPPORT_TCP) ? "Yes" : "No");
+#endif
ast_cli(fd, " RFC2833 Compensation: %s\n", ast_test_flag(&global_flags[1], SIP_PAGE2_RFC2833_COMPENSATE) ? "Yes" : "No");
if (!realtimepeers && !realtimeusers)
ast_cli(fd, " SIP realtime: Disabled\n" );
@@ -15137,12 +15143,14 @@
} else if (!strcasecmp(v->name, "t38pt_udptl")) {
ast_set_flag(&mask[1], SIP_PAGE2_T38SUPPORT_UDPTL);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_UDPTL);
+#ifdef WHEN_WE_HAVE_T38_FOR_OTHER_TRANSPORTS
} else if (!strcasecmp(v->name, "t38pt_rtp")) {
ast_set_flag(&mask[1], SIP_PAGE2_T38SUPPORT_RTP);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_RTP);
} else if (!strcasecmp(v->name, "t38pt_tcp")) {
ast_set_flag(&mask[1], SIP_PAGE2_T38SUPPORT_TCP);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_TCP);
+#endif
} else if (!strcasecmp(v->name, "rfc2833compensate")) {
ast_set_flag(&mask[1], SIP_PAGE2_RFC2833_COMPENSATE);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_RFC2833_COMPENSATE);
@@ -15405,10 +15413,12 @@
user->maxcallbitrate = default_maxcallbitrate;
} else if (!strcasecmp(v->name, "t38pt_udptl")) {
ast_set2_flag(&user->flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_UDPTL);
+#ifdef WHEN_WE_HAVE_T38_FOR_OTHER_TRANSPORTS
} else if (!strcasecmp(v->name, "t38pt_rtp")) {
ast_set2_flag(&user->flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_RTP);
} else if (!strcasecmp(v->name, "t38pt_tcp")) {
ast_set2_flag(&user->flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_TCP);
+#endif
}
}
ast_copy_flags(&user->flags[0], &userflags[0], mask[0].flags);
@@ -15707,10 +15717,12 @@
peer->maxcallbitrate = default_maxcallbitrate;
} else if (!strcasecmp(v->name, "t38pt_udptl")) {
ast_set2_flag(&peer->flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_UDPTL);
+#ifdef WHEN_WE_HAVE_T38_FOR_OTHER_TRANSPORTS
} else if (!strcasecmp(v->name, "t38pt_rtp")) {
ast_set2_flag(&peer->flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_RTP);
} else if (!strcasecmp(v->name, "t38pt_tcp")) {
ast_set2_flag(&peer->flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_TCP);
+#endif
}
}
if (!ast_test_flag(&global_flags[1], SIP_PAGE2_IGNOREREGEXPIRE) && ast_test_flag(&peer->flags[1], SIP_PAGE2_DYNAMIC) && realtime) {
@@ -16084,6 +16096,7 @@
if (ast_true(v->value)) {
ast_set_flag(&global_flags[1], SIP_PAGE2_T38SUPPORT_UDPTL);
}
+#ifdef WHEN_WE_HAVE_T38_FOR_OTHER_TRANSPORTS
} else if (!strcasecmp(v->name, "t38pt_rtp")) { /* XXX maybe ast_set2_flags ? */
if (ast_true(v->value)) {
ast_set_flag(&global_flags[1], SIP_PAGE2_T38SUPPORT_RTP);
@@ -16092,6 +16105,7 @@
if (ast_true(v->value)) {
ast_set_flag(&global_flags[1], SIP_PAGE2_T38SUPPORT_TCP);
}
+#endif
} else if (!strcasecmp(v->name, "rfc2833compensate")) { /* XXX maybe ast_set2_flags ? */
if (ast_true(v->value)) {
ast_set_flag(&global_flags[1], SIP_PAGE2_RFC2833_COMPENSATE);
More information about the asterisk-commits
mailing list