Bonjour Madame/Monsieur,
J'ai inséré un fichier moh custom dans mon Asterisk dont voici les caractéristiques:
[root@localhost ~]# ls -la /var/lib/asterisk/waiting-audio/
total 6296
drwxr-xr-x 2 asterisk asterisk 158 Nov 27 16:47 .
drwxr-xr-x 16 asterisk asterisk 257 Nov 29 11:05 ..
-rw-r--r-- 1 asterisk asterisk 109640 Nov 27 10:21 waiting-audio.g729
-rw-r--r-- 1 asterisk asterisk 180939 Nov 27 10:14 waiting-audio.gsm
-rw-r--r-- 1 asterisk asterisk 1756580 Oct 9 10:46 waiting-audio.mp3
-rw-r--r-- 1 asterisk asterisk 1754282 Nov 27 10:13 waiting-audio.sln
-rw-r--r-- 1 asterisk asterisk 877141 Nov 23 10:14 waiting-audio.ulaw
-rw-r--r-- 1 asterisk asterisk 1754326 Nov 23 10:10 waiting-audio.wav
[root@localhost ~]#
################################################## ########
[root@localhost ~]# soxi /var/lib/asterisk/waiting-audio/waiting-audio.wav
Input File : '/var/lib/asterisk/waiting-audio/waiting-audio.wav'
Channels : 1
Sample Rate : 8000
Precision : 16-bit
Duration : 00:01:49.64 = 877141 samples ~ 8223.2 CDDA sectors
File Size : 1.75M
Bit Rate : 128k
Sample Encoding: 16-bit Signed Integer PCM
[root@localhost ~]#
Est-ce que la conversion de mon fichier .wav est le bon ?
Lors d'un appel en interne, j'ai bien mon pré-décroché qui est lancé.
exten => 5000,1,Progress()
same => n,Set(CHANNEL(Musicclass)=waiting-audio)
same => n,Dial(PJSIP/115,109,m(waiting-audio))
same => n,Playback(ivr/REPONDEUR_2_OCCUPE_PLATEAU_VENTE)
same => n,VoiceMail(115@default,s)
same => n,Hangup()
CLI Console:
== Setting global variable 'SIPDOMAIN' to '192.168.0.40'
-- Executing [5000@from-internal:1] Progress("PJSIP/100-000008af", "") in new stack
-- Executing [5000@from-internal:2] Set("PJSIP/100-000008af", "CHANNEL(Musicclass)=waiting-audio") in new stack
-- Executing [5000@from-internal:3] Dial("PJSIP/100-000008af", "PJSIP/115,109,m(waiting-audio)") in new stack
-- Called PJSIP/115
-- Started music on hold, class 'waiting-audio', on channel 'PJSIP/100-000008af'
-- PJSIP/115-000008b0 is ringing
-- PJSIP/115-000008b0 is ringing
Par contre sur un appel entrant mon fichier .wav n'est pas lu. J'ai une sonnerie ordinaire:
== Setting global variable 'SIPDOMAIN' to 'IP_Address'
-- PJSIP/belgium-voip-000008b2 is ringing
-- PJSIP/belgium-voip-000008b2 is ringing
-- Executing [042770677@from-external:1] NoOp("PJSIP/belgium-voip-000008b3", "## Incoming Call from "Arnold" <028992018> ##") in new stack
-- Executing [042770677@from-external:2] Progress("PJSIP/belgium-voip-000008b3", "") in new stack
-- Executing [042770677@from-external:3] Verbose("PJSIP/belgium-voip-000008b3", "Call start time: 2018-11-29 11:19:32") in new stack
Call start time: 2018-11-29 11:19:32
-- Executing [042770677@from-external:4] Set("PJSIP/belgium-voip-000008b3", "CDR(calldate)=2018-11-29 11:19:32") in new stack
-- Executing [042770677@from-external:5] Set("PJSIP/belgium-voip-000008b3", "CDR(useragent)=Arnold") in new stack
-- Executing [042770677@from-external:6] Set("PJSIP/belgium-voip-000008b3", "POSTE_EXT=028992018") in new stack
-- Executing [042770677@from-external:7] System("PJSIP/belgium-voip-000008b3", "echo "--appel_sortant --- callerid : 028992018 ---- 2018/11/29 11:19:32 ----" >> /var/spool/asterisk/log/debug.txt") in new stack
-- Executing [042770677@from-external:8] Set("PJSIP/belgium-voip-000008b3", "REC_FILE_NAME=IN__042770677_028992018.wav") in new stack
-- Executing [042770677@from-external:9] MixMonitor("PJSIP/belgium-voip-000008b3", "IN__042770677_028992018.wav,b V(1)") in new stack
-- Executing [042770677@from-external:10] Set("PJSIP/belgium-voip-000008b3", "CHANNEL(Musicclass)=waiting-audio") in new stack
-- Executing [042770677@from-external:11] Dial("PJSIP/belgium-voip-000008b3", "PJSIP/115,109,m(waiting-audio)") in new stack
-- Called PJSIP/115
-- Started music on hold, class 'waiting-audio', on channel 'PJSIP/belgium-voip-000008b3'
[Nov 29 11:19:32] WARNING[30463][C-00000495]: translate.c:407 framein: no samples for ulawtolin
== Begin MixMonitor Recording PJSIP/belgium-voip-000008b3
-- PJSIP/115-000008b4 is ringing
-- PJSIP/115-000008b4 is ringing