Asterisk SayNumber nefunguje

Post a reply

This question is a means of preventing automated form submissions by spambots.
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek: :yes: :no:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review

Expand view Topic review: Asterisk SayNumber nefunguje

Re: Asterisk SayNumber nefunguje

Post by host » 29 Jan 2013 20:23

Jestli je problém se srozumitelností nahrávek, pak se asi rozjíždějí hodiny. Je potřeba zkontrolovat, jestli je zavedenejj kernel modul dahdi_dummy. Je to pseudočasovač navázanej tuším na takt USB sběrnice. Nejlepší je samozřejmě mít v systému HW kartu s krystalem, pak se to synchronizuje přes dahdi moduly.

Re: Asterisk SayNumber nefunguje

Post by stepos » 28 Jan 2013 20:26

tak bingo - byl to ten selinux!
už to tu chybové hlášky nevypisuje, ale něco tomu saynumber vůbec rozumět není. Budu dál zkoušet.
Děkuji za pomoc

Re: Asterisk SayNumber nefunguje

Post by stepos » 28 Jan 2013 20:14

kodeky mám tyto, je to správně?
core show codecs audio
Disclaimer: this command is for informational purposes only.
It does not indicate anything about your configuration.
1 (1 << 0) (0x1) audio g723 (G.723.1)
2 (1 << 1) (0x2) audio gsm (GSM)
4 (1 << 2) (0x4) audio ulaw (G.711 u-law)
8 (1 << 3) (0x8) audio alaw (G.711 A-law)
16 (1 << 4) (0x10) audio g726aal2 (G.726 AAL2)
32 (1 << 5) (0x20) audio adpcm (ADPCM)
64 (1 << 6) (0x40) audio slin (16 bit Signed Linear PCM)
128 (1 << 7) (0x80) audio lpc10 (LPC10)
256 (1 << 8) (0x100) audio g729 (G.729A)
512 (1 << 9) (0x200) audio speex (SpeeX)
1024 (1 << 10) (0x400) audio ilbc (iLBC)
2048 (1 << 11) (0x800) audio g726 (G.726 RFC3551)
4096 (1 << 12) (0x1000) audio g722 (G722)
8192 (1 << 13) (0x2000) audio siren7 (ITU G.722.1 (Siren7, licensed from Polycom))
16384 (1 << 14) (0x4000) audio siren14 (ITU G.722.1 Annex C, (Siren14, licensed from Polycom))
32768 (1 << 15) (0x8000) audio slin16 (16 bit Signed Linear PCM (16kHz))
4294967296 (1 << 32) (0x100000000) audio g719 (ITU G.719)
8589934592 (1 << 33) (0x200000000) audio speex16 (SpeeX 16khz)
17179869184 (1 << 34) (0x400000000) audio unknown (unknown)
34359738368 (1 << 35) (0x800000000) audio unknown (unknown)
68719476736 (1 << 36) (0x1000000000) audio unknown (unknown)
137438953472 (1 << 37) (0x2000000000) audio unknown (unknown)
274877906944 (1 << 38) (0x4000000000) audio unknown (unknown)
549755813888 (1 << 39) (0x8000000000) audio unknown (unknown)
1099511627776 (1 << 40) (0x10000000000) audio unknown (unknown)
2199023255552 (1 << 41) (0x20000000000) audio unknown (unknown)
4398046511104 (1 << 42) (0x40000000000) audio unknown (unknown)
8796093022208 (1 << 43) (0x80000000000) audio unknown (unknown)
17592186044416 (1 << 44) (0x100000000000) audio unknown (unknown)
35184372088832 (1 << 45) (0x200000000000) audio unknown (unknown)
70368744177664 (1 << 46) (0x400000000000) audio unknown (unknown)
140737488355328 (1 << 47) (0x800000000000) audio testlaw (G.711 test-law)

