uip audio files overview

33
Audio files on a UIP • This is a simple overview about one aspect of the UIP. • The purpose is to transfer some knowledge inside L2 team in order to better handle support cases. • UIP documentation and L3 support will help to get a deeper knowledge.

Upload: alexandru-bellu

Post on 16-Oct-2014

42 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: UIP Audio Files Overview

Audio files on a UIP

• This is a simple overview about one aspect of the UIP.

• The purpose is to transfer some knowledge inside L2 team in order to better handle support cases.

• UIP documentation and L3 support will help to get a deeper knowledge.

Page 2: UIP Audio Files Overview

Audio files on a UIP

This overview is about :• UIP data• ‘Referential’ data &

synchronisation• Configuration file on

UIP• Configuration file on

‘referential’ server

Former USMS‘Referential’

audio files mapper.cfg

UIP1audio files

links uip.cfg

UIP2audio files

links uip.cfg

UIP3audio files

links uip.cfg

sync syncsync

Page 3: UIP Audio Files Overview

Audio files & config. on UIP

On the UIP itself

• Two subdirectories on the UIP containing– real audio files copied from a referential

( $MESSAGES/APP_8/UIP_audio)

– Unix links related to each audio file( $MESSAGES/APP_8/GM_00 )

• A configuration file ‘uip.cfg’ containing the information about the referential

Page 4: UIP Audio Files Overview

Configuration file ‘uip.cfg’

[prompt_reference]

sync_on_start=yes

host=du-p-newsms-gui

directory=/global/IN/UIP/

local_cmd=/opt/FERMA/sbin/uip_generate_prompts

remote_cmd=null

protocol=ssh

Page 5: UIP Audio Files Overview

Configuration file ‘uip.cfg’

• [prompt_reference]Section defining the vocal prompts reference repository

• sync_on_start=yesIf "yes", the prompts repository of the UIP will be

synchronised when starting UIP (uip start).

If "no", only the command "uip sync" will synchronise

the prompts repository

Page 6: UIP Audio Files Overview

Configuration file ‘uip.cfg’

• host=du-p-newsms-guiThe host name or IP address of the reference platform

which hosts the vocal prompts reference repository

• directory=/global/IN/UIP/The path to the prompts repository on the reference

platform

Page 7: UIP Audio Files Overview

Configuration file ‘uip.cfg’

• local_cmd=/opt/FERMA/sbin/uip_generate_promptsThe name of a command to be run on that machine if, at least, one

file was transferred/modified/deleted.

• remote_cmd=nullThe name of a command to be run on the remote machine if, at

least, one file was transferred/modified/deleted.

• protocol=sshThe protocol to be used to transfer the files. Possible values are :

ssh or rsh.

Page 8: UIP Audio Files Overview

Audio files repository

On the referential

• Formerly hosted on a USMS, could be on the same UIP or on another one

• A directory containing the whole list of audio files, managed by the customer

• A configuration file ‘mapper.cfg’ defining the structure of the referential

Page 9: UIP Audio Files Overview

Media base & clips

• Some understanding of the media base structure is needed to use the service, to fill or update the mapper.cfg file.

• This database is made of clips. A clip is an elementary vocal element materialized by an audio file (typically a WAV file).

Page 10: UIP Audio Files Overview

Media base & clips

• Each clip is identified by – a type, – a language – a message number.

• The UIP media base distinguishes 2 types of clips Synthesis clips and Service clips.

Page 11: UIP Audio Files Overview

Media base & clips

• Synthesis clips

– Used by the synthesis engine to build and play the variable part of announcements.

– Example : if the SCP asks the UIP to synthesize the number 1001 in English, the synthesis engine will play the message containing the number “one” in English, then the message containing “thousand” in English and finally again the message containing “one”. The identifiers of synthesis clip are determined by the synthesis engine.

NB: the Id of a message has no relation with their content. The message playing “one” in English can have the Id 1001, the message playing “one” in French can have the Id 3001…etc

