]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
allow blank dest for calling fxs
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 9 Oct 2008 01:18:40 +0000 (01:18 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 9 Oct 2008 01:18:40 +0000 (01:18 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@590 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/openzap/mod_openzap/mod_openzap.c

index e915c2d3683af9b0d89a602692d9eb6f6c7dd119..fd308a0d5ebbf89af8428f2c50c4cf9cad94decc 100644 (file)
@@ -903,7 +903,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
 
        data = switch_core_strdup(outbound_profile->pool, outbound_profile->destination_number);
 
-       if ((argc = switch_separate_string(data, '/', argv, (sizeof(argv) / sizeof(argv[0])))) != 3) {
+       if ((argc = switch_separate_string(data, '/', argv, (sizeof(argv) / sizeof(argv[0])))) < 2) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid dial string\n");
         return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
        }
@@ -922,7 +922,9 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
                chan_id = atoi(argv[1]);
        }
 
-       dest = argv[2];
+       if (!(dest = argv[2])) {
+               dest = "";
+       }
 
        if (!span_id && !switch_strlen_zero(span_name)) {
                zap_span_t *span;