Linphone codecs

I’m having issues with Linphone crashing with g722. I have custom sound files converted using the Digium online file conversion utility in slin, wav, gsm and g729.

The first two files played by asterisk in the IVR are slin. If I have Linphone configured to use only g722, asterisk plays slin and Linphone has no trouble with these. Then, when I enter ConfBridge, asterisk plays g722 default files and Linphone crashes.

<PJSIP/mark-00000005> Playing 'conf-getpin.g722' (language 'en')

If I then set Linphone to use only g729, I get an error on asterisk even though g729 should be supported and a g729 version of the “thankyou” file exists on disk.

Additionally, I can’t find ulaw in the codecs list in Linphone

    -- Executing [3674442211@RL-IVR:6] BackGround("PJSIP/mark-00000009", "/srv/asterisk/sounds/thankyou") in new stack
[Oct 27 05:27:21] WARNING[16664][C-0000000a]: channel.c:5505 set_format: Unable to find a codec translation path: (slin|gsm) -> (g729)
[Oct 27 05:27:21] WARNING[16664][C-0000000a]: file.c:1110 ast_streamfile: Unable to open /srv/asterisk/sounds/thankyou_rubylane (format (g729)): Function not implemented

    -- Executing [t@RL-IVR:1] Playback("PJSIP/mark-00000009", "vm-sorry") in new stack
[Oct 27 05:27:26] WARNING[16664][C-0000000a]: channel.c:5505 set_format: Unable to find a codec translation path: (slin|g722|alaw|ulaw|gsm) -> (g729)
[Oct 27 05:27:26] WARNING[16664][C-0000000a]: file.c:1110 ast_streamfile: Unable to open vm-sorry (format (g729)): Function not implemented
[Oct 27 05:27:26] WARNING[16664][C-0000000a]: app_playback.c:494 playback_exec: Playback failed on PJSIP/mark-00000009 for vm-sorry

Here is my pjsip.conf


Here is core show codecs

  30 image png          png              (PNG Image)
   5 audio g726         g726             (G.726 RFC3551)
   3 audio alaw         alaw             (G.711 a-law)
   1 audio g723         g723             (G.723.1)
  19 audio speex        speex            (SpeeX)
  20 audio speex        speex16          (SpeeX 16khz)
  21 audio speex        speex32          (SpeeX 32khz)
  23 audio g722         g722             (G722)
  31 video h261         h261             (H.261 video)
  32 video h263         h263             (H.263 video)
   7 audio adpcm        adpcm            (Dialogic ADPCM)
  24 audio siren7       siren7           (ITU G.722.1 (Siren7, licensed from Polycom))
  40 audio silk         silk8            (SILK Codec (8 KHz))
  41 audio silk         silk12           (SILK Codec (12 KHz))
  42 audio silk         silk16           (SILK Codec (16 KHz))
  43 audio silk         silk24           (SILK Codec (24 KHz))
  27 audio g719         g719             (ITU G.719)
  33 video h263p        h263p            (H.263+ video)
  34 video h264         h264             (H.264 video)
  18 audio g729         g729             (G.729A)
   8 audio slin         slin             (16 bit Signed Linear PCM)
   9 audio slin         slin12           (16 bit Signed Linear PCM (12kHz))
  10 audio slin         slin16           (16 bit Signed Linear PCM (16kHz))
  11 audio slin         slin24           (16 bit Signed Linear PCM (24kHz))
  12 audio slin         slin32           (16 bit Signed Linear PCM (32kHz))
  13 audio slin         slin44           (16 bit Signed Linear PCM (44kHz))
  14 audio slin         slin48           (16 bit Signed Linear PCM (48kHz))
  15 audio slin         slin96           (16 bit Signed Linear PCM (96kHz))
  16 audio slin         slin192          (16 bit Signed Linear PCM (192kHz))
   2 audio ulaw         ulaw             (G.711 u-law)
  17 audio lpc10        lpc10            (LPC10)
  26 audio testlaw      testlaw          (G.711 test-law)
  39 audio none         none             (<Null> codec)
  25 audio siren14      siren14          (ITU G.722.1 Annex C, (Siren14, licensed from Polycom))
   6 audio g726aal2     g726aal2         (G.726 AAL2)
  36 video vp8          vp8              (VP8 video)
   4 audio gsm          gsm              (GSM)
  35 video mpeg4        mpeg4            (MPEG4 video)
  22 audio ilbc         ilbc             (iLBC)
  37 text  red          red              (T.140 Realtime Text with redundancy)
  38 text  t140         t140             (Passthrough T.140 Realtime Text)
  28 audio opus         opus             (Opus Codec)
  29 image jpeg         jpeg             (JPEG image)

This appears to be fixed by creating g722 files for all my custom sounds.

try a ‘core show file formats’ and make sure you have G729 listed, You may have the files but lack the format handler to play them.

You’re right, it’s not there. Do I need to rebuild asterisk to fix this? I thought I had selected the g729 file format in menuselect. I’d like to use opus as well and I have but no Also, should I load, and Curiously there is no file present…

asterisk*CLI> core show file formats
Format Name Extensions

slin16 wav16 wav16
slin wav wav
gsm wav49 WAV|wav49
g722 g722 g722
ulaw au au
alaw alaw alaw|al|alw
ulaw pcm pcm|ulaw|ul|mu|ulw
gsm gsm gsm
8 file formats registered.

In modules.conf

; Codecs

load =
load =
load =
load =
load = codec_speex

; Formats

load =
load =
load =
load =
load =

Some of the modules available:

Yes you would have to recompile.

I want to say Codec support allows the PBX to transcode audio to/from that format while format support allows you to read and possibly write files of that format.

I have edited my comment above. I was certain that I had selected every format and codec available in menuselect when I compiled. Do you think I possibly omitted them?

Would this not be fixed by just adding those modules to modules.conf?

the autoloader should load the modules as needed if they are compiled without having to specify them in modules.conf

In modules.conf I have this

autoload = no

Should I change that to “yes”?

I personally find it easier to set autoload = yes and then use noload to disable modules I don’t want than to hand load modules.

1 Like