Media Management (Sponsored By Front Logic)

This modification makes it possible to change the media path of session in the switch on-the-fly and from the dialplan.
It adds some API interface calls usable from a remote client such as mod_event_socket or the test console.

1) media [off] <uuid>

   Turns on/off the media on the call described by <uuid>
   The media will be redirected as desiered either into the switch or point to point.

2) hold [off] <uuid>

   Turns on/off endpoint specific hold state on the session described by <uuid>

3) broadcast <uuid> "<path>[ <timer_name>]" or "speak:<tts_engine>|<tts_voice>|<text>[|<timer_name>]" [both]

   A message will be sent to the call described by uuid instructing it to play the file or speak the text indicated.

   If the 'both' option is specified both ends of the call will hear the message otherwise just the uuid specified
   will hear the message.

   During playback when only one side is hearing the message the other end will hear silence.

   If media is not flowing across the switch when the message is broadcasted, the media will be directed to the
   switch for the duration of the call and then returned to it's previous state.


Also the no_media=true option in the dialplan before a bridge makes it possible to place a call while proxying the session
description from one endpoint to the other and establishing an immidiate point-to-point media connection with no media
on the switch.

<action application="set" data="no_media=true"/>
<action application="bridge" data="sofia/mydomain.com/myid@myhost.com"/>


*NOTE* when connecting two outbound legs by using the "originate" api command with an extension that has no_media=true enabled,
the media for the first leg will be engaged with the switch until the second leg has answered and the other session description
is available to establish a point to point connection at which time point-to-point mode will be enabled.

*NOTE* it is reccommended you rebuild FreeSWITCH with "make sure" as there have been some changes to the core.



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3245 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-10-31 21:38:06 +00:00
parent 1e4ad3c5ae
commit 9ab2b1db57
11 changed files with 815 additions and 106 deletions

View File

@@ -274,7 +274,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_signal_bridge(switch_core_session_t *
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_t *session, char *extension, char *dialplan, char *context);
/*!
\brief Bridge two existing sessions
\param originator_uuid the uuid of the originator
@@ -283,6 +282,59 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_uuid_bridge(char *originator_uuid, char *originatee_uuid);
/*!
\brief Signal a session to request direct media access to it's remote end
\param uuid the uuid of the session to request
\param flags flags to influence behaviour (SMF_REBRIDGE to rebridge the call in media mode)
\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_media(char *uuid, switch_media_flag_t flags);
/*!
\brief Signal a session to request indirect media allowing it to exchange media directly with another device
\param uuid the uuid of the session to request
\param flags flags to influence behaviour (SMF_REBRIDGE to rebridge the call in no_media mode)
\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_nomedia(char *uuid, switch_media_flag_t flags);
/*!
\brief Signal the session with a protocol specific hold message.
\param uuid the uuid of the session to hold
\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_hold_uuid(char *uuid);
/*!
\brief Signal the session with a protocol specific unhold message.
\param uuid the uuid of the session to hold
\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_unhold_uuid(char *uuid);
/*!
\brief Signal the session with a protocol specific hold message.
\param session the session to hold
\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_hold(switch_core_session_t *session);
/*!
\brief Signal the session with a protocol specific unhold message.
\param uuid the uuid of the session to unhold
\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_unhold(switch_core_session_t *session);
/*!
\brief Signal the session to broadcast audio
\param uuid the uuid of the session to broadcast on
\param path the path data of the broadcast "/path/to/file.wav [<timer name>]" or "speak:<engine>|<voice>|<Text to say>"
\param flags flags to send to the request (SMF_ECHO_BRIDGED to send the broadcast to both sides of the call)
\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_broadcast(char *uuid, char *path, switch_media_flag_t flags);
/*!
\brief Transfer variables from one session to another
\param sessa the original session