Split string and play charachters
Hello, Is there an application which plays the characters of a string individually? Or have some sort of split function which splits a string into characters and then manually map the 'character_name' to an existing audio file? For instance: //String: 1234567890 //Split the string Playback: 1.wav Playback: 2.wav Playback: 3.wav Etc Can this be done in the XML dialplan or do I need to use some scripting language to control the dialplan?
Hi, It sounds like you're looking for the say application, with a say method of "iterated"? http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_say -Gabe On Mon, Feb 3, 2014 at 9:03 AM, Grant Bagdasarian <GB@cm.nl> wrote:
Hello,
Is there an application which plays the characters of a string individually?
Or have some sort of split function which splits a string into characters and then manually map the 'character_name' to an existing audio file?
For instance:
//String: 1234567890
//Split the string
Playback: 1.wav
Playback: 2.wav
Playback: 3.wav
Etc
Can this be done in the XML dialplan or do I need to use some scripting language to control the dialplan?
_________________________________________________________________________ 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
Hello, Yes, I found that one also. I'm just not sure if it also lets me define which audio files to use? I'm using the originate command to originate a call from an external application using the ESL library, but we have multiple customers which will use the same context in Freeswitch, but the audio files played are located in a different directory for each customer. So, for Customer ID 1 the directory should be something like this: /../audio/1/characters/ For Customer ID 2: /.. /audio/2/characters/ Etc. I want to build the audio directory path dynamically and have the characters played from that directory. Is that possible with the Say application? If not, how should I approach this? Dialplan scripting? Regards, Grant From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Gabe Shepard Sent: Monday, February 3, 2014 3:35 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Split string and play charachters Hi, It sounds like you're looking for the say application, with a say method of "iterated"? http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_say -Gabe On Mon, Feb 3, 2014 at 9:03 AM, Grant Bagdasarian <GB@cm.nl<mailto:GB@cm.nl>> wrote: Hello, Is there an application which plays the characters of a string individually? Or have some sort of split function which splits a string into characters and then manually map the 'character_name' to an existing audio file? For instance: //String: 1234567890 //Split the string Playback: 1.wav Playback: 2.wav Playback: 3.wav Etc Can this be done in the XML dialplan or do I need to use some scripting language to control the dialplan? _________________________________________________________________________ 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
Hello, Does anyone have an idea about this issue below? Thanks! Grant From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Grant Bagdasarian Sent: Monday, February 3, 2014 3:56 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Split string and play charachters Hello, Yes, I found that one also. I'm just not sure if it also lets me define which audio files to use? I'm using the originate command to originate a call from an external application using the ESL library, but we have multiple customers which will use the same context in Freeswitch, but the audio files played are located in a different directory for each customer. So, for Customer ID 1 the directory should be something like this: /../audio/1/characters/ For Customer ID 2: /.. /audio/2/characters/ Etc. I want to build the audio directory path dynamically and have the characters played from that directory. Is that possible with the Say application? If not, how should I approach this? Dialplan scripting? Regards, Grant From: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Gabe Shepard Sent: Monday, February 3, 2014 3:35 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Split string and play charachters Hi, It sounds like you're looking for the say application, with a say method of "iterated"? http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_say -Gabe On Mon, Feb 3, 2014 at 9:03 AM, Grant Bagdasarian <GB@cm.nl<mailto:GB@cm.nl>> wrote: Hello, Is there an application which plays the characters of a string individually? Or have some sort of split function which splits a string into characters and then manually map the 'character_name' to an existing audio file? For instance: //String: 1234567890 //Split the string Playback: 1.wav Playback: 2.wav Playback: 3.wav Etc Can this be done in the XML dialplan or do I need to use some scripting language to control the dialplan? _________________________________________________________________________ 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
Hi Grant, You can set the sound-prefix channel variable to the path that has your voice prompts. Duvid Rottenberg On Mon, Feb 10, 2014 at 4:10 AM, Grant Bagdasarian <GB@cm.nl> wrote:
Hello,
Does anyone have an idea about this issue below?
Thanks!
Grant
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Grant Bagdasarian *Sent:* Monday, February 3, 2014 3:56 PM
*To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Split string and play charachters
Hello,
Yes, I found that one also. I'm just not sure if it also lets me define which audio files to use?
I'm using the originate command to originate a call from an external application using the ESL library, but we have multiple customers which will use the same context in Freeswitch, but the audio files played are located in a different directory for each customer.
So, for Customer ID 1 the directory should be something like this:
/../audio/1/characters/
For Customer ID 2:
/.. /audio/2/characters/
Etc.
I want to build the audio directory path dynamically and have the characters played from that directory.
Is that possible with the Say application? If not, how should I approach this? Dialplan scripting?
Regards,
Grant
*From:* freeswitch-users-bounces@lists.freeswitch.org [ mailto:freeswitch-users-bounces@lists.freeswitch.org<freeswitch-users-bounces@lists.freeswitch.org>] *On Behalf Of *Gabe Shepard *Sent:* Monday, February 3, 2014 3:35 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Split string and play charachters
Hi,
It sounds like you're looking for the say application, with a say method of "iterated"?
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_say
-Gabe
On Mon, Feb 3, 2014 at 9:03 AM, Grant Bagdasarian <GB@cm.nl> wrote:
Hello,
Is there an application which plays the characters of a string individually?
Or have some sort of split function which splits a string into characters and then manually map the 'character_name' to an existing audio file?
For instance:
//String: 1234567890
//Split the string
Playback: 1.wav
Playback: 2.wav
Playback: 3.wav
Etc
Can this be done in the XML dialplan or do I need to use some scripting language to control the dialplan?
_________________________________________________________________________ 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
Hello Duvid, I did the following in my dialplan: <action application="set" data="security_code=123456" /> <action application="set" data="sound_prefix=/usr/src/freeswitch/sounds/1/"/> <action application="say" data="en name_spelled iterated ${security_code}" /> The 1 is the ID of the Customer. In this directory I have a subdirectory for the languages, one named "en". Inside the "en" directory reside all the files in .wav format, including 0-9 and a-z: 1.wav 2.wav .. a.wav b.wav .. I'm still getting the following error: EXECUTE sofia/inbound/1001@192.168.1.10 say(en name_spelled iterated 123456) 2014-02-10 16:47:27.007152 [ERR] switch_xml.c:3182 Open of languages and phrases failed. What did I do wrong? Regards, Grant From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Duvid Rottenberg Sent: Monday, February 10, 2014 4:19 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Split string and play charachters Hi Grant, You can set the sound-prefix channel variable to the path that has your voice prompts. Duvid Rottenberg On Mon, Feb 10, 2014 at 4:10 AM, Grant Bagdasarian <GB@cm.nl<mailto:GB@cm.nl>> wrote: Hello, Does anyone have an idea about this issue below? Thanks! Grant 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 Grant Bagdasarian Sent: Monday, February 3, 2014 3:56 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Split string and play charachters Hello, Yes, I found that one also. I'm just not sure if it also lets me define which audio files to use? I'm using the originate command to originate a call from an external application using the ESL library, but we have multiple customers which will use the same context in Freeswitch, but the audio files played are located in a different directory for each customer. So, for Customer ID 1 the directory should be something like this: /../audio/1/characters/ For Customer ID 2: /.. /audio/2/characters/ Etc. I want to build the audio directory path dynamically and have the characters played from that directory. Is that possible with the Say application? If not, how should I approach this? Dialplan scripting? Regards, Grant From: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Gabe Shepard Sent: Monday, February 3, 2014 3:35 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Split string and play charachters Hi, It sounds like you're looking for the say application, with a say method of "iterated"? http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_say -Gabe On Mon, Feb 3, 2014 at 9:03 AM, Grant Bagdasarian <GB@cm.nl<mailto:GB@cm.nl>> wrote: Hello, Is there an application which plays the characters of a string individually? Or have some sort of split function which splits a string into characters and then manually map the 'character_name' to an existing audio file? For instance: //String: 1234567890 //Split the string Playback: 1.wav Playback: 2.wav Playback: 3.wav Etc Can this be done in the XML dialplan or do I need to use some scripting language to control the dialplan? _________________________________________________________________________ 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 _________________________________________________________________________ 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
I found this advice in a previous posting in this list http://lists.freeswitch.org/pipermail/freeswitch-users/2010-October/063498.h... I also have a need for this functionality, but have not yet gotten around to implement it. On Mon, Feb 10, 2014 at 10:54 AM, Grant Bagdasarian <GB@cm.nl> wrote:
Hello Duvid,
I did the following in my dialplan:
<action application="set" data="security_code=123456" />
<action application="set" data="sound_prefix=/usr/src/freeswitch/sounds/1/"/>
<action application="say" data="en name_spelled iterated ${security_code}" />
The 1 is the ID of the Customer. In this directory I have a subdirectory for the languages, one named "en".
Inside the "en" directory reside all the files in .wav format, including 0-9 and a-z:
1.wav
2.wav
..
a.wav
b.wav
..
I'm still getting the following error:
EXECUTE sofia/inbound/1001@192.168.1.10 say(en name_spelled iterated 123456)
2014-02-10 16:47:27.007152 [ERR] switch_xml.c:3182 Open of languages and phrases failed.
What did I do wrong?
Regards,
Grant
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Duvid Rottenberg *Sent:* Monday, February 10, 2014 4:19 PM
*To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Split string and play charachters
Hi Grant,
You can set the sound-prefix channel variable to the path that has your voice prompts.
Duvid Rottenberg
On Mon, Feb 10, 2014 at 4:10 AM, Grant Bagdasarian <GB@cm.nl> wrote:
Hello,
Does anyone have an idea about this issue below?
Thanks!
Grant
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Grant Bagdasarian *Sent:* Monday, February 3, 2014 3:56 PM
*To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Split string and play charachters
Hello,
Yes, I found that one also. I'm just not sure if it also lets me define which audio files to use?
I'm using the originate command to originate a call from an external application using the ESL library, but we have multiple customers which will use the same context in Freeswitch, but the audio files played are located in a different directory for each customer.
So, for Customer ID 1 the directory should be something like this:
/../audio/1/characters/
For Customer ID 2:
/.. /audio/2/characters/
Etc.
I want to build the audio directory path dynamically and have the characters played from that directory.
Is that possible with the Say application? If not, how should I approach this? Dialplan scripting?
Regards,
Grant
*From:* freeswitch-users-bounces@lists.freeswitch.org [ mailto:freeswitch-users-bounces@lists.freeswitch.org<freeswitch-users-bounces@lists.freeswitch.org>] *On Behalf Of *Gabe Shepard *Sent:* Monday, February 3, 2014 3:35 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Split string and play charachters
Hi,
It sounds like you're looking for the say application, with a say method of "iterated"?
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_say
-Gabe
On Mon, Feb 3, 2014 at 9:03 AM, Grant Bagdasarian <GB@cm.nl> wrote:
Hello,
Is there an application which plays the characters of a string individually?
Or have some sort of split function which splits a string into characters and then manually map the 'character_name' to an existing audio file?
For instance:
//String: 1234567890
//Split the string
Playback: 1.wav
Playback: 2.wav
Playback: 3.wav
Etc
Can this be done in the XML dialplan or do I need to use some scripting language to control the dialplan?
_________________________________________________________________________ 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
_________________________________________________________________________ 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
Hello Duvid, I tried what was in the posting, but I'm still getting the same error. I located it in the source code, and the following code is executed in switch_xml.c SWITCH_DECLARE(switch_status_t) switch_xml_locate_language(switch_xml_t *root, switch_xml_t *node, switch_event_t *params, switch_xml_t *language, switch_xml_t *phrases, switch_xml_t *macros, const char *str_language) { switch_status_t status = SWITCH_STATUS_FALSE; if (switch_xml_locate("languages", NULL, NULL, NULL, root, node, params, SWITCH_TRUE) != SWITCH_STATUS_SUCCESS) { switch_xml_t sub_macros; if (switch_xml_locate("phrases", NULL, NULL, NULL, root, node, params, SWITCH_TRUE) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of languages and phrases failed.\n"); goto done; } ... The code is trying to locate something, somewhere in a xml file, but I can't figure out which xml it's trying to locate the language and phrases in. Does anyone know which XML is being referenced here? Regards, Grant From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Duvid Rottenberg Sent: Monday, February 10, 2014 6:06 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Split string and play charachters I found this advice in a previous posting in this list http://lists.freeswitch.org/pipermail/freeswitch-users/2010-October/063498.h... I also have a need for this functionality, but have not yet gotten around to implement it. On Mon, Feb 10, 2014 at 10:54 AM, Grant Bagdasarian <GB@cm.nl<mailto:GB@cm.nl>> wrote: Hello Duvid, I did the following in my dialplan: <action application="set" data="security_code=123456" /> <action application="set" data="sound_prefix=/usr/src/freeswitch/sounds/1/"/> <action application="say" data="en name_spelled iterated ${security_code}" /> The 1 is the ID of the Customer. In this directory I have a subdirectory for the languages, one named "en". Inside the "en" directory reside all the files in .wav format, including 0-9 and a-z: 1.wav 2.wav .. a.wav b.wav .. I'm still getting the following error: EXECUTE sofia/inbound/1001@192.168.1.10<mailto:1001@192.168.1.10> say(en name_spelled iterated 123456) 2014-02-10 16:47:27.007152 [ERR] switch_xml.c:3182 Open of languages and phrases failed. What did I do wrong? Regards, Grant 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 Duvid Rottenberg Sent: Monday, February 10, 2014 4:19 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Split string and play charachters Hi Grant, You can set the sound-prefix channel variable to the path that has your voice prompts. Duvid Rottenberg On Mon, Feb 10, 2014 at 4:10 AM, Grant Bagdasarian <GB@cm.nl<mailto:GB@cm.nl>> wrote: Hello, Does anyone have an idea about this issue below? Thanks! Grant 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 Grant Bagdasarian Sent: Monday, February 3, 2014 3:56 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Split string and play charachters Hello, Yes, I found that one also. I'm just not sure if it also lets me define which audio files to use? I'm using the originate command to originate a call from an external application using the ESL library, but we have multiple customers which will use the same context in Freeswitch, but the audio files played are located in a different directory for each customer. So, for Customer ID 1 the directory should be something like this: /../audio/1/characters/ For Customer ID 2: /.. /audio/2/characters/ Etc. I want to build the audio directory path dynamically and have the characters played from that directory. Is that possible with the Say application? If not, how should I approach this? Dialplan scripting? Regards, Grant From: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Gabe Shepard Sent: Monday, February 3, 2014 3:35 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Split string and play charachters Hi, It sounds like you're looking for the say application, with a say method of "iterated"? http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_say -Gabe On Mon, Feb 3, 2014 at 9:03 AM, Grant Bagdasarian <GB@cm.nl<mailto:GB@cm.nl>> wrote: Hello, Is there an application which plays the characters of a string individually? Or have some sort of split function which splits a string into characters and then manually map the 'character_name' to an existing audio file? For instance: //String: 1234567890 //Split the string Playback: 1.wav Playback: 2.wav Playback: 3.wav Etc Can this be done in the XML dialplan or do I need to use some scripting language to control the dialplan? _________________________________________________________________________ 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 _________________________________________________________________________ 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 _________________________________________________________________________ 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
I think I found it. I currently don't have a test machine, so I would appreciate it if someone could confirm this. The languages section should be in freeswitch.xml. In my case, it is not, since I've built the freeswitch.xml from scratch. I should add a lang directory and add .xml files for each language. From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Grant Bagdasarian Sent: Tuesday, February 11, 2014 8:49 AM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Split string and play charachters Hello Duvid, I tried what was in the posting, but I'm still getting the same error. I located it in the source code, and the following code is executed in switch_xml.c SWITCH_DECLARE(switch_status_t) switch_xml_locate_language(switch_xml_t *root, switch_xml_t *node, switch_event_t *params, switch_xml_t *language, switch_xml_t *phrases, switch_xml_t *macros, const char *str_language) { switch_status_t status = SWITCH_STATUS_FALSE; if (switch_xml_locate("languages", NULL, NULL, NULL, root, node, params, SWITCH_TRUE) != SWITCH_STATUS_SUCCESS) { switch_xml_t sub_macros; if (switch_xml_locate("phrases", NULL, NULL, NULL, root, node, params, SWITCH_TRUE) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of languages and phrases failed.\n"); goto done; } ... The code is trying to locate something, somewhere in a xml file, but I can't figure out which xml it's trying to locate the language and phrases in. Does anyone know which XML is being referenced here? Regards, Grant
More or less, note how those phrase macros are included in the full config as well. On Feb 11, 2014, at 3:48 AM, Grant Bagdasarian <GB@cm.nl> wrote:
I think I found it.
I currently don’t have a test machine, so I would appreciate it if someone could confirm this.
The languages section should be in freeswitch.xml. In my case, it is not, since I’ve built the freeswitch.xml from scratch. I should add a lang directory and add .xml files for each language.
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Grant Bagdasarian Sent: Tuesday, February 11, 2014 8:49 AM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Split string and play charachters
Hello Duvid,
I tried what was in the posting, but I’m still getting the same error.
I located it in the source code, and the following code is executed in switch_xml.c
SWITCH_DECLARE(switch_status_t) switch_xml_locate_language(switch_xml_t *root, switch_xml_t *node, switch_event_t *params, switch_xml_t *language, switch_xml_t *phrases, switch_xml_t *macros, const char *str_language) { switch_status_t status = SWITCH_STATUS_FALSE;
if (switch_xml_locate("languages", NULL, NULL, NULL, root, node, params, SWITCH_TRUE) != SWITCH_STATUS_SUCCESS) { switch_xml_t sub_macros;
if (switch_xml_locate("phrases", NULL, NULL, NULL, root, node, params, SWITCH_TRUE) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of languages and phrases failed.\n"); goto done; } …
The code is trying to locate something, somewhere in a xml file, but I can’t figure out which xml it’s trying to locate the language and phrases in.
Does anyone know which XML is being referenced here?
Regards,
Grant
participants (4)
-
Duvid Rottenberg
-
Gabe Shepard
-
Grant Bagdasarian
-
Michael Jerris