sofia_clear_flag(profile, TFLAG_TPORT_LOG);
}
nua_set_params(profile->nua, TPTAG_LOG(sofia_test_flag(profile, TFLAG_TPORT_LOG)), TAG_END());
+ } else if (!strcasecmp(var, "send-message-query-on-register")) {
+ if (switch_true(val)) {
+ sofia_set_pflag(profile, PFLAG_MESSAGE_QUERY_ON_REGISTER);
+ } else {
+ sofia_clear_pflag(profile, PFLAG_MESSAGE_QUERY_ON_REGISTER);
+ }
} else if (!strcasecmp(var, "auto-rtp-bugs")) {
parse_rtp_bugs(profile, val);
} else if (!strcasecmp(var, "user-agent-string")) {
sofia_set_pflag(profile, PFLAG_DISABLE_100REL);
profile->auto_restart = 1;
sofia_set_pflag(profile, PFLAG_AUTOFIX_TIMING);
+ sofia_set_pflag(profile, PFLAG_MESSAGE_QUERY_ON_REGISTER);
for (param = switch_xml_child(settings, "param"); param; param = param->next) {
char *var = (char *) switch_xml_attr_soft(param, "name");
if (tmp > 0) {
profile->force_subscription_expires = tmp;
}
+ } else if (!strcasecmp(var, "send-message-query-on-register")) {
+ if (switch_true(val)) {
+ sofia_set_pflag(profile, PFLAG_MESSAGE_QUERY_ON_REGISTER);
+ } else {
+ sofia_clear_pflag(profile, PFLAG_MESSAGE_QUERY_ON_REGISTER);
+ }
} else if (!strcasecmp(var, "inbound-use-callid-as-uuid")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_CALLID_AS_UUID);
switch_snprintf(exp_param, sizeof(exp_param), "expires=%ld", exptime);
sip_contact_add_param(nua_handle_home(nh), sip->sip_contact, exp_param);
- if (switch_event_create(&s_event, SWITCH_EVENT_MESSAGE_QUERY) == SWITCH_STATUS_SUCCESS) {
- switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "Message-Account", "sip:%s@%s", to_user, reg_host);
- switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "VM-Sofia-Profile", profile->name);
- switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "VM-Call-ID", call_id);
+ if (sofia_test_pflag(profile, PFLAG_MESSAGE_QUERY_ON_REGISTER)) {
+ if (switch_event_create(&s_event, SWITCH_EVENT_MESSAGE_QUERY) == SWITCH_STATUS_SUCCESS) {
+ switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "Message-Account", "sip:%s@%s", to_user, reg_host);
+ switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "VM-Sofia-Profile", profile->name);
+ switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "VM-Call-ID", call_id);
+ }
}
} else {
if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_UNREGISTER) == SWITCH_STATUS_SUCCESS) {