]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add disposition to monitor_early_media
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 22 Jan 2009 23:50:01 +0000 (23:50 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 22 Jan 2009 23:50:01 +0000 (23:50 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11437 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_originate.c

index 83b32f7bfac845165393fec17633b6fd1eb53cba..5ca70516ea1efa3a5e6deb25f840c23b0399778b 100644 (file)
@@ -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) {