Transcoding from SLIN to Ulaw and back, why?

I don’t understand why my server is transcoding from ulaw to slin.

I am making a call from PJSIP endpoint 5314 using ulaw out on a trunk that is also using ulaw.
There shouldn’t be any transcoding, but why is it?

Channel 1:

   Name: PJSIP/5314-00000051
   Type: PJSIP
   UniqueID: 1557531408.9768
   LinkedID: 1557531408.9768
  Caller ID: 5243888444
 Caller ID Name: (N/A)
Connected Line ID: 2124354243
Connected Line ID Name: (N/A)
Eff. Connected Line ID: 2124354243
Eff. Connected Line ID Name: (N/A)
DNID Digits: (N/A)
   Language: en
  State: Up (6)
  NativeFormats: (ulaw)
WriteFormat: slin
 ReadFormat: slin
 WriteTranscode: Yes ([email protected])->([email protected])
  ReadTranscode: Yes ([email protected])->([email protected])

Channel:2

 Name: SIP/Outbound_SBC-00000309
           Type: SIP
       UniqueID: 1557531408.9770
       LinkedID: 1557531408.9768
      Caller ID: 94342000
 Caller ID Name: (N/A)
Connected Line ID: 2124354243
Connected Line ID Name: (N/A)
Eff. Connected Line ID: 2124354243
Eff. Connected Line ID Name: (N/A)
    DNID Digits: (N/A)
       Language: en
          State: Up (6)
  NativeFormats: (ulaw)
    WriteFormat: slin
     ReadFormat: slin
 WriteTranscode: Yes ([email protected])->([email protected])
  ReadTranscode: Yes ([email protected])->([email protected])

Asterisk 13.18.3

Take a look at parameter transcode_via_sln on asterisk.conf

Those are the contents of asterisk.conf

[directories]
astetcdir => /etc/asterisk
astmoddir => /usr/lib64/asterisk/modules
astvarlibdir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk

[options]
transmit_silence_during_record = yes
languageprefix=yes
execincludes=yes

By default, Asterisk uses SLIN as internal codec so everything is transcoded to SLIN. Supposedly, you could disable that behaviour with parameter transcode_via_sln=no

If both channels use the same codec, what’s the benefit of transcoding to slin vs passthrough?

The cost of transcoding between slin and any other uncompressed codec is minimal, don’t sweat it.

2 Likes

I guess Asterisk prefers to work internally with SLIN, but that is just my thought.

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