# Transcoding from SLIN to Ulaw and back, why?

**URL:** <https://community.freepbx.org/t/transcoding-from-slin-to-ulaw-and-back-why/58643>\
**Category:** FreePBX\
**Created:** [May 10, 2019, 11:41pm UTC](https://community.freepbx.org/t/transcoding-from-slin-to-ulaw-and-back-why/58643 "2019-05-10T23:41:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![avayax](https://community.freepbx.org/user_avatar/community.freepbx.org/avayax/32/8765_2.png) [@avayax](https://community.freepbx.org/u/avayax)\
**Post date:** [May 10, 2019, 11:41pm UTC](https://community.freepbx.org/t/transcoding-from-slin-to-ulaw-and-back-why/58643/1 "2019-05-10T23:41:06Z")

</div>

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 (slin@8000)->(ulaw@8000)
  ReadTranscode: Yes (ulaw@8000)->(slin@8000)

```

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 (slin@8000)->(ulaw@8000)
  ReadTranscode: Yes (ulaw@8000)->(slin@8000)

```

Asterisk 13.18.3

---

<div class="post-metadata">

**Author:** ![arielgrin](https://community.freepbx.org/letter_avatar_proxy/v4/letter/a/f17d59/32.png) [@arielgrin](https://community.freepbx.org/u/arielgrin)\
**Post date:** [May 11, 2019, 1:05am UTC](https://community.freepbx.org/t/transcoding-from-slin-to-ulaw-and-back-why/58643/2 "2019-05-11T01:05:15Z")

</div>

Take a look at parameter transcode\_via\_sln on asterisk.conf

---

<div class="post-metadata">

**Author:** ![avayax](https://community.freepbx.org/user_avatar/community.freepbx.org/avayax/32/8765_2.png) [@avayax](https://community.freepbx.org/u/avayax)\
**Post date:** [May 17, 2019, 5:14pm UTC](https://community.freepbx.org/t/transcoding-from-slin-to-ulaw-and-back-why/58643/3 "2019-05-17T17:14:16Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![arielgrin](https://community.freepbx.org/letter_avatar_proxy/v4/letter/a/f17d59/32.png) [@arielgrin](https://community.freepbx.org/u/arielgrin)\
**Post date:** [May 17, 2019, 5:59pm UTC](https://community.freepbx.org/t/transcoding-from-slin-to-ulaw-and-back-why/58643/4 "2019-05-17T17:59:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![avayax](https://community.freepbx.org/user_avatar/community.freepbx.org/avayax/32/8765_2.png) [@avayax](https://community.freepbx.org/u/avayax)\
**Post date:** [May 17, 2019, 6:12pm UTC](https://community.freepbx.org/t/transcoding-from-slin-to-ulaw-and-back-why/58643/5 "2019-05-17T18:12:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dicko](https://community.freepbx.org/user_avatar/community.freepbx.org/dicko/32/8712_2.png) [@dicko](https://community.freepbx.org/u/dicko)\
**Post date:** [May 17, 2019, 6:13pm UTC](https://community.freepbx.org/t/transcoding-from-slin-to-ulaw-and-back-why/58643/6 "2019-05-17T18:13:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![arielgrin](https://community.freepbx.org/letter_avatar_proxy/v4/letter/a/f17d59/32.png) [@arielgrin](https://community.freepbx.org/u/arielgrin)\
**Post date:** [May 17, 2019, 11:03pm UTC](https://community.freepbx.org/t/transcoding-from-slin-to-ulaw-and-back-why/58643/7 "2019-05-17T23:03:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://community.freepbx.org/uploads/default/original/3X/f/7/f7056d57e04fdbf71c6ad967e1ced351317f5c3f.png) [@system](https://community.freepbx.org/u/system)\
**Post date:** [May 24, 2019, 11:03pm UTC](https://community.freepbx.org/t/transcoding-from-slin-to-ulaw-and-back-why/58643/8 "2019-05-24T23:03:38Z")

</div>

Closed on May 24, 2019, 11:03pm UTC

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