]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
another tweak
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 26 Apr 2008 15:59:42 +0000 (15:59 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 26 Apr 2008 15:59:42 +0000 (15:59 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8207 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_dptools/mod_dptools.c

index 653ff03b4e557a5876dc5b9eb6b6268ee46adaac..97f4f6bcf1ac19dfd03dd1196f47af6622899332 100644 (file)
@@ -45,6 +45,7 @@ SWITCH_STANDARD_DIALPLAN(inline_dialplan_hunt)
        switch_channel_t *channel = switch_core_session_get_channel(session);
        int x = 0;
        char *lbuf;
+       char *target = arg;
 
        if (!caller_profile) {
                caller_profile = switch_channel_get_caller_profile(channel);
@@ -53,8 +54,12 @@ SWITCH_STANDARD_DIALPLAN(inline_dialplan_hunt)
        if ((extension = switch_caller_extension_new(session, "inline", "inline")) == 0) {
                abort();
        }
+
+       if (switch_strlen_zero(target)) {
+               target = caller_profile->destination_number;
+       }
        
-       if (!switch_strlen_zero(caller_profile->destination_number) && (lbuf = switch_core_session_strdup(session, caller_profile->destination_number))
+       if (!switch_strlen_zero(target) && (lbuf = switch_core_session_strdup(session, target))
                && (argc = switch_separate_string(lbuf, ',', argv, (sizeof(argv) / sizeof(argv[0]))))) {
        } else {
                return NULL;