]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5619 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 19 Jul 2013 18:25:54 +0000 (13:25 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 19 Jul 2013 18:26:00 +0000 (13:26 -0500)
src/switch_ivr_originate.c

index 127f19a26997d353d061dd73aa40a635beea9590..9825681475e61edac6748b2d853ab5862ce4682d 100644 (file)
@@ -1676,6 +1676,16 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_enterprise_originate(switch_core_sess
                *cause = SWITCH_CAUSE_NO_ANSWER;
        }
 
+       if (channel) {
+               if (*cause == SWITCH_CAUSE_SUCCESS) {
+                       switch_channel_set_variable(channel, "originate_disposition", "success");
+               } else {
+                       switch_channel_set_variable(channel, "originate_disposition", "failure");
+                       switch_channel_set_variable(channel, "hangup_cause", switch_channel_cause2str(*cause));
+               }
+       }
+
+
        if (var_event && var_event != ovars) {
                switch_event_destroy(&var_event);
        }