# Disable unwanted transcoding

**URL:** <https://community.asterisk.org/t/disable-unwanted-transcoding/46201>\
**Category:** Asterisk Support\
**Created:** [May 20, 2014, 7:13am UTC](https://community.asterisk.org/t/disable-unwanted-transcoding/46201 "2014-05-20T07:13:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aardvark82](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@aardvark82](https://community.asterisk.org/u/aardvark82)\
**Post date:** [May 20, 2014, 7:13am UTC](https://community.asterisk.org/t/disable-unwanted-transcoding/46201/1 "2014-05-20T07:13:34Z")

</div>

```auto

[to_peer]
host=9.8.7.6
insecure=port,invite
type=peer
disallow=all
allow=g729
allow=alaw
qualify=yes
nat=no
canreinvite=no

[from_peer]
host=1.2.3.4
insecure=port,invite
type=peer
context=from_peer
disallow=all
allow=g729
allow=alaw
nat=no
canreinvite=no
qualify=yes
```

Both peers have identical settings and codecs. Caller and callee and anybody in between support G729 and G711, and don’t have any problem with both codecs. But this asterisk machine always use G711 for to\_peer and G729 for from\_peer with transcoding, of course. What’s this? Why transcoding? Unloading codec\_g729.so gives tons of error on console, like “can’t convert from g729 to slin” and no sound on calls.

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [May 20, 2014, 7:36am UTC](https://community.asterisk.org/t/disable-unwanted-transcoding/46201/2 "2014-05-20T07:36:44Z")

</div>

Which codecs, and in what order, did each peer offer?

---

<div class="post-metadata">

**Author:** ![aardvark82](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@aardvark82](https://community.asterisk.org/u/aardvark82)\
**Post date:** [May 20, 2014, 8:18am UTC](https://community.asterisk.org/t/disable-unwanted-transcoding/46201/3 "2014-05-20T08:18:58Z")

</div>

Here’s wireshark screen with full SIP exchange:

[tinypic.com/r/23shzy9/8](http://tinypic.com/r/23shzy9/8)

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [May 20, 2014, 8:41pm UTC](https://community.asterisk.org/t/disable-unwanted-transcoding/46201/4 "2014-05-20T20:41:04Z")

</div>

That doesn’t make sense at all. It should not be offering g711u, at all.

Which version of Asterisk? Which SIP channel driver? What dialplan is there between the incoming call and the Dial call?

I think you need full SIP debugging (enable full log in logger.conf, core set verbose 5, core set debug 5, sip set debug on).