formáty mám
core show file formats
Format Name Extensions
------ ---- ----------
slin mp3 mp3
adpcm vox vox
slin16 wav16 wav16
slin wav wav
gsm wav49 WAV|wav49
gsm gsm gsm
g719 g719 g719
g723 g723sf g723|g723sf
g726 g726-16 g726-16
g726 g726-24 g726-24
g726 g726-32 g726-32
g726 g726-40 g726-40
g729 g729 g729
h263 h263 h263
h264 h264 h264
ilbc iLBC ilbc
g722 g722 g722
ulaw au au
alaw alaw alaw|al|alw
ulaw pcm pcm|ulaw|ul|mu|ulw
siren14 siren14 siren14
siren7 siren7 siren7
slin sln sln|raw
slin16 sln16 sln16
24 file formats registered.

modules.conf je
; Asterisk configuration file
; Module Loader configuration file

; Any modules that need to be loaded before the Asterisk core has been
; initialized (just after the logger has been initialized) can be loaded
; using 'preload'. This will frequently be needed if you wish to map all
; module configuration files into Realtime storage, since the Realtime
; driver will need to be loaded before the modules using those configuration
; files are initialized.
; An example of loading ODBC support would be:
;preload =>
;preload =>
; Uncomment the following if you wish to use the Speech Recognition API
;preload =>
; If you want Asterisk to fail if a module does not load, then use
; the "require" keyword. Asterisk will exit with a status code of 2
; if a required module does not load.
; require =
; If you want you can combine with preload
; preload-require =
; If you want, load the GTK console right away.
noload =>
;load =>
load =>
; Load one of: chan_oss, alsa, or console (portaudio).
; By default, load chan_oss only (automatically).
noload =>
;noload =>
noload =>

