if ((session = switch_core_session_locate(uuid_here)) { /* The condition will catch race conditions where you get the event a couple milliseconds after the call has hung up */
switch_ivr_session_transfer(session, destination, dialplan, context);
switch_core_session_rwunlock(session);
}
Definition: (in switch_ivr.h)
/*!
\brief Transfer an existing session to another location
\param session the session to transfer
\param extension the new extension
\param dialplan the new dialplan (OPTIONAL, may be NULL)
\param context the new context (OPTIONAL, may be NULL)
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(_In_ switch_core_session_t *session, const char *extension, const char *dialplan,
const char *context);
Math