[asterisk-commits] branch oej/t38passthrough r15329 -
/team/oej/t38passthrough/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Mar 27 14:57:02 MST 2006
Author: oej
Date: Mon Mar 27 15:57:01 2006
New Revision: 15329
URL: http://svn.digium.com/view/asterisk?rev=15329&view=rev
Log:
- using handle_common_options to set the T38 flags properly
Modified:
team/oej/t38passthrough/channels/chan_sip.c
Modified: team/oej/t38passthrough/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/t38passthrough/channels/chan_sip.c?rev=15329&r1=15328&r2=15329&view=diff
==============================================================================
--- team/oej/t38passthrough/channels/chan_sip.c (original)
+++ team/oej/t38passthrough/channels/chan_sip.c Mon Mar 27 15:57:01 2006
@@ -12722,6 +12722,15 @@
} else if (!strcasecmp(v->name, "allowsubscribe")) {
ast_set_flag(&mask[1], SIP_PAGE2_ALLOWSUBSCRIBE);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_ALLOWSUBSCRIBE);
+ } 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);
+ } 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);
}
return res;
@@ -12966,21 +12975,6 @@
user->callingpres = ast_parse_caller_presentation(v->value);
if (user->callingpres == -1)
user->callingpres = atoi(v->value);
- } else if (!strcasecmp(v->name, "t38pt_udptl")) {
- if (ast_true(v->value)) {
- ast_set_flag(&user->flags[1], SIP_PAGE2_T38SUPPORT_UDPTL);
- } else
- ast_clear_flag(&user->flags[1], SIP_PAGE2_T38SUPPORT_UDPTL);
- } else if (!strcasecmp(v->name, "t38pt_rtp")) {
- if (ast_true(v->value)) {
- ast_set_flag(&user->flags[1], SIP_PAGE2_T38SUPPORT_RTP);
- } else
- ast_clear_flag(&user->flags[1], SIP_PAGE2_T38SUPPORT_RTP);
- } else if (!strcasecmp(v->name, "t38pt_tcp")) {
- if (ast_true(v->value)) {
- ast_set_flag(&user->flags[1], SIP_PAGE2_T38SUPPORT_TCP);
- } else
- ast_clear_flag(&user->flags[1], SIP_PAGE2_T38SUPPORT_TCP);
} else if (!strcasecmp(v->name, "maxcallbitrate")) {
user->maxcallbitrate = atoi(v->value);
if (user->maxcallbitrate < 0)
@@ -13239,21 +13233,6 @@
ast_log(LOG_WARNING, "'%s' is not a valid RTP keepalive time at line %d. Using default.\n", v->value, v->lineno);
peer->rtpkeepalive = global_rtpkeepalive;
}
- } else if (!strcasecmp(v->name, "t38pt_udptl")) {
- if (ast_true(v->value)) {
- ast_set_flag(&peer->flags[1], SIP_PAGE2_T38SUPPORT_UDPTL);
- } else
- ast_clear_flag(&peer->flags[1], SIP_PAGE2_T38SUPPORT_UDPTL);
- } else if (!strcasecmp(v->name, "t38pt_rtp")) {
- if (ast_true(v->value)) {
- ast_set_flag(&peer->flags[1], SIP_PAGE2_T38SUPPORT_RTP);
- } else
- ast_clear_flag(&peer->flags[1], SIP_PAGE2_T38SUPPORT_RTP);
- } else if (!strcasecmp(v->name, "t38pt_tcp")) {
- if (ast_true(v->value)) {
- ast_set_flag(&peer->flags[1], SIP_PAGE2_T38SUPPORT_TCP);
- } else
- ast_clear_flag(&peer->flags[1], SIP_PAGE2_T38SUPPORT_TCP);
} else if (!strcasecmp(v->name, "setvar")) {
/* Set peer channel variable */
varname = ast_strdupa(v->value);
@@ -13457,18 +13436,6 @@
if ((sscanf(v->value, "%d", &global_rtpkeepalive) != 1) || (global_rtpkeepalive < 0)) {
ast_log(LOG_WARNING, "'%s' is not a valid RTP keepalive time at line %d. Using default.\n", v->value, v->lineno);
global_rtpkeepalive = 0;
- }
- } else if (!strcasecmp(v->name, "t38pt_udptl")) {
- if (ast_true(v->value)) {
- ast_set_flag(&global_flags[1], SIP_PAGE2_T38SUPPORT_UDPTL);
- }
- } else if (!strcasecmp(v->name, "t38pt_rtp")) {
- if (ast_true(v->value)) {
- ast_set_flag(&global_flags[1], SIP_PAGE2_T38SUPPORT_RTP);
- }
- } else if (!strcasecmp(v->name, "t38pt_tcp")) {
- if (ast_true(v->value)) {
- ast_set_flag(&global_flags[1], SIP_PAGE2_T38SUPPORT_TCP);
}
} else if (!strcasecmp(v->name, "compactheaders")) {
compactheaders = ast_true(v->value);
More information about the asterisk-commits
mailing list