Question

Poor Sound Quality With Asterisk Background() and Playback()

Asked by: purestealth

Ok heres hoping one of you Asterisk Guru's has had this issue and fixed it successfully.

I am running Asterisk 1.2.24 and am having problems during calls to Playback() or Background() during an IVR menu.  The sound file is "choppy" or "jittery", almost like all the voice packets are not being transmitted.  Its worth mentioning these sound files have been professionally recorded in a recording studio. The files are WAV files encoded as 16bit, 8kHz, PCM per the Asterisk documentation.  The sound files play perfectly on my desktop computer, there is no sound issues locally.  Its only when they are loaded to the server they sound bad.

The server is hosted in our data center and is an Intel Xeon 3.0Ghz, there is 2GB of RAM, the HD's are SCSI RAID1, the NIC's are 100Tx Full Duplex.  The usage details follow:
---------------------------------------------------------------------------------------------
Here is the memory usage:
free -t -m
             total       used       free     shared    buffers     cached
Mem:          2026       1496        529          0        140       1213
-/+ buffers/cache:        142       1883
Swap:         1983          0       1983
Total:        4010       1496       2513
---------------------------------------------------------------------------------------------
Here is the disk usage:
df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      133G  3.2G  123G   3% /
/dev/sda1              99M   47M   48M  50% /boot
none                 1014M     0 1014M   0% /dev/shm
---------------------------------------------------------------------------------------------

Its worth noting that when you are talking on the phone the call quality is great, but when you call into the PBX from a Land Line or VoIP Line and the IVR plays the recorded sound files for the IVR menu's they sound "choppy", the sound is not so bad that you cant make out what its saying, but its bad enough to notice that something is wrong.  As you can see from above the server usage is pretty low.  Maximum concurrent calls is about 20 ULAW Channels.  However the sound is bad even if there is just 1 call.

I am at a loss here for what else I can try and do, we have tried the recordings in different formats (IE: GSM, ULAW, WAV) - the sound is always having the same problem.  I don't know what else to look for or what else I can try, but I would really like to get this sound problem fixed.  If the server specs are good, usage is low, and sound files are professionally recorded, why do they sound so choppy?

Also I should mention the system is 100% VoIP, the channels are IAX.

I really need some ideas and options so I can troubleshoot and fix this problem.  Here's hoping one of your expert brains can steer me in the right direction.  

Thanks in Advance

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2007-11-28 at 13:23:16ID22988973
Tags

asterisk

,

quality

,

sound

,

background

,

poor

Topics

Voice Over IP

,

IP Telephony

,

Linux

Participating Experts
1
Points
500
Comments
34

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Asterisk; Calls work, but no voice.
    I have the following problem with Asterisk after someone installed fax support on my Asterisk server: When I call internally everything works fine. This is how my setup is like: SIP software phone -> asterisk -> voip provider -> phone When I call someone, or someon...
  2. One way voice in asterisk to asterisk server
    Hi , i want to make call between two asterisk server. Both the servers are on different locations. when i tried to call asterisk to asterisk server on the same network it goes fine But when i try the same on the server on the other end the call established but having either o...
  3. Asterisk MoH Sound Quality
    Every time I convert either a WAV or MP3 file to GSM using sox the sound quality drops drastically. I have even tried to convert the file to GSM using an audio converter but stil no luck. Our PBX is asterisk v1.2 based. Any suggestions on how to make Music on Hold not sound...
  4. Asterisk playback of gsm very slow
    I have a call file where I set the channel parameter to " local/12125551212@outbound/n" and context parameter to "mycontext" and once the call enters the [outbound] context and is answered, this sends the call to context [mycontext]. Then, a .gsm file is...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: grbladesPosted on 2007-11-28 at 13:32:53ID: 20368977

Can you upload a copy of one of the files somewhere to email one to me (email address is in my profile).
I dont have any problems playing back files on our asterisk system so I think a good test would be for me to try one of your files. That way at least we can see if it is something to do with the files or some issue with your asterisk system.

 

by: purestealthPosted on 2007-11-28 at 13:46:28ID: 20369110

Excellent, good plan.

I have emailed them over to you.  I will await your findings.

Thanks for your help.

 

