Session-wise Language Setting
Hi All Just wondering whether we can define the language from beginning of the call means when a call is originated or landed to Freeswitch, can we define the language of all the prompts whether the call should be processed in English or Russian or so on.? Regards Sharad ----- Original Message ----- From: <freeswitch-users-request@lists.freeswitch.org> To: <freeswitch-users@lists.freeswitch.org> Sent: Thursday, March 29, 2012 7:33 AM Subject: FreeSWITCH-users Digest, Vol 69, Issue 282
Send FreeSWITCH-users mailing list submissions to freeswitch-users@lists.freeswitch.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.freeswitch.org/mailman/listinfo/freeswitch-users or, via email, send a message with subject or body 'help' to freeswitch-users-request@lists.freeswitch.org
You can reach the person managing the list at freeswitch-users-owner@lists.freeswitch.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of FreeSWITCH-users digest..."
--------------------------------------------------------------------------------
Today's Topics:
1. Re: Open Bugs on Jira and Call for help (Ken Rice) 2. mod_callcenter and moh-sound (Vik Killa) 3. Re: mod_callcenter and moh-sound (Vik Killa) 4. Registration VIA TCP (Rob Moore) 5. Forward calls from opensips to freeswitch (Sherif Omran) 6. Re: Registration VIA TCP (Mitch Capper)
--------------------------------------------------------------------------------
_______________________________________________ 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
Yes! On incoming calls, I set default_language to either en or fr (I'm in Canada), depending on the DID. I can also change that variable in an IVR if the caller wants to change the language. On outgoing calls, I set the same variable in the directory, so that any call that a phone makes will have a language set. This is great in a multi-lingual environment, as each user can have a language preference that will be used for voice mail and other system prompts. We store that in a database and also have the provisioning system look to that same variable, so the screen labels and text on the phone is the same language. -Tim Sharad Garg wrote:
Hi All
Just wondering whether we can define the language from beginning of the call means when a call is originated or landed to Freeswitch, can we define the language of all the prompts whether the call should be processed in English or Russian or so on.?
Regards Sharad
----- Original Message ----- From: <freeswitch-users-request@lists.freeswitch.org> To: <freeswitch-users@lists.freeswitch.org> Sent: Thursday, March 29, 2012 7:33 AM Subject: FreeSWITCH-users Digest, Vol 69, Issue 282
Send FreeSWITCH-users mailing list submissions to freeswitch-users@lists.freeswitch.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.freeswitch.org/mailman/listinfo/freeswitch-users or, via email, send a message with subject or body 'help' to freeswitch-users-request@lists.freeswitch.org
You can reach the person managing the list at freeswitch-users-owner@lists.freeswitch.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of FreeSWITCH-users digest..."
--------------------------------------------------------------------------------
Today's Topics:
1. Re: Open Bugs on Jira and Call for help (Ken Rice) 2. mod_callcenter and moh-sound (Vik Killa) 3. Re: mod_callcenter and moh-sound (Vik Killa) 4. Registration VIA TCP (Rob Moore) 5. Forward calls from opensips to freeswitch (Sherif Omran) 6. Re: Registration VIA TCP (Mitch Capper)
--------------------------------------------------------------------------------
_______________________________________________ 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
Dear Tim, Thanks for your kind reply. Just another curisity....For a live call, if I set the default_language say English, now that call will be entertained in english. Now while first call is in progreess, second call comes & this caller opts for Russian...so we have to set default language as russian. In this case, all the voice prompts which are being played to first caller, will be in russian. Is'nt it ? Actually first call should continue in english & second call should be in russian & so on. Plz clarify. Regards Sharad ----- Original Message ----- From: "Tim St. Pierre" <fs-list@communicatefreely.net> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Thursday, March 29, 2012 7:47 PM Subject: Re: [Freeswitch-users] Session-wise Language Setting
Yes!
On incoming calls, I set default_language to either en or fr (I'm in Canada), depending on the DID. I can also change that variable in an IVR if the caller wants to change the language. On outgoing calls, I set the same variable in the directory, so that any call that a phone makes will have a language set. This is great in a multi-lingual environment, as each user can have a language preference that will be used for voice mail and other system prompts. We store that in a database and also have the provisioning system look to that same variable, so the screen labels and text on the phone is the same language.
-Tim
Sharad Garg wrote:
Hi All
Just wondering whether we can define the language from beginning of the call means when a call is originated or landed to Freeswitch, can we define the language of all the prompts whether the call should be processed in English or Russian or so on.?
Regards Sharad
----- Original Message ----- From: <freeswitch-users-request@lists.freeswitch.org> To: <freeswitch-users@lists.freeswitch.org> Sent: Thursday, March 29, 2012 7:33 AM Subject: FreeSWITCH-users Digest, Vol 69, Issue 282
Send FreeSWITCH-users mailing list submissions to freeswitch-users@lists.freeswitch.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.freeswitch.org/mailman/listinfo/freeswitch-users or, via email, send a message with subject or body 'help' to freeswitch-users-request@lists.freeswitch.org
You can reach the person managing the list at freeswitch-users-owner@lists.freeswitch.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of FreeSWITCH-users digest..."
--------------------------------------------------------------------------------
Today's Topics:
1. Re: Open Bugs on Jira and Call for help (Ken Rice) 2. mod_callcenter and moh-sound (Vik Killa) 3. Re: mod_callcenter and moh-sound (Vik Killa) 4. Registration VIA TCP (Rob Moore) 5. Forward calls from opensips to freeswitch (Sherif Omran) 6. Re: Registration VIA TCP (Mitch Capper)
--------------------------------------------------------------------------------
_______________________________________________ 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
It's a channel variable, it's unique per channel, so there is no risk that a variable on channel A overwrites the value of the variable in channel B. /Peter ________________________________________ Från: freeswitch-users-bounces@lists.freeswitch.org [freeswitch-users-bounces@lists.freeswitch.org] för Sharad Garg [sharad@coraltele.com] Skickat: den 30 mars 2012 08:11 Till: FreeSWITCH Users Help Ämne: Re: [Freeswitch-users] Session-wise Language Setting Dear Tim, Thanks for your kind reply. Just another curisity....For a live call, if I set the default_language say English, now that call will be entertained in english. Now while first call is in progreess, second call comes & this caller opts for Russian...so we have to set default language as russian. In this case, all the voice prompts which are being played to first caller, will be in russian. Is'nt it ? Actually first call should continue in english & second call should be in russian & so on. Plz clarify. Regards Sharad ----- Original Message ----- From: "Tim St. Pierre" <fs-list@communicatefreely.net> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Thursday, March 29, 2012 7:47 PM Subject: Re: [Freeswitch-users] Session-wise Language Setting
Yes!
On incoming calls, I set default_language to either en or fr (I'm in Canada), depending on the DID. I can also change that variable in an IVR if the caller wants to change the language. On outgoing calls, I set the same variable in the directory, so that any call that a phone makes will have a language set. This is great in a multi-lingual environment, as each user can have a language preference that will be used for voice mail and other system prompts. We store that in a database and also have the provisioning system look to that same variable, so the screen labels and text on the phone is the same language.
-Tim
Sharad Garg wrote:
Hi All
Just wondering whether we can define the language from beginning of the call means when a call is originated or landed to Freeswitch, can we define the language of all the prompts whether the call should be processed in English or Russian or so on.?
Regards Sharad
----- Original Message ----- From: <freeswitch-users-request@lists.freeswitch.org> To: <freeswitch-users@lists.freeswitch.org> Sent: Thursday, March 29, 2012 7:33 AM Subject: FreeSWITCH-users Digest, Vol 69, Issue 282
Send FreeSWITCH-users mailing list submissions to freeswitch-users@lists.freeswitch.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.freeswitch.org/mailman/listinfo/freeswitch-users or, via email, send a message with subject or body 'help' to freeswitch-users-request@lists.freeswitch.org
You can reach the person managing the list at freeswitch-users-owner@lists.freeswitch.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of FreeSWITCH-users digest..."
--------------------------------------------------------------------------------
Today's Topics:
1. Re: Open Bugs on Jira and Call for help (Ken Rice) 2. mod_callcenter and moh-sound (Vik Killa) 3. Re: mod_callcenter and moh-sound (Vik Killa) 4. Registration VIA TCP (Rob Moore) 5. Forward calls from opensips to freeswitch (Sherif Omran) 6. Re: Registration VIA TCP (Mitch Capper)
--------------------------------------------------------------------------------
_______________________________________________ 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 !DSPAM:4f75538432768881816776!
Thanks Peter...yes it works. Just a last query - Is there any API for setting the same so that it can be used from Javascript. Best Regards Sharad ----- Original Message ----- From: "Peter Olsson" <peter.olsson@visionutveckling.se> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Friday, March 30, 2012 12:16 PM Subject: Re: [Freeswitch-users] Session-wise Language Setting It's a channel variable, it's unique per channel, so there is no risk that a variable on channel A overwrites the value of the variable in channel B. /Peter ________________________________________ Från: freeswitch-users-bounces@lists.freeswitch.org [freeswitch-users-bounces@lists.freeswitch.org] för Sharad Garg [sharad@coraltele.com] Skickat: den 30 mars 2012 08:11 Till: FreeSWITCH Users Help Ämne: Re: [Freeswitch-users] Session-wise Language Setting Dear Tim, Thanks for your kind reply. Just another curisity....For a live call, if I set the default_language say English, now that call will be entertained in english. Now while first call is in progreess, second call comes & this caller opts for Russian...so we have to set default language as russian. In this case, all the voice prompts which are being played to first caller, will be in russian. Is'nt it ? Actually first call should continue in english & second call should be in russian & so on. Plz clarify. Regards Sharad ----- Original Message ----- From: "Tim St. Pierre" <fs-list@communicatefreely.net> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Thursday, March 29, 2012 7:47 PM Subject: Re: [Freeswitch-users] Session-wise Language Setting
Yes!
On incoming calls, I set default_language to either en or fr (I'm in Canada), depending on the DID. I can also change that variable in an IVR if the caller wants to change the language. On outgoing calls, I set the same variable in the directory, so that any call that a phone makes will have a language set. This is great in a multi-lingual environment, as each user can have a language preference that will be used for voice mail and other system prompts. We store that in a database and also have the provisioning system look to that same variable, so the screen labels and text on the phone is the same language.
-Tim
Sharad Garg wrote:
Hi All
Just wondering whether we can define the language from beginning of the call means when a call is originated or landed to Freeswitch, can we define the language of all the prompts whether the call should be processed in English or Russian or so on.?
Regards Sharad
----- Original Message ----- From: <freeswitch-users-request@lists.freeswitch.org> To: <freeswitch-users@lists.freeswitch.org> Sent: Thursday, March 29, 2012 7:33 AM Subject: FreeSWITCH-users Digest, Vol 69, Issue 282
Send FreeSWITCH-users mailing list submissions to freeswitch-users@lists.freeswitch.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.freeswitch.org/mailman/listinfo/freeswitch-users or, via email, send a message with subject or body 'help' to freeswitch-users-request@lists.freeswitch.org
You can reach the person managing the list at freeswitch-users-owner@lists.freeswitch.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of FreeSWITCH-users digest..."
--------------------------------------------------------------------------------
Today's Topics:
1. Re: Open Bugs on Jira and Call for help (Ken Rice) 2. mod_callcenter and moh-sound (Vik Killa) 3. Re: mod_callcenter and moh-sound (Vik Killa) 4. Registration VIA TCP (Rob Moore) 5. Forward calls from opensips to freeswitch (Sherif Omran) 6. Re: Registration VIA TCP (Mitch Capper)
--------------------------------------------------------------------------------
_______________________________________________ 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 !DSPAM:4f75538432768881816776!
On Fri, Mar 30, 2012 at 5:13 AM, Sharad Garg <sharad@coraltele.com> wrote:
Thanks Peter...yes it works.
Just a last query - Is there any API for setting the same so that it can be used from Javascript.
Best Regards Sharad
Hello Mr. MC Thanks for the link.....seems working. But observed another point i.e. it works only for the speech phrase macros. When I write a simple xml dialplan like this - <extension name="lang_test"> <condition field="destination_number" expression="^(3333)$"> <action application="set" data="bypass_media=true"/> <action application="answer"/> <action application="sleep" data="1000"/> <action application="set" data="default_language=ru"/> <action application="playback" data="ivr/test.wav"/> </condition> </extension> This dialplan still plays the test.wav which is in <base_dir>/sounds/en/us/callie/ivr/8000/test.wav. While it should play the test.wav from <base_dir>/sounds/ru/RU/elena/ivr/8000/test.wav. & at the same time, speech phrase macro use the 'ru' language. So when I did my googling, I found that the language settings is only for speech phrase macros. It is not implemented in Freeswitch to use the desired languages at all places. So need to know is there any latest development on this ? Thanks in advance. Regards Sharad ----- Original Message ----- From: Michael Collins To: FreeSWITCH Users Help Sent: Saturday, March 31, 2012 1:15 AM Subject: Re: [Freeswitch-users] Session-wise Language Setting On Fri, Mar 30, 2012 at 5:13 AM, Sharad Garg <sharad@coraltele.com> wrote: Thanks Peter...yes it works. Just a last query - Is there any API for setting the same so that it can be used from Javascript. Best Regards Sharad http://wiki.freeswitch.org/wiki/Mod_commands#uuid_setvar
Hi Sharad, When you specify a sound file to play like that, it uses a prefix defined (usually) in vars.xml, and it doesn't expand to the language. The assumption by the designers I assume was that you would change the prefix to your language. For multi-language systems, you should always use phrase macros. On our system, we made several custom phrase macros that are very simple, but will select the correct audio file based on the language. Any time you would normally specify an audio file, you can instead use phrase:my_macro:data Then, create a phrase macro for each language that will match your data and play the appropriate audio file. It could be something as simple as this: English: <macro name="ivr-file"> <input pattern="^(\w+)$"> <match> <action function="play-file" data="$${media_dir}/en/us/callie/ivr/$1wav"/> </match> </input> </macro And then in your Russian phrase macros: <macro name="ivr-file"> <input pattern="^(\w+)$"> <match> <action function="play-file" data="$${media_dir}/ru/RU/elena/ivr/$1wav"/> </match> </input> </macro Be creative here. Phrase macros are your friend. I would limit playing audio files to things like sound effects, or other non-verbal recordings. Sharad Garg wrote:
Hello Mr. MC
Thanks for the link.....seems working.
But observed another point i.e. it works only for the speech phrase macros.
When I write a simple xml dialplan like this -
<extension name="lang_test"> <condition field="destination_number" expression="^(3333)$"> <action application="set" data="bypass_media=true"/> <action application="answer"/> <action application="sleep" data="1000"/> <action application="set" data="default_language=ru"/> <action application="playback" data="ivr/test.wav"/> </condition> </extension>
This dialplan still plays the test.wav which is in <base_dir>/sounds/en/us/callie/ivr/8000/test.wav. While it should play the test.wav from <base_dir>/sounds/ru/RU/elena/ivr/8000/test.wav. & at the same time, speech phrase macro use the 'ru' language.
So when I did my googling, I found that the language settings is only for speech phrase macros. It is not implemented in Freeswitch to use the desired languages at all places.
So need to know is there any latest development on this ?
Thanks in advance.
Regards
Sharad
----- Original Message ----- *From:* Michael Collins <mailto:msc@freeswitch.org> *To:* FreeSWITCH Users Help <mailto:freeswitch-users@lists.freeswitch.org> *Sent:* Saturday, March 31, 2012 1:15 AM *Subject:* Re: [Freeswitch-users] Session-wise Language Setting
On Fri, Mar 30, 2012 at 5:13 AM, Sharad Garg <sharad@coraltele.com <mailto:sharad@coraltele.com>> wrote:
Thanks Peter...yes it works.
Just a last query - Is there any API for setting the same so that it can be used from Javascript.
Best Regards Sharad
http://wiki.freeswitch.org/wiki/Mod_commands#uuid_setvar
------------------------------------------------------------------------
_________________________________________________________________________ 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 Mr. Tim Thanks a ton for your valuable suggestion & time. I think I found the solution of my query. I will definately try this & let you know the feedback. Thanks a lot once again. Take care n by. Sharad ----- Original Message ----- From: "Tim St. Pierre" <fs-list@communicatefreely.net> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Monday, April 02, 2012 9:19 PM Subject: Re: [Freeswitch-users] Session-wise Language Setting
Hi Sharad,
When you specify a sound file to play like that, it uses a prefix defined (usually) in vars.xml, and it doesn't expand to the language. The assumption by the designers I assume was that you would change the prefix to your language.
For multi-language systems, you should always use phrase macros.
On our system, we made several custom phrase macros that are very simple, but will select the correct audio file based on the language.
Any time you would normally specify an audio file, you can instead use phrase:my_macro:data
Then, create a phrase macro for each language that will match your data and play the appropriate audio file.
It could be something as simple as this: English:
<macro name="ivr-file"> <input pattern="^(\w+)$"> <match> <action function="play-file" data="$${media_dir}/en/us/callie/ivr/$1wav"/> </match> </input> </macro
And then in your Russian phrase macros:
<macro name="ivr-file"> <input pattern="^(\w+)$"> <match> <action function="play-file" data="$${media_dir}/ru/RU/elena/ivr/$1wav"/> </match> </input> </macro
Be creative here. Phrase macros are your friend. I would limit playing audio files to things like sound effects, or other non-verbal recordings.
Sharad Garg wrote:
Hello Mr. MC
Thanks for the link.....seems working.
But observed another point i.e. it works only for the speech phrase macros.
When I write a simple xml dialplan like this -
<extension name="lang_test"> <condition field="destination_number" expression="^(3333)$"> <action application="set" data="bypass_media=true"/> <action application="answer"/> <action application="sleep" data="1000"/> <action application="set" data="default_language=ru"/> <action application="playback" data="ivr/test.wav"/> </condition> </extension>
This dialplan still plays the test.wav which is in <base_dir>/sounds/en/us/callie/ivr/8000/test.wav. While it should play the test.wav from <base_dir>/sounds/ru/RU/elena/ivr/8000/test.wav. & at the same time, speech phrase macro use the 'ru' language.
So when I did my googling, I found that the language settings is only for speech phrase macros. It is not implemented in Freeswitch to use the desired languages at all places.
So need to know is there any latest development on this ?
Thanks in advance.
Regards
Sharad
----- Original Message ----- *From:* Michael Collins <mailto:msc@freeswitch.org> *To:* FreeSWITCH Users Help <mailto:freeswitch-users@lists.freeswitch.org> *Sent:* Saturday, March 31, 2012 1:15 AM *Subject:* Re: [Freeswitch-users] Session-wise Language Setting
On Fri, Mar 30, 2012 at 5:13 AM, Sharad Garg <sharad@coraltele.com <mailto:sharad@coraltele.com>> wrote:
Thanks Peter...yes it works.
Just a last query - Is there any API for setting the same so that it can be used from Javascript.
Best Regards Sharad
http://wiki.freeswitch.org/wiki/Mod_commands#uuid_setvar
------------------------------------------------------------------------
_________________________________________________________________________ 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
Dear Mr. Tim, Your suggested way has worked. Thanks for your kind help. Best Regards Sharad ----- Original Message ----- From: "Sharad Garg" <sharad@coraltele.com> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Tuesday, April 03, 2012 12:44 PM Subject: Re: [Freeswitch-users] Session-wise Language Setting
Hello Mr. Tim
Thanks a ton for your valuable suggestion & time.
I think I found the solution of my query. I will definately try this & let you know the feedback.
Thanks a lot once again.
Take care n by.
Sharad
----- Original Message ----- From: "Tim St. Pierre" <fs-list@communicatefreely.net> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Monday, April 02, 2012 9:19 PM Subject: Re: [Freeswitch-users] Session-wise Language Setting
Hi Sharad,
When you specify a sound file to play like that, it uses a prefix defined (usually) in vars.xml, and it doesn't expand to the language. The assumption by the designers I assume was that you would change the prefix to your language.
For multi-language systems, you should always use phrase macros.
On our system, we made several custom phrase macros that are very simple, but will select the correct audio file based on the language.
Any time you would normally specify an audio file, you can instead use phrase:my_macro:data
Then, create a phrase macro for each language that will match your data and play the appropriate audio file.
It could be something as simple as this: English:
<macro name="ivr-file"> <input pattern="^(\w+)$"> <match> <action function="play-file" data="$${media_dir}/en/us/callie/ivr/$1wav"/> </match> </input> </macro
And then in your Russian phrase macros:
<macro name="ivr-file"> <input pattern="^(\w+)$"> <match> <action function="play-file" data="$${media_dir}/ru/RU/elena/ivr/$1wav"/> </match> </input> </macro
Be creative here. Phrase macros are your friend. I would limit playing audio files to things like sound effects, or other non-verbal recordings.
Sharad Garg wrote:
Hello Mr. MC
Thanks for the link.....seems working.
But observed another point i.e. it works only for the speech phrase macros.
When I write a simple xml dialplan like this -
<extension name="lang_test"> <condition field="destination_number" expression="^(3333)$"> <action application="set" data="bypass_media=true"/> <action application="answer"/> <action application="sleep" data="1000"/> <action application="set" data="default_language=ru"/> <action application="playback" data="ivr/test.wav"/> </condition> </extension>
This dialplan still plays the test.wav which is in <base_dir>/sounds/en/us/callie/ivr/8000/test.wav. While it should play the test.wav from <base_dir>/sounds/ru/RU/elena/ivr/8000/test.wav. & at the same time, speech phrase macro use the 'ru' language.
So when I did my googling, I found that the language settings is only for speech phrase macros. It is not implemented in Freeswitch to use the desired languages at all places.
So need to know is there any latest development on this ?
Thanks in advance.
Regards
Sharad
----- Original Message ----- *From:* Michael Collins <mailto:msc@freeswitch.org> *To:* FreeSWITCH Users Help <mailto:freeswitch-users@lists.freeswitch.org> *Sent:* Saturday, March 31, 2012 1:15 AM *Subject:* Re: [Freeswitch-users] Session-wise Language Setting
On Fri, Mar 30, 2012 at 5:13 AM, Sharad Garg <sharad@coraltele.com <mailto:sharad@coraltele.com>> wrote:
Thanks Peter...yes it works.
Just a last query - Is there any API for setting the same so that it can be used from Javascript.
Best Regards Sharad
http://wiki.freeswitch.org/wiki/Mod_commands#uuid_setvar
------------------------------------------------------------------------
_________________________________________________________________________ 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
participants (4)
-
Michael Collins
-
Peter Olsson
-
Sharad Garg
-
Tim St. Pierre