Page 12: UIP Audio Files Overview

Media base & clips

• Service clips

– Represent the specific messages played for the service.

– Example : UIP is asked to play the prompt #2003. UIP determines that this prompt is made of 2 clips : “Sorry but you have exceeded the maximum number of selections allowed” and “Please try again. Thank you.” so the caller will hear the message “Sorry but you have exceeded the maximum number of selections allowed. Please try again. Thank you.”

Page 13: UIP Audio Files Overview

Configuration file ‘mapper.cfg’

• The announcements and clips descriptions are stored in a text file named mapper.cfg.

• This file provides :– The name of the audio file and the description

of each clip– The list of clips contained in each prompt.

Page 14: UIP Audio Files Overview

Three types in ‘mapper.cfg’

• Each line corresponds to a clip or an announcement (see 3rd column) :2003 : 0 : announce : ar-AE-sorry.wav , ar-AE-du-try-

again.wav ;

3 : 0 : service : ar-AE-sorry.wav, ?"ar-Sorry but you have exceeded the maximum number of selections allowed";

4 : 0 : service : ar-AE-du-try-again.wav, ?"ar-Please try again. Thank you.";

1001 : 0 : synthesis : ar-AE-1001.wav , ?"ar-one" ;

Page 15: UIP Audio Files Overview

Type announcement

• When the line defines an announcement ( 3rd column = announce), the line format is :

announcement_id : language_id : announce : file1 [, file2, file 3,…, file 10] ;

– announcement_id is the announcement number – language_id is the language number– fileX is either a service clip file name or the star

character * meaning that a variable part is expected but also a VXML URL

Page 16: UIP Audio Files Overview

Type service clip

• When the line defines a service clip ( 3rd column = service), the line format is :

clip_id : language_id : service : file, ? “content” ;

– clip_id is a UIP internal, integer identifier for the clip. This is a unique integer whose range is [1 .. 3999].

– language_id is the language number.– file is the service clip file name.– content is the clip content to be displayed in traces.

Page 17: UIP Audio Files Overview

Type synthesis clip

• When the line defines a synthesis clip (3rd column = synthesis), the line format is :

clip_id : language_id : synthesis : file, ? “content” ;

– clip_id is a UIP internal, integer identifier for the clip. This depends on the language to be synthetised.

– language_id is the language number.– file is the synthesis clip file name.– content is the clip content to be displayed in traces.

Page 18: UIP Audio Files Overview

Synchronization

• The purpose is to update audio files on the UIP with the audio files on the referential.

• The synchronization – or media base deployment - is started from the UIP via “uip sync” while the application is running.

• To minimize the deployment, the UIP uses a cache to prevent from deploying an already deployed clip.

Page 19: UIP Audio Files Overview

Full synchronization

• To force the deployment of the whole content, a full synchronization can be donePurge the cache file:

>/opt/ESG/resources/AudioTrt.idx Purge the deployed files:

/bin/rm -rf $MESSAGES/APP_8NB: When using MNVO capabilities, you have to remove all directories $MESSAGES/APP_X where X is an operator number.

Force a redeployment: /opt/ESG/sbin/uip_generate_prompts

Page 20: UIP Audio Files Overview

Location of files on the UIP

• Connect on a UIP and go under directory $MESSAGES.Usually : /export/home/lsav/serveur/CHANSONS

• You will find subdirectory APP_8. For (rare) customers using MVNO, you will find several subdirectories APP_*

Page 21: UIP Audio Files Overview

Files & links on the UIP

• Under $MESSAGES/APP_8, you will find the two subdirectories:

• UIP_audio it contains all the real audio files, the same than on the referential

• GM_00 it contains a hierarchical structure of directories hosting links to the audio files

Page 22: UIP Audio Files Overview

Files & links on the UIP • The relation between the name of the Unix link and the audio file is

