mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-25 04:34:15 +00:00
add mwi-use-reg-callid
This commit is contained in:
1 parent
34df90196c
commit
792b004f36
5 files changed
+26
-7
No files matched your search
@@ -558,11 +558,11 @@ static void actual_sofia_presence_mwi_event_handler(switch_event_t *event)
|
||||
}
|
||||
|
||||
if (for_everyone) {
|
||||
sql = switch_mprintf("select sip_user,sip_host,contact,profile_name,network_ip,'%q' "
|
||||
sql = switch_mprintf("select sip_user,sip_host,contact,profile_name,network_ip,'%q',call_id "
|
||||
"from sip_registrations where hostname='%q' and profile_name='%q' and mwi_user='%q' and mwi_host='%q'",
|
||||
stream.data, mod_sofia_globals.hostname, profile->name, user, host);
|
||||
} else if (call_id) {
|
||||
sql = switch_mprintf("select sip_user,sip_host,contact,profile_name,network_ip,'%q' "
|
||||
sql = switch_mprintf("select sip_user,sip_host,contact,profile_name,network_ip,'%q',call_id "
|
||||
"from sip_registrations where hostname='%q' and profile_name='%q' and call_id='%q'",
|
||||
stream.data, mod_sofia_globals.hostname, profile->name, call_id);
|
||||
}
|
||||
@@ -2914,6 +2914,7 @@ static int sofia_presence_mwi_callback2(void *pArg, int argc, char **argv, char
|
||||
const char *body = argv[5];
|
||||
const char *o_contact = argv[2];
|
||||
const char *network_ip = argv[4];
|
||||
const char *call_id = argv[6];
|
||||
|
||||
char *profile_name = argv[3];
|
||||
struct mwi_helper *h = (struct mwi_helper *) pArg;
|
||||
@@ -2925,7 +2926,11 @@ static int sofia_presence_mwi_callback2(void *pArg, int argc, char **argv, char
|
||||
}
|
||||
}
|
||||
|
||||
sofia_glue_send_notify(profile, user, host, event, contenttype, body, o_contact, network_ip);
|
||||
if (!sofia_test_pflag(profile, PFLAG_MWI_USE_REG_CALLID)) {
|
||||
call_id = NULL;
|
||||
}
|
||||
|
||||
sofia_glue_send_notify(profile, user, host, event, contenttype, body, o_contact, network_ip, call_id);
|
||||
|
||||
if (ext_profile) {
|
||||
sofia_glue_release_profile(ext_profile);
|
||||
|
||||
Reference in new issue
Block a user