]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add leading m:<delim>: to change delim on inline dp eg m:^:set:foo=bar^set=blah=true...
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 27 Jan 2010 22:27:26 +0000 (22:27 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 27 Jan 2010 22:27:26 +0000 (22:27 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16526 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_dptools/mod_dptools.c

index 3f0ec9c5d15f6c766425afbd194ef859cac64ecb..62fbfb133a189f059d920b0fa4731e5349ed0a61 100644 (file)
@@ -46,6 +46,7 @@ SWITCH_STANDARD_DIALPLAN(inline_dialplan_hunt)
        int x = 0;
        char *lbuf;
        char *target = arg;
+       char delim = ',';
 
        if (!caller_profile) {
                caller_profile = switch_channel_get_caller_profile(channel);
@@ -59,12 +60,19 @@ SWITCH_STANDARD_DIALPLAN(inline_dialplan_hunt)
                target = caller_profile->destination_number;
        }
 
-       if (!zstr(target) && (lbuf = switch_core_session_strdup(session, target))
-               && (argc = switch_separate_string(lbuf, ',', argv, (sizeof(argv) / sizeof(argv[0]))))) {
-       } else {
+
+       if (zstr(target)) {
                return NULL;
+       } else {
+               lbuf = switch_core_session_strdup(session, target);
+       }
+
+       if (*lbuf == 'm' && *(lbuf + 1) == ':' && *(lbuf + 3) == ':') {
+               delim = *(lbuf + 2);
+               lbuf += 4;
        }
 
+       argc = switch_separate_string(lbuf, delim, argv, (sizeof(argv) / sizeof(argv[0])));
 
        for (x = 0; x < argc; x++) {
                char *app = argv[x];