a výpis modulů
module show
Module Description Use Count
res_timing_timerfd Timerfd Timing Interface 1
res_timing_pthread pthread Timing Interface 0
res_timing_dahdi DAHDI Timing Interface 0
res_stun_monitor STUN Network Monitor 0
res_speech Generic Speech Recognition API 0
res_smdi Simplified Message Desk Interface (SMDI) 0
res_security_log Security Event Logging 0
res_rtp_multicast Multicast RTP Engine 0
res_rtp_asterisk Asterisk RTP Stack 0
res_realtime Realtime Data Lookup/Rewrite 0
res_pktccops PktcCOPS manager for MGCP 0
res_phoneprov HTTP Phone Provisioning 0
res_mutestream Mute audio stream resources 0
res_musiconhold Music On Hold Resource 0
res_monitor Call Monitoring Resource 0
res_limit Resource limits 0
res_fax Generic FAX Applications 0
res_convert File format conversion CLI command 0
res_clioriginate Call origination and redirection from th 0
res_clialiases CLI Aliases 0
res_calendar Asterisk Calendar integration 1
res_agi Asterisk Gateway Interface (AGI) 1
res_ael_share share-able code for AEL 0
res_adsi ADSI Resource 0
pbx_spool Outgoing Spool Support 0
pbx_realtime Realtime Switch 0
pbx_loopback Loopback Switch 0
pbx_dundi Distributed Universal Number Discovery ( 0
pbx_config Text Extension Configuration 0
pbx_ael Asterisk Extension Language Compiler 0
func_volume Technology independent volume control 0
func_vmcount Indicator for whether a voice mailbox ha 0
func_version Get Asterisk Version/Build Info 0
func_uri URI encode/decode dialplan functions 0
func_timeout Channel timeout dialplan functions 0
func_sysinfo System information related functions 0
func_strings String handling dialplan functions 0
func_srv SRV related dialplan functions 0
func_sprintf SPRINTF dialplan function 0
func_shell Returns the output of a shell command 0
func_sha1 SHA-1 computation dialplan function 0
func_realtime Read/Write/Store/Destroy values from a R 0
func_rand Random number dialplan function 0
func_pitchshift Audio Effects Dialplan Functions 0
func_module Checks if Asterisk module is loaded in m 0
func_md5 MD5 digest dialplan functions 0
func_math Mathematical dialplan function 0
func_logic Logical dialplan functions 0
func_lock Dialplan mutexes 0
func_iconv Charset conversions 0
func_channel Channel information dialplan functions 0
func_groupcount Channel group dialplan functions 0
func_global Variable dialplan functions 0
func_frame_trace Frame Trace for internal ast_frame debug 0
func_extstate Gets an extension's state in the dialpla 0
func_env Environment/filesystem dialplan function 0
func_enum ENUM related dialplan functions 0
func_dialplan Dialplan Context/Extension/Priority Chec 0
func_dialgroup Dialgroup dialplan function 0
func_devstate Gets or sets a device state in the dialp 0
func_db Database (astdb) related dialplan functi 0
func_cut Cut out information from a string 0
func_config Asterisk configuration file variable acc 0
func_cdr Call Detail Record (CDR) dialplan functi 0
func_callerid Party ID related dialplan functions (Cal 0
func_callcompletion Call Control Configuration Function 0
func_blacklist Look up Caller*ID name/number from black 0
func_base64 base64 encode/decode dialplan functions 0
func_audiohookinherit Audiohook inheritance function 0
func_aes AES dialplan functions 0
format_wav_gsm Microsoft WAV format (Proprietary GSM) 0
format_wav Microsoft WAV/WAV16 format (8kHz/16kHz S 0
format_vox Dialogic VOX (ADPCM) File Format 0
format_sln16 Raw Signed Linear 16KHz Audio support (S 0
format_sln Raw Signed Linear Audio support (SLN) 0
format_siren7 ITU G.722.1 (Siren7, licensed from Polyc 0
format_siren14 ITU G.722.1 Annex C (Siren14, licensed f 0
format_pcm Raw/Sun uLaw/ALaw 8KHz (PCM,PCMA,AU), G. 0
format_jpeg jpeg (joint picture experts group) image 0
format_ilbc Raw iLBC data 0
format_h264 Raw H.264 data 0
format_h263 Raw H.263 data 0
format_g729 Raw G.729 data 0
format_g726 Raw G.726 (16/24/32/40kbps) data 0
format_g723 G.723.1 Simple Timestamp File Format 0
format_g719 ITU G.719 0
format_gsm Raw GSM data 0
codec_ulaw mu-Law Coder/Decoder 0
codec_lpc10 LPC10 2.4kbps Coder/Decoder 0
codec_g726 ITU G.726-32kbps G726 Transcoder 0
codec_g722 ITU G.722-64kbps G722 Transcoder 0
codec_gsm GSM Coder/Decoder 0
codec_dahdi Generic DAHDI Transcoder Codec Translato 0
codec_a_mu A-law and Mulaw direct Coder/Decoder 0
codec_alaw A-law Coder/Decoder 0
codec_adpcm Adaptive Differential PCM Coder/Decoder 0
chan_unistim UNISTIM Protocol (USTM) 0
chan_skinny Skinny Client Control Protocol (Skinny) 0
chan_sip Session Initiation Protocol (SIP) 0
chan_phone Linux Telephony API Support 0
chan_oss OSS Console Channel Driver 0
chan_multicast_rtp Multicast RTP Paging Channel 0
chan_mgcp Media Gateway Control Protocol (MGCP) 0
chan_local Local Proxy Channel (Note: used internal 0
chan_iax2 Inter Asterisk eXchange (Ver 2) 0
chan_dahdi DAHDI Telephony Driver 0
chan_bridge Bridge Interaction Channel 0
chan_agent Agent Proxy Channel 0
cdr_syslog Customizable syslog CDR Backend 0
cdr_manager Asterisk Manager Interface CDR Backend 0
cdr_custom Customizable Comma Separated Values CDR 0
cdr_csv Comma Separated Values CDR Backend 0
bridge_softmix Multi-party software based channel mixin 0
bridge_simple Simple two channel bridging module 0
bridge_multiplexed Multiplexed two channel bridging module 0
bridge_builtin_features Built in bridging features 1
app_zapateller Block Telemarketers with Special Informa 0
app_while While Loops and Conditional Execution 0
app_waituntil Wait until specified time 0
app_waitforsilence Wait For Silence 0
app_waitforring Waits until first ring after time 0
app_voicemail Comedian Mail (Voicemail System) 0
app_verbose Send verbose output 0
app_userevent Custom User Event Application 0
app_url Send URL Applications 0
app_transfer Transfers a caller to another extension 0
app_test Interface Test Application 0
app_talkdetect Playback with Talk Detection 0
app_system Generic System() application 0
app_stack Dialplan subroutines (Gosub, Return, etc 0
app_speech_utils Dialplan Speech Applications 0
app_softhangup Hangs up the requested channel 0
app_sms SMS/PSTN handler 0
app_skel Skeleton (sample) Application 0
app_setcallerid Set CallerID Presentation Application 0
app_sendtext Send Text Applications 0
app_senddtmf Send DTMF digits Application 0
app_sayunixtime Say time 0
app_saycounted Decline words according to channel langu 0
app_rpt Radio Repeater/Remote Base Application 0
app_record Trivial Record Application 0
app_readfile Stores output of file into a variable 0
app_readexten Read and evaluate extension validity 0
app_read Read Variable Application 0
app_queue True Call Queueing 0
app_privacy Require phone number to be entered, if n 0
app_playtones Playtones Application 0
app_playback Sound File Playback Application 0
app_parkandannounce Call Parking and Announce Application 0
app_page Page Multiple Phones 0
app_originate Originate call 0
app_nbscat Silly NBS Stream Application 0
app_mp3 Silly MP3 Application 0
app_morsecode Morse code 0
app_mixmonitor Mixed Audio Monitoring Application 0
app_minivm Mini VoiceMail (A minimal Voicemail e-ma 0
app_milliwatt Digital Milliwatt (mu-law) Test Applicat 0
app_meetme MeetMe conference bridge 0
app_macro Extension Macros 0
app_ivrdemo IVR Demo Application 0
app_image Image Transmission Application 0
app_ices Encode and Stream via icecast and ices 0
app_chanspy Listen to the audio of an active channel 0
app_channelredirect Redirects a given channel to a dialplan 0
app_chanisavail Check channel availability 0
app_getcpeid Get ADSI CPE ID 0
app_forkcdr Fork The CDR into 2 separate entities 0
app_followme Find-Me/Follow-Me Application 0
app_flash Flash channel application 0
app_festival Simple Festival Interface 0
app_externalivr External IVR Interface Application 0
app_exec Executes dialplan applications 0
app_echo Simple Echo Application 0
app_dumpchan Dump Info About The Calling Channel 0
app_disa DISA (Direct Inward System Access) Appli 0
app_directory Extension Directory 0
app_directed_pickup Directed Call Pickup Application 0
app_dictate Virtual Dictation Machine 0
app_dial Dialing Application 0
app_db Database Access Functions 0
app_dahdiras DAHDI ISDN Remote Access Server 0
app_dahdibarge Barge in on DAHDI channel application 0
app_controlplayback Control Playback Application 0
app_confbridge Conference Bridge Application 0
app_celgenuserevent Generate an User-Defined CEL event 0
app_cdr Tell Asterisk to not maintain a CDR for 0
app_authenticate Authentication Application 0
app_amd Answering Machine Detection Application 0
app_alarmreceiver Alarm Receiver for Asterisk 0
res_config_mysql MySQL RealTime Configuration Driver 0
format_mp3 MP3 format [Any rate but 8000hz mono is 0
cdr_mysql MySQL CDR Backend 0
app_mysql Simple Mysql Interface 0 Test Doubly-Linked Lists 0 Locale tests 0 AMI Hook Test Module 0 Asterisk Manager Interface CEL Backend 0 Test Security Event Generation 0 Customizable Comma Separated Values CEL 0 Logger Test Module 0
200 modules loaded

Re: Asterisk SayNumber nefunguje

Post by milan.benicek » 28 Jan 2013 19:01

Záleží kam ukazuje položka astdatadir. Vidím:
Code: Select all
astdatadir => /var/lib/asterisk
, takže cesta k nahrávkám je skutečně /var/lib/asterisk/sounds .

Pak taky vidím:
Code: Select all
languageprefix = yes ; Use the new sound prefix path syntax.
, což znamená, že české hlásky jsou v /var/lib/asterisk/sounds/cs/ .

S čím mám pořád trochu problém je to cs/cz - zatím jsem vždy používal cz, mohli to ale opravit.

Pak už mě napadají jen opravdu marginální příčiny, jako je:
  • Neblokuje otevírání souborů třeba selinux?
  • Má uživatel Asterisk právo čtení /var/lib/asterisk/sounds, resp. rx pro adresáře a r pro soubory?
  • Máte načtené potřebné file formaty?
    Code: Select all
    asterisk*CLI> core show file formats
    Format     Name       Extensions         
    ------     ----       ----------         
    g729       g729       g729               
    g726       g726-16    g726-16             
    g726       g726-24    g726-24             
    g726       g726-32    g726-32             
    g726       g726-40    g726-40             
    g723       g723sf     g723|g723sf         
    g719       g719       g719               
    siren14    siren14    siren14             
    adpcm      vox        vox                 
    slin16     wav16      wav16               
    slin       wav        wav                 
    slin       sln        sln|raw             
    slin16     sln16      sln16               
    g722       g722       g722               
    ulaw       au         au                 
    alaw       alaw       alaw|al|alw         
    ulaw       pcm        pcm|ulaw|ul|mu|ulw 
    siren7     siren7     siren7             
    gsm        wav49      WAV|wav49           
    h264       h264       h264               
    h263       h263       h263               
    gsm        gsm        gsm                 
    ilbc       iLBC       ilbc               
    slin       ogg_vorbis ogg                 
    24 file formats registered.
  • Máte načteny potřebné kodeky? Hlavně,,

Pokud například v /etc/asterisk/modules.conf máte:
Code: Select all

, tak je potřeba ručně vypsat, které moduly se mají natáhnout.

Víc už mě nenapadá.

Re: Asterisk SayNumber nefunguje

Post by stepos » 28 Jan 2013 18:25

koukám, že tam vůbec adresář /var/lib/asterisk/sounds není, že?

Re: Asterisk SayNumber nefunguje

Post by stepos » 28 Jan 2013 18:08

astetcdir => /etc/asterisk
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk

;verbose = 3
;debug = 3
;alwaysfork = yes ; Same as -F at startup.
;nofork = yes ; Same as -f at startup.
;quiet = yes ; Same as -q at startup.
;timestamp = yes ; Same as -T at startup.
;execincludes = yes ; Support #exec in config files.
;console = yes ; Run as console (same as -c at startup).
;highpriority = yes ; Run realtime priority (same as -p at
; startup).
;initcrypto = yes ; Initialize crypto keys (same as -i at
; startup).
;nocolor = yes ; Disable console colors.
;dontwarn = yes ; Disable some warnings.
;dumpcore = yes ; Dump core on crash (same as -g at startup).
languageprefix = yes ; Use the new sound prefix path syntax.
;internal_timing = yes
;systemname = my_system_name ; Prefix uniqueid with a system name for
; Global uniqueness issues.
;autosystemname = yes ; Automatically set systemname to hostname,
; uses 'localhost' on failure, or systemname if
; set.
;maxcalls = 10 ; Maximum amount of calls allowed.
;maxload = 0.9 ; Asterisk stops accepting new calls if the
; load average exceed this limit.
;maxfiles = 1000 ; Maximum amount of openfiles.
;minmemfree = 1 ; In MBs, Asterisk stops accepting new calls if
; the amount of free memory falls below this
; watermark.
;cache_record_files = yes ; Cache recorded sound files to another
; directory during recording.
;record_cache_dir = /tmp ; Specify cache directory (used in conjunction
; with cache_record_files).
;transmit_silence = yes ; Transmit silence while a channel is in a
; waiting state, a recording only state, or
; when DTMF is being generated. Note that the
; silence internally is generated in raw signed
; linear format. This means that it must be
; transcoded into the native format of the
; channel before it can be sent to the device.
; It is for this reason that this is optional,
; as it may result in requiring a temporary
; codec translation path for a channel that may
; not otherwise require one.
;transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of
; directly.
;runuser = asterisk ; The user to run as.
;rungroup = asterisk ; The group to run as.
;lightbackground = yes ; If your terminal is set for a light-colored
; background.
;forceblackbackground = yes ; Force the background of the terminal to be
; black, in order for terminal colors to show
; up properly.
;defaultlanguage = en ; Default language
documentation_language = en_US ; Set the language you want documentation
; displayed in. Value is in the same format as
; locale names.
;hideconnect = yes ; Hide messages displayed when a remote console
; connects and disconnects.
;lockconfdir = no ; Protect the directory containing the
; configuration files (/etc/asterisk) with a
; lock.

; Changing the following lines may compromise your security.
;astctlpermissions = 0660
;astctlowner = root
;astctlgroup = apache
;astctl = asterisk.ctl


Re: Asterisk SayNumber nefunguje

Post by milan.benicek » 28 Jan 2013 18:05

Tak to je vážně divné. Ještě mě napadá - jak vypadá konfigurace /etc/asterisk/asterisk.conf ? Je dost možné, že adresář pro sounds je někde úplně jinde ...

Re: Asterisk SayNumber nefunguje

Post by stepos » 28 Jan 2013 17:43

Tak nevím...
ls -la /var/lib/asterisk/sounds/cs/digits/5*
-rw-r--r--. 1 asterisk asterisk 18892 8. zář 2009 /var/lib/asterisk/sounds/cs/digits/5_e.wav
-rw-r--r--. 1 asterisk asterisk 14586 8. zář 2009 /var/lib/asterisk/sounds/cs/digits/5_e3.wav
-rw-r--r--. 1 asterisk asterisk 14310 8. zář 2009 /var/lib/asterisk/sounds/cs/digits/5_e9.wav
-rw-r--r--. 1 asterisk asterisk 9010 8. zář 2009 /var/lib/asterisk/sounds/cs/digits/5.wav
-rw-r--r--. 1 asterisk asterisk 14434 8. zář 2009 /var/lib/asterisk/sounds/cs/digits/50.wav

a pak

Code: Select all
[s@incoming:1] Set("DAHDI/1-1", "CHANNEL(language)=cs") in new stack
    -- Executing [s@incoming:2] SayNumber("DAHDI/1-1", "555") in new stack
[Jan 28 17:37:29] WARNING[5808]: file.c:644 ast_openstream_full: File digits/5 does not exist in any format
[Jan 28 17:37:29] WARNING[5808]: file.c:950 ast_streamfile: Unable to open digits/5 (format 0x4 (ulaw)): No such file or directory
[Jan 28 17:37:29] WARNING[5808]: file.c:644 ast_openstream_full: File digits/set does not exist in any format
[Jan 28 17:37:29] WARNING[5808]: file.c:950 ast_streamfile: Unable to open digits/set (format 0x4 (ulaw)): No such file or directory
[Jan 28 17:37:29] WARNING[5808]: file.c:644 ast_openstream_full: File digits/50 does not exist in any format
[Jan 28 17:37:29] WARNING[5808]: file.c:950 ast_streamfile: Unable to open digits/50 (format 0x4 (ulaw)): No such file or directory
[Jan 28 17:37:29] WARNING[5808]: file.c:644 ast_openstream_full: File digits/5 does not exist in any format
[Jan 28 17:37:29] WARNING[5808]: file.c:950 ast_streamfile: Unable to open digits/5 (format 0x4 (ulaw)): No such file or directory

languageprefix = yes
aspoň doufám, ale nevím, jak to ověřit

musí být tedy zádrhel i v něčem jiném, protože jsem současně nechal soubory i v

ls -la /var/lib/asterisk/sounds/digits/cs/5*
-rw-r--r--. 1 asterisk asterisk 18892 8. zář 2009 /var/lib/asterisk/sounds/digits/cs/5_e.wav
-rw-r--r--. 1 asterisk asterisk 14586 8. zář 2009 /var/lib/asterisk/sounds/digits/cs/5_e3.wav
-rw-r--r--. 1 asterisk asterisk 14310 8. zář 2009 /var/lib/asterisk/sounds/digits/cs/5_e9.wav
-rw-r--r--. 1 asterisk asterisk 9010 8. zář 2009 /var/lib/asterisk/sounds/digits/cs/5.wav
-rw-r--r--. 1 asterisk asterisk 14434 8. zář 2009 /var/lib/asterisk/sounds/digits/cs/50.wav

jsem z to ho jelen... Děkuji za pomoc

Re: Asterisk SayNumber nefunguje

Post by milan.benicek » 28 Jan 2013 14:51

stepos wrote:Nevyřešil, plavu v tom jako kapr.
1) Nerozumím, kde se globálně nastavuje celkově ta čeština, abych nemusel vždy psát Set(CHANNEL(language)=cs)? Nebo se to nedá nastavit globálně?
2) Chápu správně, že pak se bude asterisk dívat do podadresářů cs ve všech zvukových adresářích?
3) Jakou roli hraje nastavení languageprefix = yes v asterisk.conf?
4) Pokud mám všechny české zvuky ve formátu wav, musí se někde nastavit, že to je wav a ne gsm, nebo to nevadí?

Ještě v rychlosti k vašim otázkám:
Ad 1) Lze nastavit výchozí jazyk pro konkrétní channel výrazem language=cs např. v chan_dahdi.conf, sip.conf, iax.conf atd.
Ad 2) Bude se dívat do cs adresářů podle zvolené metody viz předchozí post.
Ad 3) Viz. předchozí post - volba metody adresářové struktury jazykových mutací.
Ad 4) Nastavovat se to nemusí, Asterisk vždy hledá podle jména promptu a příponu si vybere sám, podle toho co zrovna potřebuje viz logovací hláška "... does not exist in any format"

Re: Asterisk SayNumber nefunguje

Post by milan.benicek » 28 Jan 2013 14:44

No ... je to takhle, Asterisk má 2 typy způsobů pro ukládání jazykových nahrávek:

1) Starý způsob platný pro verze 1.2 a defaultně pro 1.4 (i když zde už je možnost volby) - pro češtinu se používají podadresáře např. digits/cs, letters/cs, phonetic/cs. Pro zpětnou kompatibilitu je v nových verzích Asterisku potřeba nastavit languageprefix=no

2) Nový způsob použitelný od verze 1.4 dále, kdy ve /var/lib/asterisk/sounds/ je podadresář cs a v něm pak další podadresáře digits, letters, phonetic (tedy teď už bez cs). Nastavení tohoto formátu odpovídá languageprefix=yes.

Ve vašem případě, kdy zřejmě používáte nový formát, je potřeba zkontrolovat obsah /var/lib/asterisk/sounds/cs/digits, zda tam jsou promty - v testech se vám objevuje 5.wav resp. 5.gsm, tak jestli tam opravdu je.
Druhou variantou je, že to necháte tak jak to je - tzn. následující příkaz vypíše nějaké propty:
Code: Select all
ls -la /var/lib/asterisk/sounds/digits/cs/5*
pak stačí přepnout languageprefix=no a mělo by to taky fungovat.