by: grbladesPosted on 2007-11-28 at 13:53:19ID: 20369183

I'll give them a test when i get into work in the morning (about 12 hours time).

 

by: purestealthPosted on 2007-11-28 at 14:03:03ID: 20369264

Awesome, thanks in advance for your help.

 

by: grbladesPosted on 2007-11-29 at 01:29:18ID: 20372300

I have tested the files and they sound fine on my system.

Did you manually install asterisk or are you using a distribution like trixbox or asterisknow?

If you manually installed it have you also installed zaptel?

 

by: purestealthPosted on 2007-11-29 at 07:20:22ID: 20374170

Wow, interesting find.  Ok so we can rule out any issues with the recording studio.

This is a stock install of Asterisk that I built from source, no trixbox etc.

Yes zaptel is built and installed as we using ztdummy.  There is no digium card or the like in the system.

Thanks again for your assistance with this.

 

by: grbladesPosted on 2007-11-29 at 11:32:32ID: 20376496

Is there a way that I can listen to how it sounds on your system?

Sorry for the delay replying. My email provider is having network issues at the moment causing me difficulty in getting to my email.

 

by: purestealthPosted on 2007-11-29 at 11:36:59ID: 20376534

Sure not a problem.  I have emailed you the phone number.

Thanks for your continued assistance.

 

by: grbladesPosted on 2007-11-30 at 02:23:56ID: 20380761

I tried phoning the number in 3 ways.

1) VoIP to the office and then out their PRI/E1 line and making an international call.
The sound quality was fine and was identical to playing the sound back on our pbx across the voip line.

2) Called from home via desk voip phone and then out my analogue phone line.
It again sounded fine but part of the word 'transport' was silent but I believe this is due to the echo training I have configured.

3) Just to test the previous theory I called using a analogue phone at home and this sounded fine aswell.


Maybe the quality is not quite as good but that would be impossible for me to tell since international calls do have lower quality anyway. It is certenly acceptible though.



I do have a couple of suggestions though.

1) Add a 'Wait(1)' between answering the call and starting to playback the message. This gives a little bit of time for the voice circuit to be established and stops the dialer hearing the ringing done directly followed by the audio. It just makes it easier on the ear.

2) How does the volume level of the message compare to when you are speaking to someone?
You might want to reduce the volume of the recording if it is louder.


I am probably testing at a very quiet time for you. It may be there are CPU spikes on the box occuring at peak times causing the playback problems. If you experience the problem more at certain times then let me know.

 

by: grbladesPosted on 2007-11-30 at 02:26:39ID: 20380770

Are you sure it is just the playback routines that are causing poor sound and not normal voice aswell?
If it is affecting normal voice then it could be jitter or packet loss over the internet.

 

by: grbladesPosted on 2007-11-30 at 10:07:58ID: 20383932

I tried the alternative number that you have and that did sound very poor but the previous one still sounds fine.

Do both numbers come in over the same voip provider?

 

by: purestealthPosted on 2007-11-30 at 10:08:26ID: 20383938

Thanks for your followup.

1) Currently there is a Background(silence/1) - shall I swap that out in favor of the Wait(1) ?

2) The volume sounds pretty close to the same.  Curious though, what would reducing the volume do?

With regard to when your testing date or time does not seem to matter it does the same no matter what time of day or server load.

Its actually Background where i notice the sound quality as thats whats used during IVR prompts, normal calls are fine i don't experience this issue when talking to someone live.

PS: I sent another phone number you can try and hear the sound issues.  Please let me know how it sounds to you.

Thanks again for your continued assistance with this.  

 

by: grbladesPosted on 2007-11-30 at 10:16:08ID: 20383999

1) Background() probably wont do any good as it will immediatly go onto the next step and start playing the other background message instead.

2) Just to make sure the recording isnt any louder than a normal conversation. You dont want people turning down a volume and then not being able to hear a person when the call gets put though.

 

by: purestealthPosted on 2007-12-01 at 10:47:48ID: 20388899

Hi

The recording volume seems to be okay, its pretty well at par with a regular conversation.

Where you able to try out the other number I emailed to you?  I would really like to get to the bottom of the sound issue - I am at a loss as to whats causing it.

Thanks again

 

