]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FSCORE-631
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 24 Sep 2010 17:29:23 +0000 (12:29 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 24 Sep 2010 17:29:23 +0000 (12:29 -0500)
src/switch_ivr_originate.c

index b9c410253c3f486a58e1afe8d00299a57c04fd7a..1cbd2b9d39eedc300b33eb536e8a15e09f897467 100644 (file)
@@ -2595,6 +2595,22 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                                                if ((inner_var_count =
                                                                         switch_separate_string(var_array[x], '=',
                                                                                                                inner_var_array, (sizeof(inner_var_array) / sizeof(inner_var_array[0])))) == 2) {
+
+                                                                       /* this is stupid but necessary: if the value begins with ^^ take the very next char as a delim, 
+                                                                          increment the string to start the next char after that and replace every instance of the delim with a , */
+                                                                       
+                                                                       if (*inner_var_array[1] == '^' && *(inner_var_array[1] + 1) == '^') {
+                                                                               char *iv;
+                                                                               char d = 0;
+                                                                               inner_var_array[1] += 2;
+                                                                               d = *inner_var_array[1]++;
+
+                                                                               if (d) {
+                                                                                       for(iv = inner_var_array[1]; iv && *iv; iv++) {
+                                                                                               if (*iv == d) *iv = ',';
+                                                                                       }
+                                                                               }
+                                                                       }
                                                                        
                                                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "local variable string %d = [%s=%s]\n", 
                                                                                                          x, inner_var_array[0], inner_var_array[1]);