}
if (sofia_test_flag(tech_pvt, TFLAG_NAT) ||
- (val = switch_channel_get_variable(channel, "sip-force-contact")) ||
+ switch_channel_get_variable(channel, "sip-force-contact") ||
((val = switch_channel_get_variable(channel, "sip_sticky_contact")) && switch_true(val))) {
sticky = tech_pvt->record_route;
session_timeout = SOFIA_NAT_SESSION_TIMEOUT;
if (sofia_test_flag(tech_pvt, TFLAG_NAT) ||
- (val = switch_channel_get_variable(channel, "sip-force-contact")) ||
+ switch_channel_get_variable(channel, "sip-force-contact") ||
((val = switch_channel_get_variable(channel, "sip_sticky_contact")) && switch_true(val))) {
sticky = tech_pvt->record_route;
switch_channel_set_variable(channel, "sip_nat_detected", "true");
{
char *argv[4];
char *mydata;
- int argc;
sofia_gateway_t *gateway;
char *gwname, *param, *varname;
const char *val = NULL;
return SWITCH_STATUS_FALSE;
}
- if (!(argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0])))) || !argv[0]) {
+ if (!switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0]))) || !argv[0]) {
goto end;
}
switch_size_t enclen = 0;
int mod = 0;
- if (!(e = strchr(p, '@'))) {
+ if (!strchr(p, '@')) {
return 0;
}
if (switch_channel_test_flag(tech_pvt->channel, CF_SLA_BARGING)) {
const char *bargee_uuid = switch_channel_get_variable(channel, "sip_barging_uuid");
switch_core_session_t *bargee_session;
- uint32_t ttl = 0;
if ((bargee_session = switch_core_session_locate(bargee_uuid))) {
//switch_channel_t *bargee_channel = switch_core_session_get_channel(bargee_session);
- if ((ttl = switch_core_media_bug_count(bargee_session, "eavesdrop")) == 1) {
+ /* Checking ttl */
+ if (switch_core_media_bug_count(bargee_session, "eavesdrop") == 1) {
if (switch_core_session_check_interface(bargee_session, sofia_endpoint_interface)) {
switch_channel_clear_flag(switch_core_session_get_channel(bargee_session), CF_SLA_BARGE);
}
}
switch_mutex_lock(mod_sofia_globals.hash_mutex);
- if ((gp = switch_core_hash_find(mod_sofia_globals.gateway_hash, name)) && (gp = switch_core_hash_find(mod_sofia_globals.gateway_hash, pkey)) && !gp->deleted) {
+ if (switch_core_hash_find(mod_sofia_globals.gateway_hash, name) && (gp = switch_core_hash_find(mod_sofia_globals.gateway_hash, pkey)) && !gp->deleted) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Ignoring duplicate gateway '%s'\n", name);
switch_mutex_unlock(mod_sofia_globals.hash_mutex);
free(pkey);
}
if (sofia_test_pflag(profile, PFLAG_MANUAL_REDIRECT)) {
- if (!(v = switch_channel_get_variable(channel, "outbound_redirect_info"))) {
+ if (!switch_channel_get_variable(channel, "outbound_redirect_info")) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Redirect: Transfering to %s %s %s\n",
p_contact->m_url->url_user, sip_redirect_dialplan, sip_redirect_context);
char *cmd = strdup(sip->sip_payload->pl_data);
char *arg;
switch_stream_handle_t stream = { 0 };
- switch_status_t status;
switch_assert(cmd);
SWITCH_STANDARD_STREAM(stream);
*arg++ = '\0';
}
- if ((status = switch_api_execute(cmd, arg, NULL, &stream)) == SWITCH_STATUS_SUCCESS) {
+ if (switch_api_execute(cmd, arg, NULL, &stream) == SWITCH_STATUS_SUCCESS) {
nua_respond(nh, SIP_200_OK, SIPTAG_CONTENT_TYPE_STR("freeswitch/api-response"),
SIPTAG_PAYLOAD_STR(stream.data), NUTAG_WITH_THIS_MSG(de->data->e_msg),
TAG_IF(!zstr(session_id_header), SIPTAG_HEADER_STR(session_id_header)),
if (x1 == 0) {
switch_channel_set_variable(channel, "sip_req_user", argv1[0]);
} else {
- int argc2 = 0;
char *argv2[2] = { 0 };
- if ((argc2 = switch_separate_string(argv1[x1], '=', argv2, (sizeof(argv2) / sizeof(argv2[0])))) == 2) {
+ if (switch_separate_string(argv1[x1], '=', argv2, (sizeof(argv2) / sizeof(argv2[0]))) == 2) {
char *var_name = NULL;
var_name = switch_mprintf("sip_invite_%s", argv2[0]);
switch_channel_set_variable(channel, var_name, argv2[1]);
const char *exclude_regex = NULL;
switch_regex_t *re = NULL;
int ovector[30] = {0};
- int proceed;
exclude_regex = switch_channel_get_variable(channel, "exclude_outgoing_extra_header");
SWITCH_STANDARD_STREAM(stream);
}
if (!strncasecmp(name, prefix, strlen(prefix))) {
- if ( !exclude_regex || !(proceed = switch_regex_perform(name, exclude_regex, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
+ if ( !exclude_regex || !(/*proceed*/ switch_regex_perform(name, exclude_regex, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
const char *hname = name + strlen(prefix);
stream.write_function(&stream, "%s: %s\r\n", hname, value);
switch_regex_safe_free(re);
switch_status_t sofia_media_tech_media(private_object_t *tech_pvt, const char *r_sdp, switch_sdp_type_t type)
{
- uint8_t match = 0;
-
switch_assert(tech_pvt != NULL);
switch_assert(r_sdp != NULL);
return SWITCH_STATUS_FALSE;
}
- if ((match = sofia_media_negotiate_sdp(tech_pvt->session, r_sdp, type))) {
+ if (sofia_media_negotiate_sdp(tech_pvt->session, r_sdp, type)) {
if (switch_core_media_choose_port(tech_pvt->session, SWITCH_MEDIA_TYPE_AUDIO, 0) != SWITCH_STATUS_SUCCESS) {
return SWITCH_STATUS_FALSE;
}
static void actual_sofia_presence_mwi_event_handler(switch_event_t *event)
{
- char *account, *dup_account, *yn, *host = NULL, *user;
+ char *account, *dup_account, *host = NULL, *user;
char *sql;
sofia_profile_t *profile = NULL;
switch_stream_handle_t stream = { 0 };
return;
}
- if (!(yn = switch_event_get_header(event, "mwi-messages-waiting"))) {
+ if (!switch_event_get_header(event, "mwi-messages-waiting")) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing required Header 'MWI-Messages-Waiting'\n");
return;
}