by: grbladesPosted on 2007-12-01 at 18:06:50ID: 20390072

Yes I did. I think you probably missed my earlier post as it was just a minute before yours :-

"I tried the alternative number that you have and that did sound very poor but the previous one still sounds fine.

Do both numbers come in over the same voip provider?"

 

by: purestealthPosted on 2007-12-01 at 18:13:01ID: 20390085

Yes, both sounds from exact same voip provider and on the same server from the voip provider.

Strange indeed......

 

by: purestealthPosted on 2007-12-01 at 18:13:53ID: 20390089

Sorry your right, I did miss that previous post.  Sorry about that haha!

 

by: grbladesPosted on 2007-12-03 at 02:51:14ID: 20394675

Sorry I am out of ideas as to what could cause it. Possibly something to do with the timing source. I think the background function uses it but I cannot see anything specifically saying it.

What version of asterisk and zaptel are you running?

Can you try out the meetme conference system. If it is a timing problem then that should be affected aswell.

 

by: purestealthPosted on 2007-12-04 at 12:17:19ID: 20406006

Hello

I haveasterisk 1.2.24 and zaptel 1.2.21 installed, MeetMe seems to work with out issue.  I think the problem is related to how Asterisk is reading these files, almost like its trying to trans code it or something?  MeetMe seems to be fine so does paging.

This sure is frustrating i would love to find out why this this is happening - I cant see any reason that this should be happening.....  Thanks again for your continued help I hope we can get to the bottom of this.....

 

by: grbladesPosted on 2007-12-04 at 12:55:55ID: 20406369

Can you email me the audio file you had playing in the background in the 2nd number you gave me?
I'll convert it to a g711 format gsm file to see if that makes any difference.

 

by: purestealthPosted on 2007-12-04 at 13:04:35ID: 20406461

Ok its been sent.

Thanks alot for your help.

 

by: grbladesPosted on 2007-12-04 at 13:09:44ID: 20406519

What was the one playing in the background on the 2nd number you sent me?
I'll concentrate on that one as the others seemed to work fine for me as you were using the playback command.

 

by: purestealthPosted on 2007-12-04 at 13:12:06ID: 20406544

Do you mean which sound file of the ones i sent you were playing on the second number?

If so all of them, they are played in sequence.

Did I understand your question properly?

Thanks

 

by: grbladesPosted on 2007-12-04 at 13:26:10ID: 20406687

Just mailed you back some converted files. In order to use them you will need to move the .wav files somewhere else and then put either the .sln or the .gsm files into the directory where you had the wav files.

.sln is asterisks native format. It is practically the same format as the wav file.
.gsm is a gsm compressed file. It uses higher compression.

Give them both a go and see if the audio quality is any better with either of them. If they are both better then the .sln files would be the best to use.

 

by: purestealthPosted on 2007-12-04 at 14:38:57ID: 20407322

Very interesting - we are onto something here!!!

While you were converting etc, I had the recording studio send me the files encoded as ULAW (.ulaw) - so I have all the files in ULAW format.  I then went into my iax.conf and changed the contexts from:

[context]
blah
blah
blah
disallow=all
allow=gsm
allow=ulaw

to
[context]
blah
blah
blah
disallow=all
allow=ulaw

Notice the removal of the "allow=gsm".  As soon as I did that the files stop doing that terrible jitter sound we heard when calling the number.   So it seem the quality of the call is much better with the files as ULAW, and allow=gsm removed.  Does this make any sense to you?

Also, I tried the files you sent - they too sound much better now with the allow=gsm line removed.  Does asterisk not natively try to play the file with codec that the channel is using?

If you call the second number again can you verity the sound is better for you as well?

I was not aware of the native asterisk format.  Can you please let me know how you converted these files?  I think you likely used sox, can you show me the commands you used if that is infact what you used?

I think its probably a good idea to have these sounds in all formats - what is you opinion on this?

So looks like we are finally onto the possible culprit of this thanks for your help, look forward to your response.

 

by: grbladesPosted on 2007-12-05 at 01:30:43ID: 20409945

I would not have expected the 'allow=gsm' to have caused the problem. However having that line first would have meant that any calls would be using that codec in preference which is not really a good idea as it is fairly low quality.

