I have a new Asterisk installation and am having quality problems with the GSM codec. The scenarios that I have tried are as follows:
-
providerA <–iax/ulaw–> asterisk <–sip/ulaw–> sip_phone (good)
-
providerA <–iax/ulaw–> asterisk <–sip/gsm–> sip_phone (good)
-
providerA <–iax/gsm–> asterisk <–sip/gsm–> sip_phone (good)
-
providerA <–iax/gsm–> asterisk <–sip/ulaw–> sip_phone (bad)
-
providerB <–sip/ulaw–> asterisk <–sip/ulaw–> sip_phone (good)
-
providerB <–sip/ulaw–> asterisk <–sip/g729–> sip_phone (good)
-
providerB <–sip/g729–> asterisk <–sip/g729–> sip_phone (good)
-
providerB <–sip/g729–> asterisk <–sip/ulaw–> sip_phone (good)
-
providerB <–sip/ulaw–> asterisk <–sip/gsm–> sip_phone (good)
-
providerB <–sip/gsm–> asterisk <–sip/gsm–> sip_phone (good)
-
providerB <–sip/gsm–> asterisk <–sip/ulaw–> sip_phone (bad)
Scenarios 4 and 11 where I’m doing GSM to external providers are where I have the problem. The sound quality is really, really, bad and barely intelligible. It sounds like a lot of static and distortion. What’s particularly confusing is that the problem exists only when GSM is the codec between external providers and the asterisk server. When GSM is the codec between the local phones and the asterisk server but not the providers, everything works fine.
The hardware is admittedly old (PIII), and may be the cause of the problem but I am doubtful of that. I doubt it’s processor contention as processor intensive combinations such as g729<->GSM work well. Memory and I/O resources are generally unused as well. Network utilization is low and the fact that ulaw to providers works well indicates that bandwidth is not an issue. The problem seems to be limited to the incoming stream from the provider side.
Show translation gives the following:
g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722
g723 - - - - - - - - - - - - -
gsm - - 4 - - - 3 - 36 - - - -
ulaw - 8 - - - - 1 - 34 - - - -
alaw - - - - - - - - - - - - -
g726aal2 - - - - - - - - - - - - -
adpcm - - - - - - - - - - - - -
slin - 7 1 - - - - - 33 - - - -
lpc10 - - - - - - - - - - - - -
g729 - 15 9 - - - 8 - - - - - -
speex - - - - - - - - - - - - -
ilbc - - - - - - - - - - - - -
g726 - - - - - - - - - - - - -
g722 - - - - - - - - - - - - -
I’m using version Asterisk 1.4.16.2 built from the tarball on the web site. The OS is Debian/Linux (lenny/testing) running kernel 2.6.22 (stock). Provider facing connectivity is via cable Internet (10Mbps down, 640Kbps up).
At first I thought it might be a transcoding issue but I’ve eliminated that as a variable by using voicemail. I setup the codec to my providers to allow only GSM (logging confirms this) and configured the voicemail format for only GSM. So I’m only doing GSM to the providers, voicemail prompts are in GSM format, and voicemail storage format is GSM only for the sake of testing. In this scenario, if I call from outside using my cell phone, there should be no transcoding when I leave a voicemail message as it’s GSM all the way through and watching processor utilization supports this. When I call and access voicemail from a cell phone (I have 2 providers with same results from both), it all sounds very good. I leave a message (stored in GSM format only), hangup, then proceed to retrieve it. The message sounds as initially described being barely intelligible with lots of static and distortion. So all I have now are symptoms which show that GSM from my asterisk server is fine, but GSM from both external providers to the asterisk server is really bad and transcoding is not involved.
My apologies for the long winded message but I wanted to be as thorough as possible in hopes of finding an answer. Any ideas? Thanks in advance.