MODENDP-183 Add disable-srv and disable-naptr params to sip profiles (default false)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11683 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
0aa16a65d6
commit
1e23c65e3e
|
@ -441,6 +441,8 @@ struct sofia_profile {
|
|||
uint32_t force_subscription_expires;
|
||||
switch_rtp_bug_flag_t auto_rtp_bugs;
|
||||
char manage_shared_appearance; /* pflags was all full up - MTK */
|
||||
char disable_srv;
|
||||
char disable_naptr;
|
||||
};
|
||||
|
||||
struct private_object {
|
||||
|
|
|
@ -728,6 +728,8 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
|
|||
TAG_IF(sofia_test_pflag(profile, PFLAG_TLS), NUTAG_CERTIFICATE_DIR(profile->tls_cert_dir)),
|
||||
TAG_IF(sofia_test_pflag(profile, PFLAG_TLS), TPTAG_TLS_VERSION(profile->tls_version)),
|
||||
TAG_IF(!strchr(profile->sipip, ':'), NTATAG_UDP_MTU(65535)),
|
||||
TAG_IF(profile->disable_srv, NTATAG_USE_SRV(0)),
|
||||
TAG_IF(profile->disable_naptr, NTATAG_USE_NAPTR(0)),
|
||||
NTATAG_SERVER_RPORT(profile->rport_level),
|
||||
TAG_IF(tportlog, TPTAG_LOG(1)),
|
||||
TAG_END()); /* Last tag should always finish the sequence */
|
||||
|
@ -1798,6 +1800,9 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
|||
profile->pflags |= PFLAG_STUN_ENABLED;
|
||||
profile->pflags |= PFLAG_DISABLE_100REL;
|
||||
profile->auto_restart = 1;
|
||||
profile->manage_shared_appearance = 0; /* Initialize default */
|
||||
profile->disable_srv = 0;
|
||||
profile->disable_naptr = 0;
|
||||
|
||||
for (param = switch_xml_child(settings, "param"); param; param = param->next) {
|
||||
char *var = (char *) switch_xml_attr_soft(param, "name");
|
||||
|
@ -2016,6 +2021,14 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
|||
profile->manage_shared_appearance = 1;
|
||||
profile->sla_contact = switch_core_sprintf(profile->pool, "sip:sla-agent@%s", profile->sipip);
|
||||
}
|
||||
} else if (!strcasecmp(var, "disable-srv")) {
|
||||
if (switch_true(val)) {
|
||||
profile->disable_srv = 1;
|
||||
}
|
||||
} else if (!strcasecmp(var, "disable-naptr")) {
|
||||
if (switch_true(val)) {
|
||||
profile->disable_naptr = 1;
|
||||
}
|
||||
} else if (!strcasecmp(var, "unregister-on-options-fail")) {
|
||||
if (switch_true(val)) {
|
||||
profile->pflags |= PFLAG_UNREG_OPTIONS_FAIL;
|
||||
|
|
Loading…
Reference in New Issue