Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Playback / Background / Read choppy, but musiconhold fine, even with ztdummy


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
ben4asterisk at yahoo.com
Guest





PostPosted: Fri Apr 25, 2008 1:23 am    Post subject: [asterisk-users] Playback / Background / Read choppy, but mu Reply with quote

Hello ppl,

One on my clients' machine had Asterisk 1.4.4. installed. The complained of choppy Playback of gsm files.
So scouring the internet gave me the solution of installing ztdummy and loading it as a module.
Did it (using zaptel-1.4.1) , but to no effect. Re-compiled asterisk and re-installed. Sill no effect.

Do I have to specify any parameter in the Asterisk compilation to look at ztdummy/rtc? As far as I remember (am coming back to Asterisk after quite some time now), you don't really need to set anything over there for any zaptel specific compilation?

And yes, all the files are gsm files and the codec used for the calls is ulaw.

I even tried converting those gsm files to wav using sox and then playing them, but the behaviour is the same.

Any ideas anyone.. something I am missing ??

TiA,

- Ben.



---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080424/29b73638/attachment.htm
Back to top
ben4asterisk at yahoo.com
Guest





PostPosted: Fri Apr 25, 2008 7:40 am    Post subject: [asterisk-users] Playback / Background / Read choppy, but mu Reply with quote

Are my messages getting through?

This is urgent!! Any pointers?
Benjamin Jacob <ben4asterisk at yahoo.com> wrote: Date: Thu, 24 Apr 2008 23:23:08 -0700 (PDT)
From: Benjamin Jacob <ben4asterisk at yahoo.com>
Subject: Playback / Background / Read choppy, but musiconhold fine, even with ztdummy
To: asterisk-users at lists.digium.com


Hello ppl,

One on my clients' machine had Asterisk 1.4.4. installed. The complained of choppy Playback of gsm files.
So scouring the internet gave me the solution of installing ztdummy and loading it as a module.
Did it (using zaptel-1.4.1) , but to no effect. Re-compiled asterisk and re-installed. Sill no effect.

Do I have to specify any parameter in the Asterisk compilation to look at ztdummy/rtc? As far as I remember (am coming back to Asterisk after quite some time now), you don't really need to set anything over there for any zaptel specific compilation?

And yes, all the files are gsm files and the codec used for the calls is ulaw.

I even tried converting those gsm files to wav using sox and then playing them, but the behaviour is the same.

Any ideas anyone.. something I am missing ??

TiA,

- Ben.





---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.


---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080425/83ebae0e/attachment.htm
Back to top
tony at softins.clara....
Guest





PostPosted: Fri Apr 25, 2008 8:35 am    Post subject: [asterisk-users] Playback / Background / Read choppy, but mu Reply with quote

In article <841715.98554.qm at web46405.mail.sp1.yahoo.com>,
Benjamin Jacob <ben4asterisk at yahoo.com> wrote:
Quote:

One on my clients' machine had Asterisk 1.4.4. installed. The complained of choppy Playback
of gsm files.
So scouring the internet gave me the solution of installing ztdummy and loading it as a module.
Did it (using zaptel-1.4.1) , but to no effect. Re-compiled asterisk and re-installed. Sill
no effect.

Do I have to specify any parameter in the Asterisk compilation to look at ztdummy/rtc? As
far as I remember (am coming back to Asterisk after quite some time now), you don't really
need to set anything over there for any zaptel specific compilation?

And yes, all the files are gsm files and the codec used for the calls is ulaw.

I even tried converting those gsm files to wav using sox and then playing them, but the
behaviour is the same.

Any ideas anyone.. something I am missing ??

Firstly, check whether Asterisk has chan_zap loaded and access to zaptel:

*CLI> zap show channels
Chan Extension Context Language MusicOnHold
pseudo default
*CLI>

If you don't get pseudo shown, then you are not getting the benefit of
ztdummy.

