Ok, I see your issue now... Sorry I'd thought you mean the name was the ID read out not the name_path. Try commenting this section out: if (switch_file_exists(cbt.name_path, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { memset(buf, 0, sizeof(buf)); TRY_CODE(switch_ivr_play_file(session, NULL, cbt.name_path, &args)); } Add this above "if (!read_id) {" char *data = NULL; And change TRY_CODE(switch_ivr_phrase_macro(session, VM_PLAY_GREETING_MACRO, read_id, NULL, &args)); to data = switch_core_session_sprintf(session, "%s %s", read_id, cbt.name_path); TRY_CODE(switch_ivr_phrase_macro(session, VM_PLAY_GREETING_MACRO, data, NULL, &args)); The macro should then have the name_path in $2 and you can use play-file there to play it when you want to... I haven't tried this myself but I think it'll work - try it and see. Doing this by modifying the code is awkward though. For a start it'll be a pain to maintain, reapplying it every time you upgrade especially if the upstream code changes. Not sure why name was implemented as always getting played first. Fixing it in Git would seem preferable, but it'd be a change of behaviour so might catch people out if they're upgrading an existing system. -Steve On 23 November 2012 14:52, Archana Venugopan <a.venugopan@mundio.com> wrote:
if (switch_file_exists(cbt.name_path, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
memset(buf, 0, sizeof(buf));
TRY_CODE(switch_ivr_play_file(session, NULL, cbt.name_path, &args));
}
if (*buf == '\0') {
if (!read_id) {
if (!(read_id = switch_channel_get_variable(channel, "voicemail_alternate_greet_id"))) {
read_id = id;
}
}
memset(buf, 0, sizeof(buf));
TRY_CODE(switch_ivr_phrase_macro(session, VM_PLAY_GREETING_MACRO, read_id, NULL, &args));