* You are viewing Posts Tagged ‘ulaw’

Why Doesn’t Asterisk Try To Prevent Transcoding

Let’s say I have two devices configured and the follow call scenarios occur.

disallow=all allow=g722&ulaw

Polycom phone with g722,ulaw,alaw,g729

disallow=all allow=ulaw

Polycom phone with g722,ulaw,alaw,g729

101 dials 100 -> ulaw to ulaw is chosen
100 dials 101 -> g722 to ulaw is chosen

Ideally when 100 dials 101 ulaw would be chosen since it is the common format. Looking into this deeper

Device 100 sends INVITE to Asterisk offering g722,ulaw,alaw,g729
Asterisk sends INVITE to device 101 offering ulaw Device 101 sends 200 OK to Asterisk offering ulaw Asterisk sends 200 OK to device 100 offering g722,ulaw

I can prevent transcoding by adding SIP_CODEC_INBOUND=ulaw to the dialplan for extension 101. This causes Asterisk to send 200 OK to device 100
offering ulaw. Am I missing why Asterisk wouldn’t just offer the highest priority codec they have in common to prevent transcoding?


Sound file format and Asterisk 1.8.11-cert1

Hi All;

I installed Asterisk 1.8.11-cert1, and it look like the default is ulaw for the sound files. How I can fix this?

Athough file beep.gsm is existed under path (/var/lib/asterisk/sounds/en), but when I used the Record function, it gave me the following (so I am sure there is something that can let asterisk accept beep.gsm), what could be?

[May 5 00:44:16] WARNING[2262]: file.c:663 ast_openstream_full: File beep does not exist in any format
[May 5 00:44:16] WARNING[2262]: file.c:958 ast_streamfile: Unable to open beep (format 0x4 (ulaw)): No such file or directory
[May 5 00:44:16] WARNING[2262]: app_record.c:285 record_exec: ast_streamfile failed on DAHDI/1-1


Same provider – IAX sounds bad, SIP sounds great

On my Asterisk system, I’m using a provider that provides both IAX2 and
SIP connectivity.

Personally, I’d prefer to use IAX2, and that’s what my account is setup
to use. However, I’m having a problem:

With IAX2:
– Incoming Voice from my Provider -> Asterisk = Sounds great
– Outgoing Voice from Asterisk -> my Provider = Sounds terrible

By “terrible,” I mean skips, stutters, and distortion. It can be
difficult (sometimes impossible) to understand. It doesn’t matter what
codec I use (at least between G.729, GSM, or ulaw).

On the other hand:
With SIP:
– Incoming Voice from my Provider -> Asterisk = Sounds great
– Outgoing Voice from Asterisk -> my Provider = Sounds great

The obvious conclusion is to simply use SIP; however as I’ve said, I’d
prefer to use IAX2 – plus, I’m curious why SIP sounds great, while IAX2
only sounds good one-way (ie. incoming to my asterisk system).

The server for my provider is identical in either case. So I figure
it’s one of a few things:
– misconfiguration
– My ISP (Comcast) is throttling or giving a low priority to IAX, but not SIP
– If there’s something I can do here, I’d like to know, but I doubt it.
– a problem with my provider
– In which I’ll contact them.

For the first case – misconfiguration, I’d appreciate some input. My
iax.conf is fairly straightforward:
encryption = yes

callerid=”Guest IAX User”


Asterisk is behind a connection-tracking firewall; in my case, I’ve
noticed that my own connection to my provider has always been
sufficient to allow connection tracking to “just work” – and incoming
calls are accepted without problems, and voice travels in both
directions (albeit not so well when outgoing).

I have configured my firewall to forward incoming connections on port
4569 to my Asterisk box, and tested. This had no effect on call
quality (which is no surprise given it’s the /outgoing/ voice that’s

Outgoing connections are fairly typical for a NAT setup – anything can go out.

Any other ideas before I give up on using IAX?

Dropping incompatible voice frame error


We have an old analog phone system running Asterisk 1.2.13 (not my choice lol). Everything has been working wonderfully until today. The site is experiencing dropped and missed calls. When I tried calling the site, I did get through however the CLI was flooded with hundreds of copies of the following:
Jan 25 15:46:54 NOTICE[2343]: channel.c:1956 ast_read: Dropping incompatible voice frame on Local/4227@from-sip-a3d8,2 of format ulaw since our native format has changed to slin

I tried Googling the error but unfortunately, there were lots of reports of the problem and not a single solution or fix. My thinking is that it has to do with the service provider but I want to do my homework before pointing the finger.

Any assistance would be greatly appreciated.


Kevin Oravits
Phone Sys Admin/Tech Admin

no audio using g729A for Cisco AS5300 sip peer


We need help in enabling g729a codec for our SIP peer that’s using Cisco
Our codec is purchased from Digium.

We are able to dial out the numbers and answer the call, but there’s no
audio. This is when only g729a is allowed.

We noticed when they also allow ulaw codec on their side, the codec used
falls back to ulaw and the problem is gone.

Codec warnings after upgrade to 1.8

I’m getting various codec related warnings after upgrading to 1.8. Did I miss something in the UPGRADE file? Does Asterisk no longer transcode 8-)?

WARNING[11123]: channel.c:4909 ast_write: Codec mismatch on channel DAHDI/i1/12124221200-74 setting write format to g722 from ulaw native formats 0x4 (ulaw)


WARNING[11120]: channel.c:4909 ast_write: Codec mismatch on channel SIP/interglobe-sip-000001e6 setting write format to g722 from ulaw native formats 0x4 (ulaw)