Jan 01 2009

Asterisk noise issue

Category: AsteriskBipin Balakrishnan @ 4:08 pm

A few weeks back  i faced a strange issue when installed asterisk in a server which uses ss7 line signalling.The issue was with the sound quality when making calls.Spoiled my two days with the issue and finally it got sloved. Here i am sharing my experience, hope it might be helpful for you guys.

Normally the noise issue can occur due to the following reason.

  • Hardware issue ( With Server / The card)
  • Codec Problem.
  • IRQ Sharing.
  • CPU load issue.

The Hardware issue

Please make sure that your server configuration is matching with what recommended by the digium. Please follow the link to choose your server.

http://www.voip-info.org/wiki/index.php?page=Asterisk+hardware+recommendations

If the server configuration is ok you can now double check the card, some time the card can also cause noice issue.Replace a the card and try again. Some card may have echo cancellation facility make sure that it is also enabled in the asterisk part also.

Codec Problem

A codec is a device or computer program capable of encoding and/or decoding a digital data stream or signal .Asterisk support different kinds of codes like gsm,wav,ulaw,alaw etc.The codec mostly used in gsm network is the gsm.Normally the MSC will convert any format to gsm format before transmitting to the mobile.If there you get a disturbed sound while making calls with a gsm format file try with wav format which is having a better sound quality than gsm.Please note to change the sound frequency that should be understood by asterisk (Asterisk normally understand sound in 8KHz ).

You can use sox for the sound conversion.

Example below converts a wav file to a file  with frequency 8KHz supported by asterisk.

sox file.wav -r 8000 -c 1 -s -w file1.wav resample -ql

IRQ Sharing

An interrupt is a method by which a piece of hardware communicates with the processor. It’s called an interrupt, because the device (such as a network card) interrupts the computer to carry out a function such as I received information, do something with it, or i’m ready with this task, give me a new one.

If  E1 card is sharing the IRQ with I/O devices the sound quality issue can occur  .We can check the interrupt status by using the command.

cat /proc/interrupts

If the any other resources is sharing the IRQ with the E1 card we can try options like putting up the card in another slot or can go to BIOS and can disable the interrupt sharing devices.

CPU load issue

The CUP load issue can be occured by many reason like MYSQL load, the  AGI programs load etc.We can see which process is consuming more memory-CPU by using the top command and can try to optimise it. Asterisk communicates with the AGI program over stdin and stdout. The arguments are passed directly to the AGI program at execution time.As AGI use  stdin and stdout reading and writing it will definitely affect the performance of the system.Better to implement almost all things in the dial plan itself. if your are 100% sure it can’t be done  with dial plan then move to AGI script.

Tags: , ,