[asterisk-users] Same provider - IAX sounds bad, SIP sounds great

Troy Telford ttelford.groups at gmail.com
Tue Feb 28 15:08:06 CST 2012


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:
[general]
bandwidth=low
jitterbuffer=yes
forcejitterbuffer=no
encryption = yes
autokill=yes
maxcallnumbers=12
maxcallnumbers_nonvalidated=4

[guest]
type=user
context=default
callerid="Guest IAX User"

[myprovider]
type=friend
username=
secret=
context=somecontext
host=provider_server
qualify=1000
disallow=all
allow=g729
allow=ulaw
auth=md5,rsa
requirecalltoken=yes
trunk=yes

Firewall:
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 
problematic).

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

Any other ideas before I give up on using IAX?
Thanks
-- 
Troy Telford





More information about the asterisk-users mailing list