Asterisk : No compatible codecs, not accepting this offer!

I get this error when I am trying to use g729 codecs on Asterisk 13

When I load “module load codec_g729.so” It load codec_g729.so

But when I run “module show” to see all running modules, I realized the “Unknown” for codec_g729.so while other codecs had “core” as their tag.

When I try to test Asterisk server, I got the error NOTICE[15303][C-00005d4d]: chan_sip.c:10753 process_sdp: No compatible codecs, not accepting this offer!

I am using Asterisk 13 [REMOVED BY ADMINISTRATOR]

When I run “uname -a” I get

4.5.7-std-2 #1 SMP Fri Jul 1 11:00:36 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

This error is the result of a conflict between the peer configuration and the Asterisk configuration for the peer. It is not the result of a missing codec translator. Asterisk can still pass codecs when there is no translator.

Enable SIP debugging and the DEBUG log level and look at what is being offered as against what your allow lines allow.

Okay, I will do that

This is what I get from the debug

— (15 headers 12 lines) —

— (15 headers 12 lines) —
Sending to 198.101.50.4:5060 (no NAT)
Sending to 198.101.50.4:5060 (no NAT)
Using INVITE request as basis request - 19a05a4e7a15528b6212c45233aa3d43@198.101 .50.4
No matching peer for ‘12057742537’ from ‘198.101.50.4:5060’
== Using SIP RTP CoS mark 5
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
[Aug 24 00:06:01] NOTICE[15303][C-00005e94]: chan_sip.c:10753 process_sdp: No co mpatible codecs, not accepting this offer!

<— Reliably Transmitting (no NAT) to 198.101.50.4:5060 —>
SIP/2.0 488 Not acceptable here
Via: SIP/2.0/UDP 198.101.50.4:5060;branch=z9hG4bK3177e003;received=198.101.50.4; rport=5060
From: “12057742537” sip:12057742537@198.101.50.4;tag=as724d2d96
To: sip:15672440000@163.172.172.59;tag=as0cf3bde1
Call-ID: 19a05a4e7a15528b6212c45233aa3d43@198.101.50.4
CSeq: 102 INVITE
Server: Asterisk PBX 13.10.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLIS H, MESSAGE
Supported: replaces, timer
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘19a05a4e7a15528b6212c45233aa3d43@198.101.5 0.4’ in 32000 ms (Method: INVITE)

<— SIP read from UDP:198.101.50.4:5060 —>
ACK sip:15672440000@163.172.172.59 SIP/2.0
Via: SIP/2.0/UDP 198.101.50.4:5060;branch=z9hG4bK3177e003;rport
From: “12057742537” sip:12057742537@198.101.50.4;tag=as724d2d96
To: sip:15672440000@163.172.172.59;tag=as0cf3bde1
Contact: sip:12057742537@198.101.50.4
Call-ID: 19a05a4e7a15528b6212c45233aa3d43@198.101.50.4
CSeq: 102 ACK
User-Agent: DiDXsuPErTecSIP4
Max-Forwards: 70
Remote-Party-ID: “12057742537” sip:12057742537@198.101.50.4;privacy=off;screen =no
Content-Length: 0

<------------->
— (11 headers 0 lines) —
Really destroying SIP dialog ‘19a05a4e7a15528b6212c45233aa3d43@198.101.50.4’ Met hod: ACK

<— SIP read from UDP:198.101.50.4:5060 —>
BYE sip:15672440000@163.172.172.59 SIP/2.0
Via: SIP/2.0/UDP 198.101.50.4:5060;branch=z9hG4bK6ad3c9c5;rport
From: “12057742537” sip:12057742537@198.101.50.4;tag=as724d2d96
To: sip:15672440000@163.172.172.59;tag=as0cf3bde1
Call-ID: 19a05a4e7a15528b6212c45233aa3d43@198.101.50.4
CSeq: 103 BYE
User-Agent: DiDXsuPErTecSIP4
Max-Forwards: 70
Remote-Party-ID: “12057742537” sip:12057742537@198.101.50.4;privacy=off;screen =no
Content-Length: 0

<------------->
— (10 headers 0 lines) —
Sending to 198.101.50.4:5060 (no NAT)

<— Transmitting (no NAT) to 198.101.50.4:5060 —>
SIP/2.0 481 Call leg/transaction does not exist
Via: SIP/2.0/UDP 198.101.50.4:5060;branch=z9hG4bK6ad3c9c5;received=198.101.50.4; rport=5060
From: “12057742537” sip:12057742537@198.101.50.4;tag=as724d2d96
To: sip:15672440000@163.172.172.59;tag=as0cf3bde1
Call-ID: 19a05a4e7a15528b6212c45233aa3d43@198.101.50.4
CSeq: 103 BYE
Server: Asterisk PBX 13.10.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLIS H, MESSAGE
Supported: replaces, timer
Content-Length: 0

<------------>

That trace is incomplete.

It would appear that you have allowguest=yes and you don’t have a matching peer or user for the other side. As such you are using the settings in the general section.

They have told you they are only interested in receiving G.711 mu-law (and RFC2833 DTMF). You have obviously disabled mu-Law in your general section.

Yes, you are right, in the general section, I only enabled g729 to test for g729 and in the sip trunk that takes my extension, I only accept g729 also.

When I enable other codecs such as alaw, ulaw, gsm, it works but when I force it to g729, it doesnt.
Shouldnt g729 be the codecs that should work overall?

Also from my debug, I saw the state found peer ‘67262622’ to and IP thats when I only set the IP in the extension

[nextnumber]
host = ipaddress

But when I do it like this

[nextnumber]
host = dynamic

Which I think to match any IP making the call, it says no peer found for ‘777377722’ from ‘ipaddress’

“host=dynamic” does not match any IP making the call, it tells chan_sip that a remote device is going to REGISTER to it to tell it its IP address. If that does not happen then the entry will have no IP address to match.

So for “host=dynamic” I have to register the extension in the sip.conf like [78768272]

You don’t register the extension in sip.conf. The term “register” in SIP means for a remote device to communicate, using SIP, and register its IP address. The device has to be configured to do so. If a device isn’t meant to register then you put its IP address explicitly using the host line.

Okay I understand now, I get host logic clearly now. Also in my sip.conf file, allowing alaw, ulaw, gsm and g729 makes the audio works, If I disable all codecs except g729, I get the “No compatible codecs” error.

Shouldnt g729 works across all extensions or devices?

That controls what codecs are allowed on the Asterisk side. It’s still up to the device to support and allow the codecs.

But I want to make sure g729 is working, that is is why I enabled it and disable others. But I have no luck in making it work, I get No compaitble codecs error, when I run module show like codec_g729, I see it listed but it has a tag “unknown” while other codecs had “core”.

If the device does not ask for G729 then Asterisk can not force it to use G729.

hey oladapoadebowale,

did you solve it?

Yes. I use another G729 that is compatible to my asterisk version and it worked

4 posts were split to a new topic: No compatible codecs with opus offer