cpy = ast_strdupa(data); voice = strchr(cpy, '|'); if (voice != NULL) { *voice='\0'; voice++; opts = strchr(voice, '|'); if (options != NULL) { *opts = '\0'; opts++; }else opts="";*options = '\0'; } else { opts=""; voice="David"; }