From 33a3bcf56c14805c951bddc573dcdaaa1783c1b7 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 22 Jan 2009 23:50:01 +0000 Subject: [PATCH] add disposition to monitor_early_media git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11437 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr_originate.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 83b32f7bfa..5ca70516ea 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -248,11 +248,22 @@ static switch_bool_t monitor_callback(switch_core_session_t *session, const char if (app) { switch_channel_t *channel = switch_core_session_get_channel(session); if (!strcmp(app, "fail")) { + const char *bd = switch_channel_get_variable(channel, "monitor_fail_dispo"); + if (!bd) { + bd = "monitor_early_media_fail"; + } + switch_channel_set_variable(channel, "originate_disposition", bd); switch_channel_hangup(channel, data ? switch_channel_str2cause(data) : SWITCH_CAUSE_USER_BUSY); } else if (!strcmp(app, "ring")) { originate_global_t *oglobals = (originate_global_t *) switch_channel_get_private(channel, "_oglobals_"); + const char *bd = switch_channel_get_variable(channel, "monitor_ring_dispo"); + if (!bd) { + bd = "monitor_early_media_ring"; + } + switch_channel_set_variable(channel, "originate_disposition", bd); if (oglobals) { + switch_channel_set_private(channel, "_oglobals_", NULL); if (!oglobals->progress) {