, , and */
+ if (atts) {
+ int i = 0;
+ while (atts[i]) {
+ if (!strcmp("xml:lang", atts[i])) {
+ if (!zstr(atts[i + 1])) {
+ strncpy(cur_node->language, atts[i + 1], LANGUAGE_LEN);
+ cur_node->language[LANGUAGE_LEN - 1] = '\0';
+ }
+ }
+ i += 2;
+ }
+ }
+ cur_node->tts_voice = find_tts_voice(cur_node);
+ return IKS_OK;
+}
+
+/**
+ * Process
+ */
+static int process_voice(struct ssml_parser *parsed_data, char **atts)
+{
+ struct ssml_node *cur_node = parsed_data->cur_node;
+ if (atts) {
+ int i = 0;
+ while (atts[i]) {
+ if (!strcmp("xml:lang", atts[i])) {
+ if (!zstr(atts[i + 1])) {
+ strncpy(cur_node->language, atts[i + 1], LANGUAGE_LEN);
+ cur_node->language[LANGUAGE_LEN - 1] = '\0';
+ }
+ } else if (!strcmp("name", atts[i])) {
+ if (!zstr(atts[i + 1])) {
+ strncpy(cur_node->name, atts[i + 1], NAME_LEN);
+ cur_node->name[NAME_LEN - 1] = '\0';
+ }
+ } else if (!strcmp("gender", atts[i])) {
+ if (!zstr(atts[i + 1])) {
+ strncpy(cur_node->gender, atts[i + 1], GENDER_LEN);
+ cur_node->gender[GENDER_LEN - 1] = '\0';
+ }
+ }
+ i += 2;
+ }
+ }
+ cur_node->tts_voice = find_tts_voice(cur_node);
+ return IKS_OK;
+}
+
+/**
+ * Process
+ */
+static int process_say_as(struct ssml_parser *parsed_data, char **atts)
+{
+ struct ssml_node *cur_node = parsed_data->cur_node;
+ if (atts) {
+ int i = 0;
+ while (atts[i]) {
+ if (!strcmp("interpret-as", atts[i])) {
+ char *interpret_as = atts[i + 1];
+ if (!zstr(interpret_as)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "interpret-as: %s\n", atts[i + 1]);
+ cur_node->say_macro = (struct macro *)switch_core_hash_find(globals.interpret_as_map, interpret_as);
+ }
+ break;
+ }
+ i += 2;
+ }
+ }
+ cur_node->tts_voice = find_tts_voice(cur_node);
+ return IKS_OK;
+}
+
+/**
+ * Process - this is a period of silence
+ */
+static int process_break(struct ssml_parser *parsed_data, char **atts)
+{
+ if (atts) {
+ int i = 0;
+ while (atts[i]) {
+ if (!strcmp("time", atts[i])) {
+ char *t = atts[i + 1];
+ if (!zstr(t) && parsed_data->num_files < parsed_data->max_files) {
+ int timeout_ms = 0;
+ char *unit;
+ if ((unit = strstr(t, "ms"))) {
+ *unit = '\0';
+ if (switch_is_number(t)) {
+ timeout_ms = atoi(t);
+ }
+ } else if ((unit = strstr(t, "s"))) {
+ *unit = '\0';
+ if (switch_is_number(t)) {
+ timeout_ms = atoi(t) * 1000;
+ }
+ }
+ if (timeout_ms > 0) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding : \"%s\"\n", t);
+ parsed_data->files[parsed_data->num_files].name = switch_core_sprintf(parsed_data->pool, "silence_stream://%i", timeout_ms);
+ parsed_data->files[parsed_data->num_files++].prefix = NULL;
+ }
+ }
+ return IKS_OK;
+ }
+ i += 2;
+ }
+ }
+ return IKS_OK;
+}
+
+/**
+ * Process