However, the probably main cause of choppy sound is poor timing from the
SIP client (I'm assuming SIP), because Asterisk by default uses the incoming
stream to generate timing for the outbound stream.

There are two main things to try:

1. Make sure that the SIP clients are NOT using silence suppression (may
be referred to as VAD, bandwidth saving, or something similar).

2. If ztdummy is running ok, edit /etc/asterisk/asterisk.conf and enable
the line "internal_timing=yes". That should make it play out based on
internal zaptel timing instead of timing off the incoming stream, I think.

Cheers
Tony
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
Back to top
support at drdos.info
Guest





PostPosted: Fri Apr 25, 2008 8:54 am    Post subject: [asterisk-users] Playback / Background / Read choppy, but mu Reply with quote

Tony Mountifield wrote:
Quote:
2. If ztdummy is running ok, edit /etc/asterisk/asterisk.conf and enable
the line "internal_timing=yes". That should make it play out based on


One other thing comes to mind, make sure you compile with 'Don't
optimize' if you're using gcc 4.2.2

Doug

--

Ben Franklin quote:

"Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."
Back to top
tony at softins.clara....
Guest





PostPosted: Fri Apr 25, 2008 10:02 am    Post subject: [asterisk-users] Playback / Background / Read choppy, but mu Reply with quote

In article <475001.15893.qm at web46412.mail.sp1.yahoo.com>,
Benjamin Jacob <ben4asterisk at yahoo.com> wrote:
Quote:

Also, I don't think my SIP gateway uses Silence suppression, because the same SIP gateway
connections work fine with another Asterisk server.

OK, I think you need to home in on the differences between the server(s)
that work fine and the one that doesn't.

What version of kernel is it running? If it less than 2.6.13, make sure
you change "#if 0" to "#if 1" in ztdummy.c so that USE_RTC still gets
enabled.

Try "watch -dn 1 cat /proc/interrupts" and check that the RTC interrupts
are going up by 1024 per second. This is with ztdummy running.

What else is going on on this server? Does it have any virtual machines
on it? Does it have X Windows running? What does "top" show?

Cheers
Tony
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
Back to top
tzafrir.cohen at xorco...
Guest





PostPosted: Fri Apr 25, 2008 10:32 am    Post subject: [asterisk-users] Playback / Background / Read choppy, but mu Reply with quote

On Fri, Apr 25, 2008 at 03:02:14PM +0000, Tony Mountifield wrote:
Quote:
In article <475001.15893.qm at web46412.mail.sp1.yahoo.com>,
Benjamin Jacob <ben4asterisk at yahoo.com> wrote:
Quote:

Also, I don't think my SIP gateway uses Silence suppression, because the same SIP gateway
connections work fine with another Asterisk server.

OK, I think you need to home in on the differences between the server(s)
that work fine and the one that doesn't.

What version of kernel is it running? If it less than 2.6.13, make sure
you change "#if 0" to "#if 1" in ztdummy.c so that USE_RTC still gets
enabled.

RTC is available (and used) as of kernel 2.6.15 . The thing that has
changed in 2.6.13 is that the default of HZ became 250 (but still
tunable). So unless you build your own kernel, without using RTC you
would not really get a steady rate of 1000 interrupts per second.

And then again, on kernels >= 2.6.22 you have hi-resolution timers which
generally work better.

Quote:

Try "watch -dn 1 cat /proc/interrupts" and check that the RTC interrupts
are going up by 1024 per second. This is with ztdummy running.

And if using something other than RTC: 1000 interrupts per second.
Anyway, "close to 1000" is easy to spot there.

--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
Back to top
tony at softins.clara....
Guest





PostPosted: Fri Apr 25, 2008 11:32 am    Post subject: [asterisk-users] Playback / Background / Read choppy, but mu Reply with quote

In article <20080425153232.GP27523 at xorcom.com>,
Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
Quote:

RTC is available (and used) as of kernel 2.6.15 . The thing that has
changed in 2.6.13 is that the default of HZ became 250 (but still
tunable). So unless you build your own kernel, without using RTC you
would not really get a steady rate of 1000 interrupts per second.

Well, I'm not familiar with the later 2.6 kernels (most of my systems
are at 2.6.12 (FC3) or 2.6.9 (RHEL4 clones)).

However, the USE_RTC code was my creation, so I'm very familiar with the
issues as they were at the time. See http://bugs.digium.com/view.php?id=4301

