Closed GoogleCodeExporter closed 9 years ago
I had this happen and finally I activated the lowest bandwidth G729 codec and
it is MUCH better. Apparently the phone cannot handle the higher quality codecs
at all.
Original comment by tommy.tr...@gmail.com
on 14 Oct 2011 at 5:36
My VoIP provider (VoIP.ms) also accepts GSM so I just chose GSM 8khz and it
seems to work well, too.
Original comment by tommy.tr...@gmail.com
on 14 Oct 2011 at 5:50
Or it can also be a matter of bandwidth available.
If you make a call over networks with low bandwidth using PCMU/PCMA codec it
will necessarily procude very bad results. PCMU/PCMA is 64kbps codec (in fact
uncompressed). There is no loss in audio, it's 8kHz (so not the best quality).
On the other side it requires less CPU processing since no compression.
There is other codecs optimized for bandwidth usage. G729, indeed (8kbps), iLBC
(13kbps), GSM (13kbps) a lot of loss.
There is other codecs that allow higher clock rate (and higher quality), speex
16 and 32kHz, g722 ...
So it really matter depends on your network and its capabilities. It also
depends on what is supported on the other side. Unfortunately, sip providers
often only supports pcmu/pcma (aka g711).
You can play with codec priorities in the two list (low bandwidth and high
bandwidth) in order to adjust which codec should be prefered. However, it
should be done with care cause the application does not always have the last
world on the choice, so sometimes worth to disable all but one you'd like to
force.
The choice of the codec is always complex. Bandwidth/Quality/CPU usage. (On
nexus one CPU usage should not matter so much).
Also, good to know as talking about codecs... CSipSimple nightly build now
support AMR codec (for android 2.3 and upper) which can run at very low bitrate.
Original comment by r3gis...@gmail.com
on 14 Oct 2011 at 5:54
Ok guys, thanks for all your feedback. I'm new to sip/voip so the whole talk
about codec and clock rate as applied to this subject sounds foreign to me. So
help me clear something here: you guys think I should select a clock rate
first, then select a codec that matches the clock rate I chose before? Can a
codec that clocks at a lower rate work with a higher chosen clock rate and
vice-versa?
If any, please direct me to a manual or website where I can read more about
codecs and clock rates; and how to set them to get the best results. I really
want to educate myself on this as this is the only way I make & receive calls
on my data only plan. Thanks in advance.
Original comment by oky...@gmail.com
on 14 Oct 2011 at 7:57
Yes sorry I was not very clear this clock rate stuff.
The first thing to know is that codec clock rate and android audio clock rate
are independant.
Opening the android audio clock rate at higher rate produce sound of better
quality (at least percepted as better), even if codec only support lower clock
rate.
The application adapt the codec clock rate to the audio driver clock rate.
For audio driver clock rate there is a setting in csipsimple about that. It's
set to 16kHz by default on high CPU devices, and to 8kHz on lower. On device
with low CPU (it is not your case), it is better to have the same clock rate
for android audio layer than the one used for the codec. It avoids adaptation
which consume CPU.
So in your case, you can keep 16kHz, it should be fine for all codecs.
Then, there is the codec. The codec is used to send your audio packet through
the network. PCMU/PCMA does not compress packets and work at 8kHz. It results
that it use 64kbps of bandwidth, which is important and not very suitable for
mobile connections.
There is other codecs. All others do compression on voice packets. Sometimes
compression make quality lower. For example GSM codec (the one that is also
used by your phone for GSM calls), is known to be very lossy and produce worse
quality. However, if your bandwidth is low, you can get better results with a
codec that compress a lot and reduce quality than with a codec that does
compress nothing but which packet are not transmitted in time through the
network. Usually in this case, what is observed is what you describe : static,
cuts & choppy.
There is also codecs -such as g722- that compress packet but work at higher
clock rate. It result higher bandwidth usage, but voice quality is better (if
bandwidth is big enough, else it will just be more choppy).
So, what you should do concretely :
1st : check with your SIP provider which codec they support.
2nd : according to this list, choose the one that fit the best your network
bandwidth. (You can give here the list of codecs supported by your provider,
I'll give you advise on the best). Obviously if they only support PCMU/A (aka
G711), there nothing to improve.
3rd : setup csipsimple to prefer this codec among others, and if necessary
force the selected codec to be the only one available.
Original comment by r3gis...@gmail.com
on 15 Oct 2011 at 6:51
Hey Regis,
Thanks for all the education you gave me in your last post/comment. Things make
much more sense to me now.
I contacted sipgate in regards to the recommended and supported codecs. This is
what they wrote back:
"G729 is recommended, if your phone does not support G729, try another codec. A
list of codecs supported by sipgate follows here:
G.729
G.711
iLBC
GSM
G726
Please feel free to try each codec in turn and see which one works best for your
connection."
1. Based on this respond, what do you recommend that I use when
(a) I'm using my mobile data - T-Mobile's HSPA network (USA)
(b) I'm on my home's wifi. Our router is also connected to a Vonage adapter for
our home phone.
2. Is there a way to test to know how much bandwidth my phone is getting in
either case? I have no idea how much bandwidth my phone gets in either case
that's why I ask.
3. Should I turn on QoS in my router settings? I read somewhere that it can
help improve the quality of voip calls on my home network.
4. I plan to upgrade to a faster phone with a faster processor, more memory and
a faster data transfer (T-mobile's theoretical 42 mbps '4G'). It will either be
the Amaze 4G from T-mobile or Samsung Nexus (Nexus Prime) if it comes to
T-Mobile USA and the specs are as good as rumored. My question is, will there
be a significant boost in my setup & sip calls (using csipsimple) with a better
spec'd phone?
Thanks for your time developing this kick ass app and your dedication in
supporting it. I salute you.
Original comment by oky...@gmail.com
on 17 Oct 2011 at 4:35
Ok,
g729 is supported by csipsimple, but it requires a license use for end users
(that I do not provide, since this is just an opensource application). However,
if you get the license by your own (or if you already have another app that
grant this license use on another app you can activate it in codec list).
If you don't want to use this codec cause of its license terms (which I advise,
because I think that it is better to use an opensource codec than something
proprietary, but that's just my point of view).
You can try iLBC as first choice. It is almost equivalent to g729 (quality and
bandwidth). It should be suitable for both wifi and mobile connection.
The only problem is that all sip providers does not support it very well (cause
it requires many CPU). But if your provider has it correctly supported it
should be fine.
If it does not work you can try GSM codec. Voice quality will not be crystal
clear, but should be good enough. This codec is the same used on standard GSM
mobile calls, so it is not so bad ;).
g726 is not supported by csipsimple for now, but its not really suitable for
mobile anyway. And for g711 (aka PCMU/PCMA), I recommand to disable it on
mobile data and depending on wifi connectivity can be suitable for wifi.
About the bandwidth test, you can download for example :
https://market.android.com/details?id=com.ookla.fccbroadband&hl=fr (that's just
the first hit I found while searching, not sure it is the best). The point is
that there is apps that allow to test the connectivity.
About QoS, it depends on network equipments between you and the sip server. It
does not always improve things (sometimes it make things going worse). But it
is indeed interesting to try. In CSipSImple this setting is in expert settings.
So to get the option => Go in settings, press menu key of the phone and select
"Expert mode". Then go in Settings > Network > Check enable QoS.
And for the last point...well, compared to a nexus one, CPU speed increase
should not be significant for voice over IP. The CPU of the nexus one is
already really fair for voice over ip. The point that could help is
connectivity. I never tried with 4G, but if real bandwidth is as good as the
theoretical one, should indeed improve things.
Original comment by r3gis...@gmail.com
on 18 Oct 2011 at 11:29
Thanks very much for your help on this issue. I'm going with the iLBC and GSM
in that order. People that I talk to do not complain about the choppy/static
sound anymore. I do not plan to purchase a license for G.729 but I was
wondering if I already have the license by purchasing the nexus one or an
application on mobile (GrooveIP, maybe?) How can I tell?
Lastly, what does the "Voice Audio Detection" setting do?
Again, thanks for this wonderful application. Some donation will be coming your
way soon.
Original comment by oky...@gmail.com
on 18 Oct 2011 at 3:55
Donation sent.
Original comment by oky...@gmail.com
on 18 Oct 2011 at 4:31
Thx for the donation :).
Voice auto detection feature detects when you do not talk. When it detects that
there is no voice, it does not send packets at all. It allow to reduce
bandwidth used.
Original comment by r3gis...@gmail.com
on 7 Nov 2011 at 12:23
Original issue reported on code.google.com by
oky...@gmail.com
on 11 Oct 2011 at 6:09