FS-6140 --resolve

This commit is contained in:
Anthony Minessale 2014-01-23 02:13:10 +05:00
parent fadad7995c
commit 643c88f49b
4 changed files with 14 additions and 1 deletions

View File

@ -182,6 +182,8 @@
<!--<param name="all-reg-options-ping" value="true"/>-->
<!-- Send an OPTIONS packet to NATed registered endpoints. Can be 'true' or 'udp-only'. -->
<!--<param name="nat-options-ping" value="true"/>-->
<!--<param name="sip-options-respond-503-on-busy" value="true"/>-->
<!--<param name="sip-messages-respond-200-ok" value="true"/>-->
<!-- TLS: disabled by default, set to "true" to enable -->
<param name="tls" value="$${internal_ssl_enable}"/>

View File

@ -269,6 +269,7 @@ typedef enum {
PFLAG_TCP_KEEPALIVE,
PFLAG_TCP_PINGPONG,
PFLAG_TCP_PING2PONG,
PFLAG_MESSAGES_RESPOND_200_OK,
/* No new flags below this line */
PFLAG_MAX
} PFLAGS;

View File

@ -3838,6 +3838,12 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
} else if (!strcasecmp(var, "tcp-ping2pong") && !zstr(val)) {
profile->tcp_ping2pong = atoi(val);
sofia_set_pflag(profile, PFLAG_TCP_PING2PONG);
} else if (!strcasecmp(var, "sip-messages-respond-200-ok") && !zstr(val)) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_MESSAGES_RESPOND_200_OK);
} else {
sofia_clear_pflag(profile, PFLAG_MESSAGES_RESPOND_200_OK);
}
} else if (!strcasecmp(var, "odbc-dsn") && !zstr(val)) {
profile->odbc_dsn = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "db-pre-trans-execute") && !zstr(val)) {

View File

@ -4783,7 +4783,11 @@ void sofia_presence_handle_sip_i_message(int status,
end:
nua_respond(nh, SIP_202_ACCEPTED, NUTAG_WITH_THIS_MSG(de->data->e_msg), TAG_END());
if (sofia_test_pflag(profile, PFLAG_MESSAGES_RESPOND_200_OK)) {
nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS_MSG(de->data->e_msg), TAG_END());
} else {
nua_respond(nh, SIP_202_ACCEPTED, NUTAG_WITH_THIS_MSG(de->data->e_msg), TAG_END());
}
}