Hello,

In my scenario, I have other_session that is doing playback of a media file
within an infinitely loop.
What I need to do is to be able stop the "other_session" from doing the
playback, and then bridge the current session to it.

With the following code, I can get the current session and the other_session
to bridge, but I can't get media between the two sessions.

Also, is there anyway to stop the playback? Right now, after the brdiging,
other_session still hears moh.

    switch_core_session_t * other_session =
switch_core_session_locate(bridge_to_uuid);
                switch_channel_t *other_channel =
switch_core_session_get_channel(other_session);

                switch_caller_profile_t *cloned_profile;
                cloned_profile = switch_caller_profile_clone(other_session,
switch_channel_get_caller_profile(channel));
                switch_assert(cloned_profile);
                switch_channel_set_originator_caller_profile(other_channel,
cloned_profile);

                cloned_profile = switch_caller_profile_clone(session,
switch_channel_get_caller_profile(other_channel));
                switch_assert(cloned_profile);
                switch_assert(cloned_profile->next == NULL);
                switch_channel_set_originatee_caller_profile(channel,
cloned_profile);


                switch_core_media_bug_resume(session);
                switch_core_media_bug_resume(other_session);
                switch_ivr_multi_threaded_bridge(session,other_session,
NULL, other_session, session);
                switch_core_media_bug_pause(session);
                switch_core_media_bug_pause(other_session);


thx,
jb
_______________________________________________
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org

Reply via email to