FS-9629: add isfocus to replies, and add is_conference support to pre_answer
This commit is contained in:
parent
2cbe1989d1
commit
083fb35494
|
@ -1341,6 +1341,14 @@ SWITCH_STANDARD_APP(presence_function)
|
|||
SWITCH_STANDARD_APP(pre_answer_function)
|
||||
{
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
const char *arg = (char *) data;
|
||||
|
||||
if (!zstr(arg)) {
|
||||
if (switch_stristr("is_conference", arg)) {
|
||||
switch_channel_set_flag(channel, CF_CONFERENCE);
|
||||
}
|
||||
}
|
||||
|
||||
switch_channel_pre_answer(channel);
|
||||
}
|
||||
|
||||
|
|
|
@ -652,7 +652,7 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session)
|
|||
char *sticky = NULL;
|
||||
const char *call_info = switch_channel_get_variable(channel, "presence_call_info_full");
|
||||
|
||||
if (switch_channel_test_flag(channel, CF_CONFERENCE)) {
|
||||
if (switch_channel_test_flag(channel, CF_CONFERENCE) && !switch_stristr(";isfocus", tech_pvt->reply_contact)) {
|
||||
tech_pvt->reply_contact = switch_core_session_sprintf(session, "%s;isfocus", tech_pvt->reply_contact);
|
||||
}
|
||||
|
||||
|
@ -1173,6 +1173,10 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
|||
goto end;
|
||||
}
|
||||
|
||||
if (switch_channel_test_flag(channel, CF_CONFERENCE) && !switch_stristr(";isfocus", tech_pvt->reply_contact)) {
|
||||
tech_pvt->reply_contact = switch_core_session_sprintf(session, "%s;isfocus", tech_pvt->reply_contact);
|
||||
}
|
||||
|
||||
/* ones that do not need to lock sofia mutex */
|
||||
switch (msg->message_id) {
|
||||
case SWITCH_MESSAGE_INDICATE_KEEPALIVE:
|
||||
|
|
Loading…
Reference in New Issue