Doubt codec translation PJSIP

Hello Guys…
I’m getting some warnings from my CLI when I receive calls. The message is very clear that it is not possible to translate G729 codec however, I’ve configured my gateway to just accept G711A, so I’m trying to understand why I’m receiving this message ?

PS.: I use MixMonitor to record my calls.

PJSIP.conf

[trunk_inbound]
type = aor
contact = sip:10.10.20.30

[trunk_inbound]
type = identify
endpoint = trunk_inbound
match = 10.10.20.30

[trunk_inbound]
type = endpoint
context = gw_context
dtmf_mode = none
disallow = all
allow = alaw
direct_media = no
aors = trunk_inbound

Asterisk CLI message:

[gateway*CLI>
[0K[1;30m – [0mPJSIP/trunk_pbx-00004d81 answered PJSIP/trunk_inbound-00004d80

[gateway*CLI>
[0K[1;30m > [0m0x7fa56c04e360 – Strict RTP learning after remote address set to: 10.10.20.30:11814

[gateway*CLI>
[0K[1;30m – [0mChannel PJSIP/trunk_pbx-00004d81 joined ‘simple_bridge’ basic-bridge <445463ff-350c-48c2-9a72-614ce4da9c50>

[gateway*CLI>
[0K[1;30m – [0mChannel PJSIP/trunk_inbound-00004d80 joined ‘simple_bridge’ basic-bridge <445463ff-350c-48c2-9a72-614ce4da9c50>

[gateway*CLI>
[0K[1;30m > [0m0x7fa56c084cd0 – Strict RTP switching to RTP target address 172.16.10.10:29446 as source

[gateway*CLI>
[0K[1;30m > [0m0x7fa56c04e360 – Strict RTP switching to RTP target address 10.10.20.30:11814 as source
[Sep 4 12:01:22] [1;31mWARNING[0m[14369][C-000026cd]: [1;37mtranslate.c[0m:[1;37m487[0m [1;37mast_translator_build_path[0m: No translator path: (ending codec is not valid)

[gateway*CLI>
[0K[Sep 4 12:01:22] [1;31mWARNING[0m[14369][C-000026cd]: [1;37mtranslate.c[0m:[1;37m487[0m [1;37mast_translator_build_path[0m: No translator path: (ending codec is not valid)
[Sep 4 12:01:22] [1;31mWARNING[0m[14369][C-000026cd]: [1;37mtranslate.c[0m:[1;37m487[0m [1;37mast_translator_build_path[0m: No translator path: (starting codec is not valid)

[gateway*CLI>
[0K[Sep 4 12:01:22] [1;31mWARNING[0m[14371][C-000026cd]: [1;37mchannel.c[0m:[1;37m5740[0m [1;37mset_format[0m: Unable to find a codec translation path: (g729) -> (alaw)

[gateway*CLI>
[0K[1;30m – [0mChannel PJSIP/trunk_pbx-00004d81 left ‘simple_bridge’ basic-bridge <445463ff-350c-48c2-9a72-614ce4da9c50>

[gateway*CLI>
[0K[1;30m – [0mChannel PJSIP/trunk_inbound-00004d80 left ‘simple_bridge’ basic-bridge <445463ff-350c-48c2-9a72-614ce4da9c50>
[Sep 4 12:01:22] [1;31mWARNING[0m[14369][C-000026cd]: [1;37mchannel.c[0m:[1;37m5740[0m [1;37mset_format[0m: Unable to find a codec translation path: (g729) -> (alaw)

INVITE from carrier to gateway inbound:
image

You need to also provide the configuration for “trunk_pbx”. Is it configured to prefer G729?

Here my trunk configuration very similar to my inbound configuration

[trunk_pbx]
type = aor
contact = sip:172.16.10.10

[trunk_pbx]
type = identify
endpoint = trunk_pbx
match = 172.16.10.10

[trunk_pbx]
type = endpoint
context = gw_context
dtmf_mode = none
disallow = all
allow = alaw
direct_media = no
aors = trunk_pbx

Is it configured to prefer G729? My PBX side codecs order is G729 - G711A - G711U

I really would like to understand why is trying to to translate G729 if both legs is configured in pjsip to just accept ALAW.

Thanks !!!

You’ll need to provide the complete output of “pjsip set logger on” to show what the SDP has actually negotiated.

What version of Asterisk are you also using?