made by an algorithm described in UIP-IP Media Base 4.0 Technical Guide (chapter Understanding Media Base Deployment) . It uses the entry in mapper.cfg.

• Basically, – for a ‘service’ the algorithm is:

(Language Id) x 10000 + 6000 + (Prompt Id) then a convertion in hexa– for an ‘announce’ or a composed ‘service’ the algorithm is:

(Language Id) x 10000 + (Prompt Id) then a convertion in hexa

• There is an example in KA UIP : understand the mapper.cfg and the related trace when a prompt is played

Page 23: UIP Audio Files Overview

Files & links : a live example

• Let‘s try to locate an audio file called ar-AE-du-6091.* This is only an information about the name of the audio file.

• We will find the file itself in the repository, find its Id, then will check it exists on the UIP, on UIP_audio (the same audio file) and on GM_00 (the link pointing to the audio file).

Page 24: UIP Audio Files Overview

Files & links : a live example

• In the directory (on referential server)

Check the existence of the file, its size & date.

lsav@du-p-sms06> ls -l ar-AE-du-6091.*

... 35414 Feb 5 2010 ar-AE-du-6091.wav

Page 25: UIP Audio Files Overview

Files & links : a live example

• In the mapper.cfg (on referential server)

See below that this file is used as a service clip, several times, for the same language (Id 0). One service is composed of two audio files.

lsav@du-p-sms06> fgrep 'ar-AE-du-6091' mapper.cfg2075 : 0 : service : ar-AE-du-6091.wav, ar-AE-du-8074.wav;2156 : 0 : service : ar-AE-du-6091.wav;2155 : 0 : service : ar-AE-du-6091.wav;91 : 0 : service : ar-AE-du-6091.wav , ? "ar- Sorry. the card number

you have entered is incorrect. „;

Page 26: UIP Audio Files Overview

Files & links : a live example

• In the subdirectory UIP_audio (on the UIP)

The extension and the size can change (.wav on the referential, .MSG on the UIP, size is a little bit different to a convertion from .wav to .MSG).

lsav@uip1> cd $MESSAGES/APP_8/UIP_audio

lsav@uip1> ls -l ar-AE-du-6091*

-rwxr-xr-- 1 lsav calapp 33306 Feb 14 2010 ar-AE-du-6091.MSG

Page 27: UIP Audio Files Overview

Files & links : a live example

• In the subdirectory GM_00 (on the UIP)

• We can see the three links pointing to our audio file corresponding to the three ‘simple’ service. The ‘complex’ service composed of two prompts is not associated our single audio file.

lsav@uip1> cd $MESSAGES/APP_8/GM_00

lsav@uip1> ls -l */* |fgrep 'ar-AE-du-6091'

… 68 Oct 22 01:15 GM_17/A8M0017CB.MSG -> /export/home/lsav/serveur/CHANSONS/APP_8/UIP_audio/ar-AE-du-6091.MSG

… 68 Oct 22 01:19 GM_1F/A8M001FDB.MSG -> /export/home/lsav/serveur/CHANSONS/APP_8/UIP_audio/ar-AE-du-6091.MSG

… 68 Oct 22 01:19 GM_1F/A8M001FDC.MSG -> /export/home/lsav/serveur/CHANSONS/APP_8/UIP_audio/ar-AE-du-6091.MSG

Page 28: UIP Audio Files Overview

Files & links : a live example

• In the subdirectory GM_00 (on the UIP)

• We could have retrieved the hexadecimal part used for the name of the links by applying the algorithm.

For a ‘simple’ service, we should calculate (Language Id) x 10000 + 6000 + (Prompt Id) and convert it in hexadecimal.Prompt Id 2155 -> 0 + 6000 + 2155 = 8155 -> 1FDB in hexadecimalPrompt Id 2156 -> 0 + 6000 + 2156 = 8156 -> 1FDC in hexadecimalPrompt Id 91 -> 0 + 6000 + 91 = 8155 -> 17CB in hexadecimal

For a ‘complex’ service, we should calculate (Language Id) x 10000 + (Prompt Id) and convert it in hexadecimal.Prompt Id 2075 -> 0 + 2075 = 2075 -> 081B in hexadecimal

Page 29: UIP Audio Files Overview

Files & links : a live example

• In the subdirectory GM_00 (on the UIP)

– This way, with the hexadecimal codes (1FDB, 1FDC, 17CB, 081B) we can see the four links (even the ‘complex’ one).

lsav@uip1> ls -l */* |egrep '1FDB|1FDC|17CB|081B'… Oct 22 01:19 GM_08/A8M00081B.MSG ->