The issue was that the original 2.6 version of ztdummy ran off the 1000Hz
kernel jiffy counter. This had a tendency to miss ticks. Having successfully
used the zaprtc module in 2.4, I re-implemented it for 2.6 using the rtc
hooks that the 2.6 kernel provided. It sets the 146818 RTC chip to generate
1024Hz interrupts (it can't do 1000Hz), and then skips 3 every 128, evenly
spaced. This was a huge improvement over the jiffy counter.

Unfortunately, when the patch was applied to CVS, someone screwed up and
missed out ztdummy.h, only doing ztdummy.c. This broke compilation and
caused BKW to throw a fit. The knee-jerk reaction was to slap an #if 0
around the #define USE_RTC, rather than understand the cause of the problem.
Once ztdummy.h was patched correctly, the #if 0 should have been removed,
but it never was, so most people continued to build it with the inferior
jiffy clock.

When kernel 2.6.13 came along, the jiffy clock no longer defaulted to 1000Hz,
so USE_RTC was made the default for those versions. I will never understand
why it was never just enabled for *all* 2.6 kernels at that time, like it
should have been in the first place.

The only dependency it has is that the kernel must have been built with
CONFIG_RTC and not CONFIG_GENRTC.

Quote:
And then again, on kernels >= 2.6.22 you have hi-resolution timers which
generally work better.

I have yet to experience these, but it sounds promising.

Cheers
Tony
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
Back to top
ben4asterisk at yahoo.com
Guest





PostPosted: Sat Apr 26, 2008 8:14 am    Post subject: [asterisk-users] Playback / Background / Read choppy, but mu Reply with quote

Quote:

OK, I think you need to home in on the differences
between the server(s)
that work fine and the one that doesn't.

As I said in my other mail, the faulty one is a
.. mono processor machine, with SMP turned on
.. running CentOS 5
.. with kernel : 2.6.18-53.1.13.el5
There are other kernels too(2.6.18-8, etc.), will be
trying those kernels too.

The local working machine is :
.. dual processor, with SMP ofcourse
.. running Fedora Core 7, if I remember it correctly.
.. kernel definitely > 2.6.13

Have looked at all parameters, be it the kernel timer
frequency(1000 HZ), enhanced timer support, etc.
Everything seems to be set right. (Then again, I hope
I am looking at the correct places, i.e. .config files
and using make menuconfig).

Quote:
Try "watch -dn 1 cat /proc/interrupts" and check
that the RTC interrupts
are going up by 1024 per second. This is with
ztdummy running.
This I gotta try. What if it isn't? And worse, what if
it is and I am still getting the choppy playbacks!!
Quote:

What else is going on on this server? Does it have
any virtual machines
on it? Does it have X Windows running? What does
"top" show?

Unfortunately a lot of other processes are running too
on the server, one of them being httpd and other
sundry needed by the client (this inspite of
suggesting him to otherwise).

This is an Asterisk install not done by me, I just
added the zaptel installation and ztdummy module. Was
brazenly confident of things working in a jiffy(does
this count as a pun?), when I stepped in.

cheerz Sad

- Ben.






____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Back to top
stotaro at totarotechn...
Guest





PostPosted: Sat Apr 26, 2008 8:56 am    Post subject: [asterisk-users] Playback / Background / Read choppy, but mu Reply with quote

On Sat, Apr 26, 2008 at 9:14 AM, Benjamin Jacob <ben4asterisk at yahoo.com> wrote:
Quote:
Quote:

OK, I think you need to home in on the differences
between the server(s)
that work fine and the one that doesn't.

As I said in my other mail, the faulty one is a
.. mono processor machine, with SMP turned on
.. running CentOS 5
.. with kernel : 2.6.18-53.1.13.el5
There are other kernels too(2.6.18-8, etc.), will be
trying those kernels too.

The local working machine is :
.. dual processor, with SMP ofcourse
.. running Fedora Core 7, if I remember it correctly.
.. kernel definitely > 2.6.13

Have looked at all parameters, be it the kernel timer
frequency(1000 HZ), enhanced timer support, etc.
Everything seems to be set right. (Then again, I hope
I am looking at the correct places, i.e. .config files
and using make menuconfig).


Quote:
Try "watch -dn 1 cat /proc/interrupts" and check
that the RTC interrupts
are going up by 1024 per second. This is with
ztdummy running.
This I gotta try. What if it isn't? And worse, what if
it is and I am still getting the choppy playbacks!!



Quote:

What else is going on on this server? Does it have
any virtual machines
on it? Does it have X Windows running? What does
"top" show?

Unfortunately a lot of other processes are running too
on the server, one of them being httpd and other
sundry needed by the client (this inspite of
suggesting him to otherwise).

This is an Asterisk install not done by me, I just
added the zaptel installation and ztdummy module. Was
brazenly confident of things working in a jiffy(does
this count as a pun?), when I stepped in.

cheerz Sad


- Ben.

http://www.openvox.com.cn/products_detail.php?genre_id=9&id=28

If you can get the bare card, you can use it for timing with a little
magic that can be found via google. If not, get one with an FXO or
FXS and you will add a little flexibility and have real hardware
timing.

If you continue to have issues, then you can eliminate timing and
focus on processes I would think. I had a client running spamassassin
on their Asterisk box which doubled as their corporate email server,
geewhiz, I wonder why they were "having issues".

Another odd thing Tzafrir helped me to notice was (I don't remember
what version of CentOS) that the time was jumping ahead a couple of
minutes and then back. Running top, you could tell something was up
because it was refreshing way too fast. Then typing date on the
command line repeatedly showed the time jumping all over the place.
Might want to check that out too.

Thanks,
Steve Totaro
Back to top
ben4asterisk at yahoo.com
Guest





PostPosted: Mon Apr 28, 2008 2:18 am    Post subject: [asterisk-users] Playback / Background / Read choppy, but mu Reply with quote

http://www.openvox.com.cn/products_detail.php?genre_id=9&id=28
Quote:

If you can get the bare card, you can use it for
timing with a little
magic that can be found via google. If not, get one
with an FXO or
FXS and you will add a little flexibility and have
real hardware
timing.

If you continue to have issues, then you can
eliminate timing and
focus on processes I would think. I had a client
running spamassassin
on their Asterisk box which doubled as their
corporate email server,
geewhiz, I wonder why they were "having issues".

Another odd thing Tzafrir helped me to notice was (I
don't remember
what version of CentOS) that the time was jumping
ahead a couple of
minutes and then back. Running top, you could tell
something was up
because it was refreshing way too fast. Then typing
date on the
command line repeatedly showed the time jumping all
over the place.
Might want to check that out too.

Thanks,
Steve Totaro


Thanks again guys.
the 'watch -d -n 1 cat /proc/interrupts' showed things
to be ok.. the rtc cycles increasing by 1024+ per
second.

In the process of cleaning up unnecesary processes, I
came across this line :

/usr/sbin/vmware-guestd --background
/var/run/vmware-guestd.pid

GASP!!!! so does this mean this is a virtual machine??
I have got no idea about virtualization yet. So how do
I confirm if this is a virtual machine or not??

And is it advised to run asterisk on a virtual
machine?

- Ben.

____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Back to top
stotaro at totarotechn...
Guest





PostPosted: Mon Apr 28, 2008 7:21 am    Post subject: [asterisk-users] Playback / Background / Read choppy, but mu Reply with quote

On Mon, Apr 28, 2008 at 3:18 AM, Benjamin Jacob <ben4asterisk at yahoo.com> wrote:
Quote:



http://www.openvox.com.cn/products_detail.php?genre_id=9&id=28
Quote:

If you can get the bare card, you can use it for
timing with a little
magic that can be found via google. If not, get one
with an FXO or
FXS and you will add a little flexibility and have
real hardware
timing.

If you continue to have issues, then you can
eliminate timing and
focus on processes I would think. I had a client
running spamassassin
on their Asterisk box which doubled as their
corporate email server,
geewhiz, I wonder why they were "having issues".

Another odd thing Tzafrir helped me to notice was (I
don't remember
what version of CentOS) that the time was jumping
ahead a couple of
minutes and then back. Running top, you could tell
something was up
because it was refreshing way too fast. Then typing
date on the
command line repeatedly showed the time jumping all
over the place.
Might want to check that out too.

Thanks,
Steve Totaro


Thanks again guys.
the 'watch -d -n 1 cat /proc/interrupts' showed things
to be ok.. the rtc cycles increasing by 1024+ per
second.

In the process of cleaning up unnecesary processes, I
came across this line :

/usr/sbin/vmware-guestd --background
/var/run/vmware-guestd.pid

GASP!!!! so does this mean this is a virtual machine??
I have got no idea about virtualization yet. So how do
I confirm if this is a virtual machine or not??

And is it advised to run asterisk on a virtual
machine?



- Ben.

Ben,

Who is providing your server? I assume it is in a colo. Ask them or
see if they mention it in their agreement or sales material. Finally,
you can just ask them. If they claimed a dedicated server, complain.

It seems you are running on a virtual machine and no, that is not advisable.

Thanks,
Steve Totaro
Back to top
ben4asterisk at yahoo.com
Guest





PostPosted: Mon Apr 28, 2008 11:39 am    Post subject: [asterisk-users] Playback / Background / Read choppy, but mu Reply with quote

-
Quote:
Quote:
In the process of cleaning up unnecesary
processes, I
Quote:
came across this line :

/usr/sbin/vmware-guestd --background
/var/run/vmware-guestd.pid

GASP!!!! so does this mean this is a virtual
machine??
Quote:
I have got no idea about virtualization yet. So
how do
Quote:
I confirm if this is a virtual machine or not??

And is it advised to run asterisk on a virtual
machine?



- Ben.

Ben,

Who is providing your server? I assume it is in a
colo. Ask them or
see if they mention it in their agreement or sales
material. Finally,
you can just ask them. If they claimed a dedicated
server, complain.

It seems you are running on a virtual machine and
no, that is not advisable.

Thanks,
Steve Totaro



Steve,
Naa.. it's not co-lo. It's a dedicated server for
sure, but my client wants to make the most out of one
box, it seems.
Talked to the client today and confirmed that it is
indeed a virtual machine. They said they had
previously installed asterisk around a year back on a
virtual machine with no issues. I did not have any
solid convincing response to that. I do understand
about virtualization not being a recommended thing to
do. Now to convince the client.

Also, if I put in a fxo/fxs card, i've read somewhere
that virtual machines won't be able to access the card
n hence the timing provided by it. Is it true?

thanks again Steve and the rest of you.

- Ben.

____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services