asterisk-core-sounds - extra sound files of asterisk

Tzafrir Cohen tzafrir.cohen at xorcom.com
Mon Feb 22 21:31:15 UTC 2010


A follow-up:

On Mon, Jan 18, 2010 at 05:36:19PM +0200, Tzafrir Cohen wrote:
> I'm trying to package the sound files from
> http://downloads.asterisk.org/pub/telephony/sounds/ .
> 
> As you can see from looking at the releases/ subdirectory, the -core and
> the -extra sound files are versionsed separately.
> 
> Here's the current debian/control for a single package of the -core
> sound files of various languages and formats. It's a single dpkg v3
> package with multiple tarballs. The toplevel tarball is, so far, a
> dummy, empty tarballl.
> 
> Just to give you some hints as for the size of the files:
> 
> $ du -sch *.deb
> 7.7M    asterisk-core-sounds-en-g722_1.4.17-1_all.deb
> 1.8M    asterisk-core-sounds-en-gsm_1.4.17-1_all.deb
> 15M     asterisk-core-sounds-en-wav_1.4.17-1_all.deb
> 11M     asterisk-core-sounds-es-g722_1.4.17-1_all.deb
> 2.4M    asterisk-core-sounds-es-gsm_1.4.17-1_all.deb
> 21M     asterisk-core-sounds-es-wav_1.4.17-1_all.deb
> 8.2M    asterisk-core-sounds-fr-g722_1.4.17-1_all.deb
> 1.9M    asterisk-core-sounds-fr-gsm_1.4.17-1_all.deb
> 15M     asterisk-core-sounds-fr-wav_1.4.17-1_all.deb

I've commited this one as well as packaging for -extra and the moh files
(which are properly DFSG with much help from Faidon Liambotis, btw).

The -extra package is only available in English and French, and the MOH
is merely music and not in any language. Thus we have:

 14M asterisk-extra-sounds-en-g722_1.4.10-1_all.deb
3.3M asterisk-extra-sounds-en-gsm_1.4.10-1_all.deb
 27M asterisk-extra-sounds-en-wav_1.4.10-1_all.deb
 13M asterisk-extra-sounds-fr-g722_1.4.10-1_all.deb
3.0M asterisk-extra-sounds-fr-gsm_1.4.10-1_all.deb
 24M asterisk-extra-sounds-fr-wav_1.4.10-1_all.deb

7.6M asterisk-moh-opsound-g722_2.03-1_all.deb
1.8M asterisk-moh-opsound-gsm_2.03-1_all.deb
 15M asterisk-moh-opsound-wav_2.03-1_all.deb


> 
> Another issue: should those files be installed directly at
> /usr/share/asterisk/sounds/LANG (e.g.: LANG=en)? or do we want to avoid
> that, and make it something along the lines of en_digium or en_US ?

In order to avoid potential collisions, I wanted to use the semy
standard schema of:

  ${lang}_${country}_${gender}_${description}.

Thus the prompts we have are:

 en_US_f_Allison
 es_MX_f_Allison [*]
 fr_CA_f_June 

This all works fine if LANGUAGE was set. But what if it isn't?

Below is the description I started to write of how Asterisk selects the
sound file it plays:

When Asterisk is asked to play 'some/file' it will search in the the
following places on a Debian system (in whish the datadir is set to
/usr/share/asterisk)

  /usr/share/sounds/${LANG_FULL}/some/file.TYPE
  /usr/share/sounds/${LANG}/some/file.TYPE
  /usr/share/sounds/en/some/file.TYPE

TYPE is "the best available type" - the one that will take least
encoding/decoding effort. This is why you normally don't specify the
type of file to play..

FULL_LANG is a complete name of a language. For instance, "fr", "de_CH"
or "en_US_f_Allison".

LANG is just the "major language" part of FULL_LANG - only up to the
first "_", if any. So in the above examples we would get "fr", "de" and
"en".


So, do we make /usr/share/sounds/en a symlink? Or more direct symlinks?
This collides with the current asterisk-sounds package that places files
in /usr/share/sounds/en (it is basically the same as
asterisk-core-en-gsm).

The packaging is now available under asterisk-sounds in separate
subdirectories. svn-buildpackage won't build it. But then again, I'm not
sure how many other tools deal well with multi-tarball packages.

Bootstrapping right now is basically:

  svn co svn://alioth/pkg-voip/asterisk-sounds
  cd asterisk-sounds/asterisk-core-sounds
  ./debian/rules get-orig-source # HUGE download with wget -q
  cd ..
  dpkg-source -b asterisk-core-sounds # Complains about missing files.

  # and finally:
  cd asterisk-core-sounds
  debuild

See http://svn.debian.org/viewsvn/pkg-voip/asterisk-sounds/

[*] For the gory details:

<Corydon76-lap> I think that's en_US_f_Allison
<tzafrir> So I guess the French ones go under fr_CA_f_June, then
<tzafrir> And the Spanish ones: es_US_f_Allison  (which looks a bit odd
  at first glance)
<putnopvut> es_US?
<tzafrir> It's Allison, right?
<tzafrir> Would you think it is better described (accent-wise) as es_MX ?
<kpfleming> yes, es_MX_f_Allison
<Corydon76-lap> If you want to be technical, it's es_CA_f_Allison

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the Pkg-voip-maintainers mailing list