]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_portaudio] CF_AUDIO flag is not set 180/head
authorAndrey Volk <andywolk@gmail.com>
Mon, 16 Dec 2019 20:21:52 +0000 (00:21 +0400)
committerAndrey Volk <andywolk@gmail.com>
Mon, 16 Dec 2019 20:21:52 +0000 (00:21 +0400)
src/mod/endpoints/mod_portaudio/mod_portaudio.c

index 44675c3c8b305e0e6a2ce49b39909a7dc3044e53..37c969279fa0ed2998ba0827581fef5e175d973c 100644 (file)
@@ -282,6 +282,14 @@ SWITCH_STANDARD_API(pa_cmd);
 */
 static switch_status_t channel_on_init(switch_core_session_t *session)
 {
+       switch_channel_t *channel;
+
+       if (session) {
+               if ((channel = switch_core_session_get_channel(session))) {
+                       switch_channel_set_flag(channel, CF_AUDIO);
+               }
+       }
+
        return SWITCH_STATUS_SUCCESS;
 }
 
@@ -1267,6 +1275,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
 
        switch_set_flag_locked(tech_pvt, TFLAG_OUTBOUND);
        switch_channel_set_state(channel, CS_INIT);
+       switch_channel_set_flag(channel, CF_AUDIO);
        return SWITCH_CAUSE_SUCCESS;
 
 error: