[mod_sofia] add ability to skip chat global process
This commit is contained in:
parent
df81021a11
commit
03e3e5176b
|
@ -292,6 +292,7 @@ typedef enum {
|
|||
PFLAG_TLS_ALWAYS_NAT,
|
||||
PFLAG_TCP_ALWAYS_NAT,
|
||||
PFLAG_ENABLE_CHAT,
|
||||
PFLAG_CHAT_SKIP_GLOBAL_PROCESS,
|
||||
PFLAG_AUTH_SUBSCRIPTIONS,
|
||||
PFLAG_PROXY_REFER,
|
||||
PFLAG_CHANNEL_XML_FETCH_ON_NIGHTMARE_TRANSFER,
|
||||
|
|
|
@ -4917,6 +4917,12 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
|
|||
} else {
|
||||
sofia_clear_pflag(profile, PFLAG_ENABLE_CHAT);
|
||||
}
|
||||
} else if (!strcasecmp(var, "chat-skip-global-process")) {
|
||||
if (switch_true(val)) {
|
||||
sofia_set_pflag(profile, PFLAG_CHAT_SKIP_GLOBAL_PROCESS);
|
||||
} else {
|
||||
sofia_clear_pflag(profile, PFLAG_CHAT_SKIP_GLOBAL_PROCESS);
|
||||
}
|
||||
} else if (!strcasecmp(var, "fire-bye-response-events")) {
|
||||
if (switch_true(val)) {
|
||||
sofia_set_pflag(profile, PFLAG_FIRE_BYE_RESPONSE_EVENTS);
|
||||
|
|
|
@ -4914,6 +4914,9 @@ void sofia_presence_handle_sip_i_message(int status,
|
|||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from_full", full_from);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "sip_profile", profile->name);
|
||||
|
||||
if (sofia_test_pflag(profile, PFLAG_CHAT_SKIP_GLOBAL_PROCESS)) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "skip_global_process", "true");
|
||||
}
|
||||
|
||||
if (sip->sip_call_info) {
|
||||
sip_call_info_t *call_info = sip->sip_call_info;
|
||||
|
|
Loading…
Reference in New Issue