/export/home/lsav/serveur/CHANSONS/APP_8/UIP_audio/ar-AE-du-2075.MSG… Oct 22 01:15 GM_17/A8M0017CB.MSG ->

/export/home/lsav/serveur/CHANSONS/APP_8/UIP_audio/ar-AE-du-6091.MSG… Oct 22 01:19 GM_1F/A8M001FDB.MSG ->

/export/home/lsav/serveur/CHANSONS/APP_8/UIP_audio/ar-AE-du-6091.MSG… Oct 22 01:19 GM_1F/A8M001FDC.MSG ->

/export/home/lsav/serveur/CHANSONS/APP_8/UIP_audio/ar-AE-du-6091.MSG – We can see that when the ‘complex’ service is asked,

it is the audio file ar-AE-du-2075 which is played

Page 30: UIP Audio Files Overview

Files & links : SVI_maptools.log

• As we are not always found of hexadecimal conversion, there is another way to know the audio file pointed by each link.

• See SVI_maptools.log ( in standard logs directory) generated during the synchronization. For each prompt Id, it shows the associated link.

Page 31: UIP Audio Files Overview

Files & links : SVI_maptools.log

• Example for prompt Id 2075 and prompt Id 2155:• lsav@uip1> cd /var/opt/FERMA/logs• lsav@uip1> fgrep 2075 SVI_maptools.log• MsgId[2075] Lg[0][synthesis] link

/export/home/lsav/serveur/CHANSONS/APP_8/UIP_audio/ar-AE-du-2075.MSG-> /export/home/lsav/serveur/CHANSONS/APP_8//GM_00/GM_08/A8M00081B.MSG

• lsav@uip1> fgrep 2155 SVI_maptools.log• MsgId[2155] Lg[2][service] link

/export/home/lsav/serveur/CHANSONS/APP_8/UIP_audio/hi-AE-du-26091.MSG-> /export/home/lsav/serveur/CHANSONS/APP_8//GM_00/GM_6D/A8M006DFB.MSG

• MsgId[2155] Lg[1][service] link /export/home/lsav/serveur/CHANSONS/APP_8/UIP_audio/en-AE-du-16091.MSG-> /export/home/lsav/serveur/CHANSONS/APP_8//GM_00/GM_46/A8M0046EB.MSG

• MsgId[2155] Lg[0][service] link /export/home/lsav/serveur/CHANSONS/APP_8/UIP_audio/ar-AE-du-6091.MSG-> /export/home/lsav/serveur/CHANSONS/APP_8//GM_00/GM_1F/A8M001FDB.MSG

• lsav@uip1>

Page 32: UIP Audio Files Overview

Audio files format

• The recording studios produce stereo, 48kHz, 16bits clips, not suitable for telecom network.

• To convert the audio files (UIPv4): – If the encoding law is ‘a’, then perform:

/opt/ESG/bin/MEDIA_audio2wav -f alaw -i <input file> -o <output file>

– If the encoding law is ‘u’, then perform: /opt/ESG/bin/MEDIA_audio2wav -f ulaw -i <input file> -o <output file>

Page 33: UIP Audio Files Overview

Audio files format

• To convert the audio files (UIPv2): SVI_audio -i $name -o $name -f ALAW

To get info:

SVI_audio -i $name -w