if (handle_t38_options(&peerflags[0], &mask[0], v, &peer->t38_maxdatagram)) {
continue;
}
- if (!strcasecmp(v->name, "transport") && !ast_strlen_zero(v->value)) {
+ if (!strcasecmp(v->name, "transport")) {
char *val = ast_strdupa(v->value);
char *trans;
+ peer->transports = peer->default_outbound_transport = 0;
while ((trans = strsep(&val, ","))) {
trans = ast_skip_blanks(trans);
} else if (default_tls_cfg.enabled && !strncasecmp(trans, "tls", 3)) {
peer->transports |= SIP_TRANSPORT_TLS;
} else if (!strncasecmp(trans, "tcp", 3) || !strncasecmp(trans, "tls", 3)) {
- ast_log(LOG_WARNING, "'%.3s' is not a valid transport type when %.3senabled=no. If no other is specified, the defaults from general will be used.\n", trans, trans);
+ ast_log(LOG_WARNING, "'%.3s' is not a valid transport type when %.3senable=no. If no other is specified, the defaults from general will be used.\n", trans, trans);
} else {
ast_log(LOG_NOTICE, "'%s' is not a valid transport type. if no other is specified, the defaults from general will be used.\n", trans);
}
memset(&default_prefs, 0 , sizeof(default_prefs));
memset(&sip_cfg.outboundproxy, 0, sizeof(struct sip_proxy));
sip_cfg.outboundproxy.force = FALSE; /*!< Don't force proxy usage, use route: headers */
- default_transports = 0; /*!< Reset default transport to zero here, default value later on */
- default_primary_transport = 0; /*!< Reset default primary transport to zero here, default value later on */
+ default_transports = SIP_TRANSPORT_UDP;
+ default_primary_transport = SIP_TRANSPORT_UDP;
ourport_tcp = STANDARD_SIP_PORT;
ourport_tls = STANDARD_TLS_PORT;
externtcpport = STANDARD_SIP_PORT;
timerb_set = 1;
} else if (!strcasecmp(v->name, "t1min")) {
global_t1min = atoi(v->value);
- } else if (!strcasecmp(v->name, "transport") && !ast_strlen_zero(v->value)) {
+ } else if (!strcasecmp(v->name, "transport")) {
char *val = ast_strdupa(v->value);
char *trans;
+ default_transports = default_primary_transport = 0;
while ((trans = strsep(&val, ","))) {
trans = ast_skip_blanks(trans);