Record Voicemail in HD-Audio (16khz)

I would like to record voicemail in 16kHz HD Audio since quite a lot of calls are coming in with g722 16khz audio these days since more and more phone companies here in Germany transfer calls between their networks with HD Audio.

However, I was unable to do so. In the FreePBX Admin GUI, I went to Settings => Voicemail Admin and in this Page to Settings => General and set “File Format” to “wav16”.

I then proceeded to leave voicemail from my local Snom D765 and opened the .wav16 file I was sent via email in the Audacity audio editor. The file is now indeed a 16kHz Wave File, but when looking at the Spectrum of the Audio it can clearly be seen that it contains 8kHz audio.

I see the following in the asterisk console. The most interesting here is
“WriteTranscode: Yes ([email protected])->([email protected]) + ReadTranscode: Yes ([email protected])->([email protected])”
in the core show channel output.

Why is Asterisk transcoding my g722 to [email protected] only to then save it as 16kHz wav16?
How can I avoid this and record the full HD audio bandwidth of the call?

General Recording Info:

– <PJSIP/18-000004b2> Playing ‘beep.slin16’ (language ‘de’)
– Recording the message
– x=0, open writing: /var/spool/asterisk/voicemail/default/219/tmp/1EWNb5 format: wav16, 0x7f38440926a8

freepbx*CLI> pjsip show channels

Channel: <ChannelId…> <State…> <Time…>
Exten: <DialedExten…> CLCID: <ConnectedLineCID…>
Channel: PJSIP/18-000004b2/VoiceMail Up 00:00:14
Exten: s-CHANUNAVAIL CLCID: “VOICEMAIL TEST (219)” <219>

freepbx*CLI> pjsip show channelstats

       ...........Receive......... .........Transmit..........

BridgeId ChannelId … UpTime… Codec. Count Lost Pct Jitter Count Lost Pct Jitter RTT…
18-000004b2 00:00:47 g722 2308 0 0 0.000 2306 0 0 0.000 0.007

freepbx*CLI> core show channel PJSIP/18-000004b2

– General –
Name: PJSIP/18-000004b2
Type: PJSIP
UniqueID: 1528204191.1303
LinkedID: 1528204191.1303
Caller ID: 18
Caller ID Name: PHONE18 (18)
Connected Line ID: 219
Connected Line ID Name: VOICEMAIL TEST (219)
Eff. Connected Line ID: 219
Eff. Connected Line ID Name: VOICEMAIL TEST (219)
DNID Digits: (N/A)
Language: de
State: Up (6)
NativeFormats: (g722)
WriteFormat: slin
ReadFormat: slin
WriteTranscode: Yes ([email protected])->([email protected])
ReadTranscode: Yes ([email protected])->([email protected])
Time to Hangup: 0
Elapsed Time: 0h0m34s
Bridge ID: (Not bridged)
– PBX –
Context: macro-vm
Extension: s-CHANUNAVAIL
Priority: 2
Call Group: 0
Pickup Group: 0
Application: VoiceMail
Data: [email protected],sug(12)
Call Identifer: [C-000001fa]
Variables:
MACRO_DEPTH=2
MACRO_PRIORITY=33
MACRO_CONTEXT=macro-exten-vm
MACRO_EXTEN=s
ARG1=219
VMCONTEXT=default
DB_RESULT=default
MODE=unavail
RETVM=
MMODE=CHANUNAVAIL
MEXTEN=219
CRM_VOICEMAIL=219
EXTTOCALL=219
GOSUB_RETVAL=
VMGAIN=g(12)
AMPUSER=18
TOUCH_MONITOR=1528204191.1303
ARG3=
ARG2=CHANUNAVAIL
DIALSTATUS=CHANUNAVAIL
SV_DIALSTATUS=CHANUNAVAIL
DIALEDTIME=
ANSWEREDTIME=
DIALEDPEERNAME=
DIALEDPEERNUMBER=
D_OPTIONS=TtrI
PRESENCESTATE_DISPLAY=
KEEPCID=TRUE
CWIGNORE=
ALERT_INFO=
DSTRING=VIRTUAL/219
ITER=2
THISDIAL=VIRTUAL/219
ITER2=2
NEWDIAL=VIRTUAL/219&
THISPART2=VIRTUAL/219
LOOPCNT2=1
LOOPCNT=1
DEVICES=219
EXTHASCW=
DIALSTATUS_CW=
CRM_SOURCE=18
DEXTEN=219
RECMODE=dontcare
CALLEE=dontcare
CALLTYPE=internal
REC_POLICY_MODE_SAVE=
MON_FMT=wav
FROMEXTEN=18
TIMESTR=20180605-150951
YEAR=2018
MONTH=06
DAY=05
NOW=1528204191
REC_STATUS=INITIALIZED
RT=15
PICKUPMARK=219
RingGroupMethod=none
TTL=64
CALLEE_ACCOUNCODE=
DIAL_OPTIONS=Ttr
AMPUSERCID=18
AMPUSERCIDNAME=PHONE18 (18)
REALCALLERIDNUM=18
ARG5=0
ARG4=1
RINGTIMER=15
CDR Variables:
level 1: calledsubaddr=
level 1: callingsubaddr=
level 1: dnid=
level 1: cnum=18
level 1: cnam=PHONE18 (18)
level 1: clid=“PHONE18 (18)” <18>
level 1: src=18
level 1: dst=s-CHANUNAVAIL
level 1: dcontext=macro-vm
level 1: channel=PJSIP/18-000004b2
level 1: lastapp=VoiceMail
level 1: [email protected],sug(12)
level 1: start=1528204191.103852
level 1: answer=1528204191.745778
level 1: end=0.000000
level 1: duration=34
level 1: billsec=34
level 1: disposition=1
level 1: amaflags=3
level 1: uniqueid=1528204191.1303
level 1: linkedid=1528204191.1303
level 1: sequence=1592

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.