In this tutorial I will show you how to configure  ivr_demo and Voice mail in German Language.You can configure even your dial plan.

1) Basic Setup

Install German sounds from freeswitch-sounds-de-at-ute-8000-0.0.1.tar.gz  from http://freeswitch.xpirio.com/

extract in /opt/freeswitch/sounds.

In directory  “opt/freeswitch/sounds/de/at/ute/” create folder ivr and copy “8000” folder from “opt/freeswitch/sounds/de/at/ute/ivr_not_ok” . This step is important to enable ivr in German.

Install  freeswitch-lang-de  from synaptic if not installed.

Add ” <load module=”mod_say_de” />  ” in  /conf/autoconf/module.conf.xml  under ” <!– Say –> ” section.

In freeswitch.xml  add  ”  <X-PRE-PROCESS cmd=”include” data=”lang/de/*.xml”/> ”

<section name="phrases" description="Speech Phrase Management">
<macros>
<X-PRE-PROCESS cmd="include" data="lang/de/*.xml"/>
<X-PRE-PROCESS cmd="include" data="lang/en/*.xml"/>
</macros>
</section>

modify sound-path in /conf/lang/de/de.xml  to “$${sounds_dir}/de/at/ute”  .


<include>
<language name="de" sound-path="$${sounds_dir}/de/at/ute" tts-engine="cepstral" tts-voice="david">
<X-PRE-PROCESS cmd="include" data="demo/*.xml"/>
<!--voicemail_de_tts is purely implemented with tts, we need a files based implementation too -->

<X-PRE-PROCESS cmd=”include” data=”vm/tts.xml”/>

</language>
</include>

2) ivr_demo in German.

goto  /conf/dialplan/default.xml  .search for “ivr_demo” . when you call on 5000 ,you will hear  ivr in english language. To configure it in German add following line under “condition” section in “ivr_demo” extension.

<action application=”set” data=”default_language=de”/>

For example.

<!-- a sample IVR  -->
<extension name="ivr_demo">
<condition field="destination_number" expression="^5000$">
<action application="set" data="default_language=de"/>
<action application="answer"/>
<action application="sleep" data="2000"/>
<action application="ivr" data="demo_ivr"/>
</condition>
</extension>

copy /opt/freeswitch/conf/lang/en/demo/demo-ivr.xml to /opt/freeswitch/conf/lang/de/demo/ .

and modify /opt/freeswitch/conf/lang/de/de.xml to

<include>
<language name="de" sound-path="$${sounds_dir}/de/at/ute" tts-engine="cepstral" tts-voice="david">
    <X-PRE-PROCESS cmd="include" data="demo/*.xml"/>
<!--voicemail_de_tts is purely implemented with tts, we need a files based implementation too -->
<X-PRE-PROCESS cmd="include" data="vm/tts.xml"/>
</language>
</include>

IF you don’t follow above step you will get following error when you call on 5000

[ERR] switch_ivr_play_say.c:150 Can't find macro demo_ivr_main_menu.

[ERR] switch_ivr_play_say.c:150 Can’t find macro demo_ivr_main_menu_short

etc…

We are Done !!

3) Voicemail in German.

Open /conf/dialplan/default.xml  . Search <extension name=”vmain”> .

Add <action application=”set” data=”default_language=de”/>

For Example.

<!-- voicemail main extension -->
<extension name="vmain">
<condition field="destination_number" expression="^vmain$|^4000$|^\*98$">
<action application="set" data="default_language=de"/>
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="voicemail" data="check default ${domain_name}"/>
</condition>
</extension>

Call 4000 .

if you run into following error

" [ERR] switch_core_speech.c:61 Invalid speech module [cepstral]!
[ERR] switch_ivr_play_say.c:2136 Invalid TTS module!
[ERR] switch_core_speech.c:61 Invalid speech module [cepstral]!
[ERR] switch_ivr_play_say.c:2136 Invalid TTS module!
[ERR] switch_core_speech.c:61 Invalid speech module [cepstral]!
[ERR] switch_ivr_play_say.c:2136 Invalid TTS module!
"

You need to install cepstral Or you can follow the following trick.

copy /opt/freeswitch/conf/lang/en/vm/sounds.xml to /opt/freeswitch/conf/lang/de/vm/ .

modify /opt/freeswitch/conf/lang/de/de.xml to as follow.

<include>
<language name="de" sound-path="$${sounds_dir}/de/at/ute" tts-engine="cepstral" tts-voice="david">
<X-PRE-PROCESS cmd="include" data="demo/demo.xml"/>
<!--voicemail_de_tts is purely implemented with tts, we need a files based implementation too -->
<!--
   <X-PRE-PROCESS cmd="include" data="vm/tts.xml"/>
-->
  <X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/>
</language>
</include>

Call 4000 .

We are done!

3) custom dialplan in German.

In pervious tutorial we created simple dialplan which pronouns  some digits. dialplan was as follow.

<extension name="mydemo">
<condition field="destination_number" expression="^5343$">
<action application="answer"/>
<action application="say" data="en number pronounced 12345"/>
</condition>
</extension>

to pronouns digit in German you need to just add following line.

<extension name="mydemo">
<condition field="destination_number" expression="^5343$">
<action application="set" data="default_language=de"/>
<action application="answer"/>
<action application="say" data="en number pronounced 12345"/>
</condition>
</extension>

We are done!!

Advertisements