]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9629: add isfocus to replies, and add is_conference support to pre_answer
authorBrian West <brian@freeswitch.org>
Mon, 31 Oct 2016 15:45:29 +0000 (10:45 -0500)
committerBrian West <brian@freeswitch.org>
Mon, 31 Oct 2016 15:45:29 +0000 (10:45 -0500)
src/mod/applications/mod_dptools/mod_dptools.c
src/mod/endpoints/mod_sofia/mod_sofia.c

index d3f26e33d26682e292f27361bfb4631dcb867ab6..aa30bb02d1b08a8b3f2da94c620357e61e6fa375 100644 (file)
@@ -1345,6 +1345,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);
 }
 
index 8b5f67c81110930733d1c83089c85a502a9f33e9..e1c591659b7c2e147deacc1d7f3c94f525536043 100644 (file)
@@ -1202,6 +1202,10 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                goto end;
        }
 
+       if (switch_channel_test_flag(channel, CF_CONFERENCE)) {
+               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: