]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
bottoms up!
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 8 Nov 2007 01:42:21 +0000 (01:42 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 8 Nov 2007 01:42:21 +0000 (01:42 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@326 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/openzap/mod_openzap/mod_openzap.c

index 5be169488e98c6f425f6ce5be047fd13a660503f..fc63935a6cdd885fc74640a95a2097e9534b840e 100644 (file)
@@ -720,7 +720,11 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
        }
        
        if (chan_id) {
-               status = zap_channel_open(span_id, chan_id, &zchan);
+               if (chan_id > 0) {
+                       status = zap_channel_open(span_id, chan_id, &zchan);
+               } else {
+                       status = zap_channel_open_any(span_id, ZAP_BOTTOM_UP, &zchan);
+               }
        } else {
                status = zap_channel_open_any(span_id, ZAP_TOP_DOWN, &zchan);
        }