[asterisk-commits] branch oej/t38passthrough r11885 - in
/team/oej/t38passthrough: channels/ res/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Mar 5 06:33:37 MST 2006
Author: oej
Date: Sun Mar 5 07:33:31 2006
New Revision: 11885
URL: http://svn.digium.com/view/asterisk?rev=11885&view=rev
Log:
Starting to implement peer options for T38 passthrough
Modified:
team/oej/t38passthrough/channels/chan_sip.c
team/oej/t38passthrough/res/Makefile
Modified: team/oej/t38passthrough/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/t38passthrough/channels/chan_sip.c?rev=11885&r1=11884&r2=11885&view=diff
==============================================================================
--- team/oej/t38passthrough/channels/chan_sip.c (original)
+++ team/oej/t38passthrough/channels/chan_sip.c Sun Mar 5 07:33:31 2006
@@ -651,6 +651,12 @@
#define SIP_PAGE2_DEBUG_CONSOLE (1 << 6)
#define SIP_PAGE2_DYNAMIC (1 << 7) /*!< Dynamic Peers register with Asterisk */
#define SIP_PAGE2_SELFDESTRUCT (1 << 8) /*!< Automatic peers need to destruct themselves */
+#define SIP_PAGE2_T38SUPPORT_UDPTL (1 << 15) /*!< T38 Fax Passthrough Support */
+#define SIP_PAGE2_T38SUPPORT_RTP (1 << 16) /*!< T38 Fax Passthrough Support */
+#define SIP_PAGE2_T38SUPPORT_TCP (1 << 16) /*!< T38 Fax Passthrough Support */
+
+#define SIP_PAGE2_FLAGS_TO_COPY \
+ (SIP_PAGE2_T38SUPPORT_RTP | SIP_PAGE2_T38SUPPORT_UDPTL | SIP_PAGE2_T38SUPPORT_TCP)
/* SIP packet flags */
#define SIP_PKT_DEBUG (1 << 0) /*!< Debug this packet */
@@ -8327,6 +8333,11 @@
"IPport: %d\r\n"
"Dynamic: %s\r\n"
"Natsupport: %s\r\n"
+#ifdef T38_SUPPORT
+ "T38pt_support_udptl: %s\r\n"
+ "T38pt_support_rtp: %s\r\n"
+ "T38pt_support_tcp: %s\r\n"
+#endif
"ACL: %s\r\n"
"Status: %s\r\n\r\n",
idtext,
@@ -8335,6 +8346,11 @@
ntohs(iterator->addr.sin_port),
ast_test_flag((&iterator->flags_page2), SIP_PAGE2_DYNAMIC) ? "yes" : "no", /* Dynamic or not? */
(ast_test_flag(iterator, SIP_NAT) & SIP_NAT_ROUTE) ? "yes" : "no", /* NAT=yes? */
+#ifdef T38_SUPPORT
+ ast_test_flag((&iterator->flags_page2), SIP_PAGE2_T38SUPPORT_UDPTL) ? "yes" : "no", /* Dynamic or not? */
+ ast_test_flag((&iterator->flags_page2), SIP_PAGE2_T38SUPPORT_RTP) ? "yes" : "no", /* Dynamic or not? */
+ ast_test_flag((&iterator->flags_page2), SIP_PAGE2_T38SUPPORT_TCP) ? "yes" : "no", /* Dynamic or not? */
+#endif
iterator->ha ? "yes" : "no", /* permit/deny */
status);
}
@@ -8717,6 +8733,11 @@
ast_cli(fd, " User=Phone : %s\n", (ast_test_flag(peer, SIP_USEREQPHONE)?"Yes":"No"));
ast_cli(fd, " Trust RPID : %s\n", (ast_test_flag(peer, SIP_TRUSTRPID) ? "Yes" : "No"));
ast_cli(fd, " Send RPID : %s\n", (ast_test_flag(peer, SIP_SENDRPID) ? "Yes" : "No"));
+#ifdef T38_SUPPORT
+ ast_cli(fd, " T38 pt UDPTL: %s\n", (ast_test_flag((&peer->flags_page2), SIP_PAGE2_T38SUPPORT_UDPTL)?"Yes":"No"));
+ ast_cli(fd, " T38 pt RTP : %s\n", (ast_test_flag((&peer->flags_page2), SIP_PAGE2_T38SUPPORT_RTP)?"Yes":"No"));
+ ast_cli(fd, " T38 pt TCP : %s\n", (ast_test_flag((&peer->flags_page2), SIP_PAGE2_T38SUPPORT_TCP)?"Yes":"No"));
+#endif
/* - is enumerated */
ast_cli(fd, " DTMFmode : %s\n", dtmfmode2str(ast_test_flag(peer, SIP_DTMF)));
@@ -8791,6 +8812,11 @@
ast_cli(fd, "SIP-CanReinvite: %s\r\n", (ast_test_flag(peer, SIP_CAN_REINVITE)?"Y":"N"));
ast_cli(fd, "SIP-PromiscRedir: %s\r\n", (ast_test_flag(peer, SIP_PROMISCREDIR)?"Y":"N"));
ast_cli(fd, "SIP-UserPhone: %s\r\n", (ast_test_flag(peer, SIP_USEREQPHONE)?"Y":"N"));
+#ifdef T38_SUPPORT
+ ast_cli(fd, "SIP-T38pt-support-udptl: %s\r\n", (ast_test_flag((&peer->flags_page2), SIP_PAGE2_T38SUPPORT_UDPTL)?"Y":"N"));
+ ast_cli(fd, "SIP-T38pt-support-rtp: %s\r\n", (ast_test_flag((&peer->flags_page2), SIP_PAGE2_T38SUPPORT_RTP)?"Y":"N"));
+ ast_cli(fd, "SIP-T38pt-support-tcp: %s\r\n", (ast_test_flag((&peer->flags_page2), SIP_PAGE2_T38SUPPORT_TCP)?"Y":"N"));
+#endif
/* - is enumerated */
ast_cli(fd, "SIP-DTMFmode %s\r\n", dtmfmode2str(ast_test_flag(peer, SIP_DTMF)));
@@ -8954,6 +8980,13 @@
ast_cli(fd, " Record SIP history: %s\n", recordhistory ? "On" : "Off");
ast_cli(fd, " Call Events: %s\n", global_callevents ? "On" : "Off");
ast_cli(fd, " IP ToS: 0x%x\n", global_tos);
+#ifdef T38_SUPPORT
+ ast_cli(fd, " T38 fax pt UDPTL: %s\n", ast_test_flag(&global_flags_page2, SIP_PAGE2_T38SUPPORT_UDPTL) ? "Yes" : "No");
+ ast_cli(fd, " T38 fax pt RTP: %s\n", ast_test_flag(&global_flags_page2, SIP_PAGE2_T38SUPPORT_RTP) ? "Yes" : "No");
+ ast_cli(fd, " T38 fax pt TCP: %s\n", ast_test_flag(&global_flags_page2, SIP_PAGE2_T38SUPPORT_TCP) ? "Yes" : "No");
+#else
+ ast_cli(fd, " T38 passthrough supp.: %s\n", "Disabled");
+#endif
#ifdef OSP_SUPPORT
ast_cli(fd, " OSP Support: Yes\n");
#else
@@ -12816,6 +12849,7 @@
peer->expire = -1;
peer->pokeexpire = -1;
ast_copy_flags(peer, &global_flags, SIP_FLAGS_TO_COPY);
+ ast_copy_flags((&peer->flags_page2), &global_flags_page2, SIP_PAGE2_FLAGS_TO_COPY);
strcpy(peer->context, default_context);
strcpy(peer->subscribecontext, default_subscribecontext);
strcpy(peer->language, default_language);
@@ -13254,11 +13288,20 @@
global_videosupport = ast_true(v->value);
#if defined(T38_SUPPORT)
} else if (!strcasecmp(v->name, "global_t38udptl_support")) {
- global_t38udptl_support = ast_true(v->value);
+ if (ast_true(v->value)) {
+ global_t38udptl_support = TRUE;
+ ast_set_flag(&global_flags_page2, SIP_PAGE2_T38SUPPORT_UDPTL);
+ }
} else if (!strcasecmp(v->name, "global_t38rtp_support")) {
- global_t38rtp_support = ast_true(v->value);
+ if (ast_true(v->value)) {
+ global_t38rtp_support = TRUE;
+ ast_set_flag(&global_flags_page2, SIP_PAGE2_T38SUPPORT_RTP);
+ }
} else if (!strcasecmp(v->name, "global_t38tcp_support")) {
- global_t38tcp_support = ast_true(v->value);
+ if (ast_true(v->value)) {
+ global_t38tcp_support = TRUE;
+ ast_set_flag(&global_flags_page2, SIP_PAGE2_T38SUPPORT_TCP);
+ }
#endif
} else if (!strcasecmp(v->name, "compactheaders")) {
compactheaders = ast_true(v->value);
Modified: team/oej/t38passthrough/res/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/t38passthrough/res/Makefile?rev=11885&r1=11884&r2=11885&view=diff
==============================================================================
--- team/oej/t38passthrough/res/Makefile (original)
+++ team/oej/t38passthrough/res/Makefile Sun Mar 5 07:33:31 2006
@@ -32,7 +32,7 @@
MODS:=$(filter-out res_osp.so,$(MODS))
endif
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/net-snmp/net-snmp-config.h),)
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/xusr/include/net-snmp/net-snmp-config.h),)
MODS:=$(filter-out res_snmp.so,$(MODS))
else
SNMP_LDLIBS+=$(shell net-snmp-config --agent-libs)
More information about the asterisk-commits
mailing list