I tried the number and the quality is much better but there is something strange going on. The first thing I hear is "ing" and then the "thanks for calling..." and then the "first..." recording. Between all these recordings I hear a very brief burst of noise.

Asterisk will convert the audio to the required format on the fly. It is therefore a good idea to have the audio recorded in different formats as asterisk will pick the one which best matches the codec that is being used.
Use the .gsm files for gsm compression and for ulaw there is no format so best to use wav or sln.
ulaw is basically wav but the resolution is converted from 16 down to 8 bits using a logarithmic scale so doesnt take much cpu.

This URL gives the commands for converting the files using sox
http://www.voip-info.org/tiki-index.php?page=Convert+WAV+audio+files+for+use+in+Asterisk

 

by: purestealthPosted on 2007-12-05 at 06:23:28ID: 20411351

Hi Thanks again for your post.

Yes I hear the burst of noise between the recordings as well - I am having the recording studio check on this.

They sent me these ULAW encoded files as a .wav, but when I put them in Asterisk as a .wav it will not play them.  It sais could not find a file in any format on the CLI.  Yet if I rename them to .ulaw they play.

Do you know why this is happening?

Thanks again!

 

by: grbladesPosted on 2007-12-05 at 07:38:31ID: 20412072

WAV is really just a container and can support multiple formats within it. Although the data inside is ULAW encoded Asterisk itself only supports WAV files containing pcm data. Thats probably why you are hearing the noise as it is playing the wav header information as if it is part of the ulaw audio.

 

by: purestealthPosted on 2007-12-05 at 08:12:26ID: 20412466

That is really strange.....

Those original recordings that you listened to were PCM WAV files and they sounded really bad.  Those were the ones that sounded jittery.

About that noise we here now.....you may be right about it playing the headers.  Hrm.... not sure what to do.... guess we cant record in ULAW.

I am going to ask the recording studio to redo the sound files as just PCM WAV files and to lower the volume on the recordings a bit.

Perhaps with that and the removal of the allow=gsm line it will solve the problem.....

Even still though, why the removal of allow=gsm makes any changes puzzles me, I did notice that it would have given gsm priority as it was the first allow statement, but since the call is ULAW wouldn't it have skipped that?  Or do you think Asterisk was trans coding the channel so that Playback was indeed playing in GSM even though the format was ULAW?

thanks again

 

by: grbladesPosted on 2007-12-05 at 08:30:23ID: 20412669

It depends on the direction of the call and the codecs supported by the provovider. For calls received by asterisk the codec being used will be the first one the provider prefers which is supported by asterisk. This should be ulaw.
For outgoing calls if the provider supported gsm then the could would have been in gsm format.

Did the .sln file work ok?
If it did then I would just use thats. Its basically pcm but without the .wav headers.

 

by: purestealthPosted on 2007-12-05 at 08:34:28ID: 20412711

Thanks again for your follow up.

I am going to wait to get the new recordings from the recording studio as the current ones are way too loud.

Once they send the new WAV files I will try those.  If still have problem I will convert to .sln as you suggested.

Will Asterisk play a file with that extension?  Or do I need to name it back to .wav?

Also, the removal of the wav headers, will that make a difference to Asterisk?

Thanks again for your help with this, I fell like we are onto a solution here :)

 

by: grbladesPosted on 2007-12-05 at 10:23:14ID: 20413668

.sln is asterisks native format so it will play it fine.

I would get the .wav files in normal pcm format. Then you could use sox to convert the wav files to ulaw if you wanted them in that format as it would save a little cpu time.

 

by: purestealthPosted on 2007-12-07 at 07:27:43ID: 20428056

My apologies for getting back to so slowly.

Looks like we have nailed the problem, I had the recording studio re-do the sound files with a lower volume and just wav pcm format as you mentioned previously.  Now if you call the second number the sound quality is excellent, a night and day improvement over what was there before. :) :)

About that "glitch" noise we heard previously, yes that was Asterisk trying to play the ULAW headers you were infact correct on this.

I cant thank-you enough for your time and efforts on this, I really appreciate it and am glad there is now a working solution.

Cheers!

 

by: purestealthPosted on 2007-12-07 at 07:28:26ID: 31411530

You were Awesome, thanks again!!!!

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...