Hi, Currently while dialling voicemail from mod_voicemail.c file it picks up the name recorded in system greetings and says like '<Name> person you are trying to reach is currently not available.Record you message after the tone press any key or stop talking to end the recording' I require something like this 'You have reached the mailbox of <Name> Record you message after the tone press any key or stop talking to end the recording'. I knew I have to change in mod_voicemail.c file. But since am not familiar with C code not sure how to get this. if (!skip_greeting) { memset(buf, 0, sizeof(buf)); args.input_callback = cancel_on_dtmf; args.buf = buf; args.buflen = sizeof(buf); switch_ivr_sleep(session, 100, SWITCH_TRUE, NULL); if (switch_file_exists(greet_path, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { memset(buf, 0, sizeof(buf)); TRY_CODE(switch_ivr_play_file(session, NULL, greet_path, &args)); } else { 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)); } Can anyone please help me out. Thanks
Look at voicemail_play_greeting macro. Sent from my iPad On Nov 22, 2012, at 5:18 AM, Archana Venugopan <a.venugopan@mundio.com> wrote: Hi, Currently while dialling voicemail from mod_voicemail.c file it picks up the name recorded in system greetings and says like ‘<Name> person you are trying to reach is currently not available.Record you message after the tone press any key or stop talking to end the recording’ I require something like this ‘You have reached the mailbox of <Name> Record you message after the tone press any key or stop talking to end the recording’. I knew I have to change in mod_voicemail.c file. But since am not familiar with C code not sure how to get this. if (!skip_greeting) { memset(buf, 0, sizeof(buf)); args.input_callback = cancel_on_dtmf; args.buf = buf; args.buflen = sizeof(buf); switch_ivr_sleep(session, 100, SWITCH_TRUE, NULL); if (switch_file_exists(greet_path, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { memset(buf, 0, sizeof(buf)); TRY_CODE(switch_ivr_play_file(session, NULL, greet_path, &args)); } else { 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)); } Can anyone please help me out. Thanks _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi, Yes currently that plays 'person you are trying to reach is currently not available'. But I require this sentence first 'You have reached the mailbox of' followed by <Name> instead of Name reading at first. Regards, Archana From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Dorn DJBinter Sent: 22 November 2012 18:10 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] mod_voicemail.c file change Look at voicemail_play_greeting macro. Sent from my iPad On Nov 22, 2012, at 5:18 AM, Archana Venugopan <a.venugopan@mundio.com<mailto:a.venugopan@mundio.com>> wrote: Hi, Currently while dialling voicemail from mod_voicemail.c file it picks up the name recorded in system greetings and says like '<Name> person you are trying to reach is currently not available.Record you message after the tone press any key or stop talking to end the recording' I require something like this 'You have reached the mailbox of <Name> Record you message after the tone press any key or stop talking to end the recording'. I knew I have to change in mod_voicemail.c file. But since am not familiar with C code not sure how to get this. if (!skip_greeting) { memset(buf, 0, sizeof(buf)); args.input_callback = cancel_on_dtmf; args.buf = buf; args.buflen = sizeof(buf); switch_ivr_sleep(session, 100, SWITCH_TRUE, NULL); if (switch_file_exists(greet_path, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { memset(buf, 0, sizeof(buf)); TRY_CODE(switch_ivr_play_file(session, NULL, greet_path, &args)); } else { 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)); } Can anyone please help me out. Thanks _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<http://lists.freeswitch.org/mailman/options/freeswitch-users> http://www.freeswitch.org
Leave the C code, you don't need to know or change anything in there. The voicemail_play_greeting macro is a configuration option. Look in your configuration at lang/en/vm/sounds.xml, the macro is defined in there as a combination of play-file and say to produce the message that's heard. Changing that macro will change what's heard. -Steve On 23 November 2012 09:08, Archana Venugopan <a.venugopan@mundio.com> wrote:
Hi,****
** **
Yes currently that plays ‘person you are trying to reach is currently not available’. But I require this sentence first ‘You have reached the mailbox of’ followed by <Name> instead of Name reading at first.****
** **
Regards,****
Archana****
** **
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Dorn DJBinter *Sent:* 22 November 2012 18:10 *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] mod_voicemail.c file change****
** **
Look at voicemail_play_greeting macro.
Sent from my iPad****
On Nov 22, 2012, at 5:18 AM, Archana Venugopan <a.venugopan@mundio.com> wrote:****
Hi,****
****
Currently while dialling voicemail from mod_voicemail.c file it picks up the name recorded in system greetings and says like****
****
‘<Name> person you are trying to reach is currently not available.Record you message after the tone press any key or stop talking to end the recording’****
****
I require something like this****
‘You have reached the mailbox of <Name> Record you message after the tone press any key or stop talking to end the recording’.****
****
I knew I have to change in mod_voicemail.c file. But since am not familiar with C code not sure how to get this.****
****
if (!skip_greeting) {****
memset(buf, 0, sizeof(buf));****
args.input_callback = cancel_on_dtmf;****
args.buf = buf;****
args.buflen = sizeof(buf);****
****
switch_ivr_sleep(session, 100, SWITCH_TRUE, NULL);****
****
if (switch_file_exists(greet_path, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {****
memset(buf, 0, sizeof(buf));****
TRY_CODE(switch_ivr_play_file(session, NULL, greet_path, &args));****
} else {****
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));****
}****
****
Can anyone please help me out. Thanks****
****
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org****
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thanks but sorry I am still not clear on <Name> part. <Name> variable which is being picked up from database in name_path was heard first. How am I to bring it in middle instead? Even if I change voicemail_play_greeting the first word we hear would be our <Name> still followed by voicemail_play_greeting message. Whether my understanding is correct? From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Steven Ayre Sent: 23 November 2012 11:12 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] mod_voicemail.c file change Leave the C code, you don't need to know or change anything in there. The voicemail_play_greeting macro is a configuration option. Look in your configuration at lang/en/vm/sounds.xml, the macro is defined in there as a combination of play-file and say to produce the message that's heard. Changing that macro will change what's heard. -Steve On 23 November 2012 09:08, Archana Venugopan <a.venugopan@mundio.com<mailto:a.venugopan@mundio.com>> wrote: Hi, Yes currently that plays 'person you are trying to reach is currently not available'. But I require this sentence first 'You have reached the mailbox of' followed by <Name> instead of Name reading at first. Regards, Archana From: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org>] On Behalf Of Dorn DJBinter Sent: 22 November 2012 18:10 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] mod_voicemail.c file change Look at voicemail_play_greeting macro. Sent from my iPad On Nov 22, 2012, at 5:18 AM, Archana Venugopan <a.venugopan@mundio.com<mailto:a.venugopan@mundio.com>> wrote: Hi, Currently while dialling voicemail from mod_voicemail.c file it picks up the name recorded in system greetings and says like '<Name> person you are trying to reach is currently not available.Record you message after the tone press any key or stop talking to end the recording' I require something like this 'You have reached the mailbox of <Name> Record you message after the tone press any key or stop talking to end the recording'. I knew I have to change in mod_voicemail.c file. But since am not familiar with C code not sure how to get this. if (!skip_greeting) { memset(buf, 0, sizeof(buf)); args.input_callback = cancel_on_dtmf; args.buf = buf; args.buflen = sizeof(buf); switch_ivr_sleep(session, 100, SWITCH_TRUE, NULL); if (switch_file_exists(greet_path, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { memset(buf, 0, sizeof(buf)); TRY_CODE(switch_ivr_play_file(session, NULL, greet_path, &args)); } else { 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)); } Can anyone please help me out. Thanks _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<http://lists.freeswitch.org/mailman/options/freeswitch-users> http://www.freeswitch.org _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
In this part of the code greet: if (!skip_greeting) { memset(buf, 0, sizeof(buf)); args.input_callback = cancel_on_dtmf; args.buf = buf; args.buflen = sizeof(buf); switch_ivr_sleep(session, 100, SWITCH_TRUE, NULL); if (switch_file_exists(greet_path, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { memset(buf, 0, sizeof(buf)); TRY_CODE(switch_ivr_play_file(session, NULL, greet_path, &args)); } else { 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)); The bolded first line plays the name stored in name_path and the 2nd bold line reads the greeting message. So I guess only in this C code we need to make change such a way that name_path should be somewhere in middle. Am I right? Regards, Archana From: Archana Venugopan Sent: 23 November 2012 13:57 To: 'FreeSWITCH Users Help' Subject: RE: [Freeswitch-users] mod_voicemail.c file change Thanks but sorry I am still not clear on <Name> part. <Name> variable which is being picked up from database in name_path was heard first. How am I to bring it in middle instead? Even if I change voicemail_play_greeting the first word we hear would be our <Name> still followed by voicemail_play_greeting message. Whether my understanding is correct? From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Steven Ayre Sent: 23 November 2012 11:12 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] mod_voicemail.c file change Leave the C code, you don't need to know or change anything in there. The voicemail_play_greeting macro is a configuration option. Look in your configuration at lang/en/vm/sounds.xml, the macro is defined in there as a combination of play-file and say to produce the message that's heard. Changing that macro will change what's heard. -Steve On 23 November 2012 09:08, Archana Venugopan <a.venugopan@mundio.com<mailto:a.venugopan@mundio.com>> wrote: Hi, Yes currently that plays 'person you are trying to reach is currently not available'. But I require this sentence first 'You have reached the mailbox of' followed by <Name> instead of Name reading at first. Regards, Archana From: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org>] On Behalf Of Dorn DJBinter Sent: 22 November 2012 18:10 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] mod_voicemail.c file change Look at voicemail_play_greeting macro. Sent from my iPad On Nov 22, 2012, at 5:18 AM, Archana Venugopan <a.venugopan@mundio.com<mailto:a.venugopan@mundio.com>> wrote: Hi, Currently while dialling voicemail from mod_voicemail.c file it picks up the name recorded in system greetings and says like '<Name> person you are trying to reach is currently not available.Record you message after the tone press any key or stop talking to end the recording' I require something like this 'You have reached the mailbox of <Name> Record you message after the tone press any key or stop talking to end the recording'. I knew I have to change in mod_voicemail.c file. But since am not familiar with C code not sure how to get this. if (!skip_greeting) { memset(buf, 0, sizeof(buf)); args.input_callback = cancel_on_dtmf; args.buf = buf; args.buflen = sizeof(buf); switch_ivr_sleep(session, 100, SWITCH_TRUE, NULL); if (switch_file_exists(greet_path, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { memset(buf, 0, sizeof(buf)); TRY_CODE(switch_ivr_play_file(session, NULL, greet_path, &args)); } else { 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)); } Can anyone please help me out. Thanks _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<http://lists.freeswitch.org/mailman/options/freeswitch-users> http://www.freeswitch.org _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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));
participants (3)
-
Archana Venugopan
-
Dorn DJBinter
-
Steven Ayre