# Codecs order

**URL:** <https://community.asterisk.org/t/codecs-order/23922>\
**Category:** Asterisk General\
**Created:** [November 4, 2008, 2:44pm UTC](https://community.asterisk.org/t/codecs-order/23922 "2008-11-04T14:44:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jinkt](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jinkt](https://community.asterisk.org/u/jinkt)\
**Post date:** [November 4, 2008, 2:44pm UTC](https://community.asterisk.org/t/codecs-order/23922/1 "2008-11-04T14:44:42Z")

</div>

hello i have problem  
hi  
i am connected to provider thru SIP trunk, with OpenSIPS, on OpenSIPS is connected Asterisk as Endpoint  
for SIP phones

everythin is ok while i use ulaw or alaw,  
on asterisk: disallow=all, allow=alaw,allow=ulaw

on some phones i need lower codec, so i set up for this extension  
disallow=all  
allow=g729

no i suppose asterisk should do transcoding, but he don’t, is there any special configuration

so to trunk i’ve add allow=g729 (to PEER and USER detail)  
with this configuration, outgoing calls are ok

but inbound call aren’t working, if i understad debug messages correctly, asterisk is trying to make channel to endphone on alaw not with g729 (ist only allowd codec in setup for this sip extensions)

can i change order of preffered codecs in any way ?

---

<div class="post-metadata">

**Author:** ![mazilo](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mazilo](https://community.asterisk.org/u/mazilo)\
**Post date:** [November 5, 2008, 2:50am UTC](https://community.asterisk.org/t/codecs-order/23922/2 "2008-11-05T02:50:25Z")

</div>

> [@jinkt](#):
>
> no i suppose asterisk should do transcoding, but he don’t, is there any special configuration

Does your asterisk have a G729 CoDec license?

---

<div class="post-metadata">

**Author:** ![jinkt](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jinkt](https://community.asterisk.org/u/jinkt)\
**Post date:** [November 5, 2008, 8:23am UTC](https://community.asterisk.org/t/codecs-order/23922/3 "2008-11-05T08:23:02Z")

</div>

am sorry , i didn’t know there is needed licence for g726  
there isn’t needid licence only for passthru,

thank you for your help

---

<div class="post-metadata">

**Author:** ![mazilo](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mazilo](https://community.asterisk.org/u/mazilo)\
**Post date:** [November 5, 2008, 12:40pm UTC](https://community.asterisk.org/t/codecs-order/23922/4 "2008-11-05T12:40:04Z")

</div>

[quote=“jinkt”]am sorry , i didn’t know there is needed licence for g726  
there isn’t needid licence only for passthru,[/quote]  
That’s true, except when you were expecting your asterisk to perform a transcoding that requires a G729 CoDec license.
