Sound issues: strange samplerates?

OK
Oli Kah
Fri, Apr 1, 2016 7:38 PM

Hi there,

I am new to this list and want to say "Hello" to everyone listening :)

My issue using pjsib is rather strange. When calling someone (I tested it using two of my own telephone numbers) I get normal audio first during early call stages and then when the call is finally confirmed the audio rate suddenly is half or so. The voice then sounds monsterish and the remote site is no longer audible via speakers. This happens every time - reproducible!

What I did:

I have successfully compiled pjsua (release build) for Python using Visual Studio 2015 Community linking pjsua to Python 2.6 lib, 32bit running everything on Windows 8.1 Pro 64bit. So far so good.

These values were used for my config_site.h:

#define PJMEDIA_CONF_USE_SWITCH_BOARD 1
#define PJMEDIA_SOUND_BUFFER_COUNT 8
#define PJMEDIA_SND_DEFAULT_REC_LATENCY 50
#define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 50

The attached python code shall define a simple SIPPhone that will be used in my larger scale application. It's unfinished but I ran into these unresolvable audio problems and hope that you might help me. In its current form the SIPPhone is totally useless!

During testing I have been using the onboard audio card of my mainboard with some Bose speakers and a Samson UB-1 USB microphone which is connected to the Windows-PC using an USB 2.0 port. For the "remote" side I use a dedicated VOIP telephone from Grandstream.

The test code in my attached file is then run using Pycharm + Python 2.6 runtimes. For testing you must replace the numbers + credientials by valid values on your side. Also note that you might have to specify another domain (mine here is "fritz.box").

The called Grandstream rings. Taking up the phone then starts the call confirmation which is going unexpectedly slow. It takes quite some time (between roughly 3-10 seconds) before the "confirmed" status is reached although the audio starts working before that. The scenario is running on my LAN where the SIP server (a FritzBox) is also running here. So quite strange why this takes so long?

Right after phone pickup the audio can't be heard at all (me constantly talking after phone pickup!) - in both directions! Then after a short time (1-4 sec) the voice can be heard normally and understandably as expected in both directions. But this only works until the "confirmed" status is reached for the call. When it is reached there is no longer any sound coming from the PC speaker and the voice heard on the Grandstream is monsterish (half sample rate?!). The bidirectional audio is lost and the remaining audio is really bad.

The observed behavior happens every time. Just the timing is different and the time from starting the program to hearing the monsterish voice is between 3 and 10 seconds. It is also rather strange that this time span can be so huge!

What happens here?! In its current form the SIPPhone is pretty unusable. I hope you have ideas how to fix that :) I have experimented with many of the MediaConfig parameters with no success.

Thank you!

Cheers,

Oliver

OK
Oli Kah
Mon, Apr 4, 2016 6:37 PM

Hmmm, no one?

Is there some sort of forum somewhere where to post things like these??

Thank you :)

Cheers,

Oli

Gesendet: Freitag, 01. April 2016 um 21:38 Uhr
Von: "Oli Kah" <mj_fn@web.de>
An: pjsip@lists.pjsip.org
Betreff: Sound issues: strange samplerates?

Hi there,

I am new to this list and want to say "Hello" to everyone listening :)

My issue using pjsib is rather strange. When calling someone (I tested it using two of my own telephone numbers) I get normal audio first during early call stages and then when the call is finally confirmed the audio rate suddenly is half or so. The voice then sounds monsterish and the remote site is no longer audible via speakers. This happens every time - reproducible!

What I did:

I have successfully compiled pjsua (release build) for Python using Visual Studio 2015 Community linking pjsua to Python 2.6 lib, 32bit running everything on Windows 8.1 Pro 64bit. So far so good.

These values were used for my config_site.h:

#define PJMEDIA_CONF_USE_SWITCH_BOARD 1
#define PJMEDIA_SOUND_BUFFER_COUNT 8
#define PJMEDIA_SND_DEFAULT_REC_LATENCY 50
#define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 50

The attached python code shall define a simple SIPPhone that will be used in my larger scale application. It's unfinished but I ran into these unresolvable audio problems and hope that you might help me. In its current form the SIPPhone is totally useless!

During testing I have been using the onboard audio card of my mainboard with some Bose speakers and a Samson UB-1 USB microphone which is connected to the Windows-PC using an USB 2.0 port. For the "remote" side I use a dedicated VOIP telephone from Grandstream.

The test code in my attached file is then run using Pycharm + Python 2.6 runtimes. For testing you must replace the numbers + credientials by valid values on your side. Also note that you might have to specify another domain (mine here is "fritz.box").

The called Grandstream rings. Taking up the phone then starts the call confirmation which is going unexpectedly slow. It takes quite some time (between roughly 3-10 seconds) before the "confirmed" status is reached although the audio starts working before that. The scenario is running on my LAN where the SIP server (a FritzBox) is also running here. So quite strange why this takes so long?

Right after phone pickup the audio can't be heard at all (me constantly talking after phone pickup!) - in both directions! Then after a short time (1-4 sec) the voice can be heard normally and understandably as expected in both directions. But this only works until the "confirmed" status is reached for the call. When it is reached there is no longer any sound coming from the PC speaker and the voice heard on the Grandstream is monsterish (half sample rate?!). The bidirectional audio is lost and the remaining audio is really bad.

The observed behavior happens every time. Just the timing is different and the time from starting the program to hearing the monsterish voice is between 3 and 10 seconds. It is also rather strange that this time span can be so huge!

What happens here?! In its current form the SIPPhone is pretty unusable. I hope you have ideas how to fix that :) I have experimented with many of the MediaConfig parameters with no success.

Thank you!

Cheers,

Oliver

BG
Bill Gardner
Mon, Apr 4, 2016 6:49 PM

Hi Oliver,

I think you should try a completely default configuration, i.e. use an
empty config_site.h file. Your config_site.h params may be causing problems.

Regards,

Bill

On 4/4/2016 2:37 PM, Oli Kah wrote:

Hmmm, no one?
Is there some sort of forum somewhere where to post things like these??
Thank you :)
Cheers,
Oli
Gesendet: Freitag, 01. April 2016 um 21:38 Uhr
Von: "Oli Kah" mj_fn@web.de
An: pjsip@lists.pjsip.org
Betreff: Sound issues: strange samplerates?
Hi there,
I am new to this list and want to say "Hello" to everyone listening :)
My issue using pjsib is rather strange. When calling someone (I tested
it using two of my own telephone numbers) I get normal audio first
during early call stages and then when the call is finally confirmed
the audio rate suddenly is half or so. The voice then sounds
monsterish and the remote site is no longer audible via speakers. This
happens every time - reproducible!
What I did:
I have successfully compiled pjsua (release build) for Python using
Visual Studio 2015 Community linking pjsua to Python 2.6 lib, 32bit
running everything on Windows 8.1 Pro 64bit. So far so good.
These values were used for my config_site.h:
#define PJMEDIA_CONF_USE_SWITCH_BOARD 1
#define PJMEDIA_SOUND_BUFFER_COUNT 8
#define PJMEDIA_SND_DEFAULT_REC_LATENCY 50
#define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 50
The attached python code shall define a simple SIPPhone that will be
used in my larger scale application. It's unfinished but I ran into
these unresolvable audio problems and hope that you might help me. In
its current form the SIPPhone is totally useless!
During testing I have been using the onboard audio card of my
mainboard with some Bose speakers and a Samson UB-1 USB microphone
which is connected to the Windows-PC using an USB 2.0 port. For the
"remote" side I use a dedicated VOIP telephone from Grandstream.
The test code in my attached file is then run using Pycharm + Python
2.6 runtimes. For testing you must replace the numbers + credientials
by valid values on your side. Also note that you might have to specify
another domain (mine here is "fritz.box").
The called Grandstream rings. Taking up the phone then starts the call
confirmation which is going unexpectedly slow. It takes quite some
time (between roughly 3-10 seconds) before the "confirmed" status is
reached although the audio starts working before that. The scenario is
running on my LAN where the SIP server (a FritzBox) is also running
here. So quite strange why this takes so long?
Right after phone pickup the audio can't be heard at all (me
constantly talking after phone pickup!) - in both directions! Then
after a short time (1-4 sec) the voice can be heard normally and
understandably as expected in both directions. But this only works
until the "confirmed" status is reached for the call. When it is
reached there is no longer any sound coming from the PC speaker and
the voice heard on the Grandstream is monsterish (half sample rate?!).
The bidirectional audio is lost and the remaining audio is really bad.
The observed behavior happens every time. Just the timing is different
and the time from starting the program to hearing the monsterish voice
is between 3 and 10 seconds. It is also rather strange that this time
span can be so huge!
What happens here?! In its current form the SIPPhone is pretty
unusable. I hope you have ideas how to fix that :) I have experimented
with many of the MediaConfig parameters with no success.
Thank you!
Cheers,
Oliver


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi Oliver, I think you should try a completely default configuration, i.e. use an empty config_site.h file. Your config_site.h params may be causing problems. Regards, Bill On 4/4/2016 2:37 PM, Oli Kah wrote: > Hmmm, no one? > Is there some sort of forum somewhere where to post things like these?? > Thank you :) > Cheers, > Oli > *Gesendet:* Freitag, 01. April 2016 um 21:38 Uhr > *Von:* "Oli Kah" <mj_fn@web.de> > *An:* pjsip@lists.pjsip.org > *Betreff:* Sound issues: strange samplerates? > Hi there, > I am new to this list and want to say "Hello" to everyone listening :) > My issue using pjsib is rather strange. When calling someone (I tested > it using two of my own telephone numbers) I get normal audio first > during early call stages and then when the call is finally confirmed > the audio rate suddenly is half or so. The voice then sounds > monsterish and the remote site is no longer audible via speakers. This > happens every time - reproducible! > What I did: > I have successfully compiled pjsua (release build) for Python using > Visual Studio 2015 Community linking pjsua to Python 2.6 lib, 32bit > running everything on Windows 8.1 Pro 64bit. So far so good. > These values were used for my config_site.h: > #define PJMEDIA_CONF_USE_SWITCH_BOARD 1 > #define PJMEDIA_SOUND_BUFFER_COUNT 8 > #define PJMEDIA_SND_DEFAULT_REC_LATENCY 50 > #define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 50 > The attached python code shall define a simple SIPPhone that will be > used in my larger scale application. It's unfinished but I ran into > these unresolvable audio problems and hope that you might help me. In > its current form the SIPPhone is totally useless! > During testing I have been using the onboard audio card of my > mainboard with some Bose speakers and a Samson UB-1 USB microphone > which is connected to the Windows-PC using an USB 2.0 port. For the > "remote" side I use a dedicated VOIP telephone from Grandstream. > The test code in my attached file is then run using Pycharm + Python > 2.6 runtimes. For testing you must replace the numbers + credientials > by valid values on your side. Also note that you might have to specify > another domain (mine here is "fritz.box"). > The called Grandstream rings. Taking up the phone then starts the call > confirmation which is going unexpectedly slow. It takes quite some > time (between roughly 3-10 seconds) before the "confirmed" status is > reached although the audio starts working before that. The scenario is > running on my LAN where the SIP server (a FritzBox) is also running > here. So quite strange why this takes so long? > Right after phone pickup the audio can't be heard at all (me > constantly talking after phone pickup!) - in both directions! Then > after a short time (1-4 sec) the voice can be heard normally and > understandably as expected in both directions. But this only works > until the "confirmed" status is reached for the call. When it is > reached there is no longer any sound coming from the PC speaker and > the voice heard on the Grandstream is monsterish (half sample rate?!). > The bidirectional audio is lost and the remaining audio is really bad. > The observed behavior happens every time. Just the timing is different > and the time from starting the program to hearing the monsterish voice > is between 3 and 10 seconds. It is also rather strange that this time > span can be so huge! > What happens here?! In its current form the SIPPhone is pretty > unusable. I hope you have ideas how to fix that :) I have experimented > with many of the MediaConfig parameters with no success. > Thank you! > Cheers, > Oliver > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
OK
Oli Kah
Wed, Apr 6, 2016 8:26 PM

Hi Bill, hi everyone,

thanks for answering but I can confirm that the config_site.h settings are NOT the problem. I have now recompiled the lib with nothing in config_site.h.

The result is exactly the same.

To illustrate what the called person hears I have attached an mp4 which also shows the progress of the Python app in form of PyCharms debug log.

There are important issues that can be seen + heard. Note that I am saying "1-2-3" from the beginning(!) of the video until the very end without ever stopping. Only the receiving side can be heard voice-wise (or not as you will see/hear).

  1. When picking up the phone the sound CANNOT be heard on the receiving side although I am continously saying "1-2-3". It takes roughly 10(!!) seconds before the other side can hear me at all!!

  2. It also takes 10 seconds after pickup before the call confirmation phase is reached. This is extremly slow and totally unexpected.

  3. When the other side finally can hear me I sound like a monster... the sample rate seems to be off - I can't otherwise explain the strange sounding voice!

The Python code of this mini app is attached to this email once more.

I don't think I am doing anything exotic. It does not work as expected though. If I do the same with an app like Phoner (see http://www.phoner.de/download_en.htm) none of these problems occur within the same environment and using the same accounts and phone numbers. So it has to do with pjsip lib somehow.

Any ideas?

Thank you.

Cheers,

Oliver

Gesendet: Montag, 04. April 2016 um 20:49 Uhr
Von: "Bill Gardner" <billg@wavearts.com>
An: pjsip@lists.pjsip.org
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?

Hi Oliver,

I think you should try a completely default configuration, i.e. use an empty config_site.h file. Your config_site.h params may be causing problems.

Regards,

Bill
On 4/4/2016 2:37 PM, Oli Kah wrote:

Hmmm, no one?

Is there some sort of forum somewhere where to post things like these??

Thank you :)

Cheers,

Oli

Gesendet: Freitag, 01. April 2016 um 21:38 Uhr
Von: "Oli Kah" <mj_fn@web.de>
An: pjsip@lists.pjsip.org
Betreff: Sound issues: strange samplerates?

Hi there,

I am new to this list and want to say "Hello" to everyone listening :)

My issue using pjsib is rather strange. When calling someone (I tested it using two of my own telephone numbers) I get normal audio first during early call stages and then when the call is finally confirmed the audio rate suddenly is half or so. The voice then sounds monsterish and the remote site is no longer audible via speakers. This happens every time - reproducible!

What I did:

I have successfully compiled pjsua (release build) for Python using Visual Studio 2015 Community linking pjsua to Python 2.6 lib, 32bit running everything on Windows 8.1 Pro 64bit. So far so good.

These values were used for my config_site.h:

#define PJMEDIA_CONF_USE_SWITCH_BOARD 1
#define PJMEDIA_SOUND_BUFFER_COUNT 8
#define PJMEDIA_SND_DEFAULT_REC_LATENCY 50
#define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 50

The attached python code shall define a simple SIPPhone that will be used in my larger scale application. It's unfinished but I ran into these unresolvable audio problems and hope that you might help me. In its current form the SIPPhone is totally useless!

During testing I have been using the onboard audio card of my mainboard with some Bose speakers and a Samson UB-1 USB microphone which is connected to the Windows-PC using an USB 2.0 port. For the "remote" side I use a dedicated VOIP telephone from Grandstream.

The test code in my attached file is then run using Pycharm + Python 2.6 runtimes. For testing you must replace the numbers + credientials by valid values on your side. Also note that you might have to specify another domain (mine here is "fritz.box").

The called Grandstream rings. Taking up the phone then starts the call confirmation which is going unexpectedly slow. It takes quite some time (between roughly 3-10 seconds) before the "confirmed" status is reached although the audio starts working before that. The scenario is running on my LAN where the SIP server (a FritzBox) is also running here. So quite strange why this takes so long?

Right after phone pickup the audio can't be heard at all (me constantly talking after phone pickup!) - in both directions! Then after a short time (1-4 sec) the voice can be heard normally and understandably as expected in both directions. But this only works until the "confirmed" status is reached for the call. When it is reached there is no longer any sound coming from the PC speaker and the voice heard on the Grandstream is monsterish (half sample rate?!). The bidirectional audio is lost and the remaining audio is really bad.

The observed behavior happens every time. Just the timing is different and the time from starting the program to hearing the monsterish voice is between 3 and 10 seconds. It is also rather strange that this time span can be so huge!

What happens here?! In its current form the SIPPhone is pretty unusable. I hope you have ideas how to fix that :) I have experimented with many of the MediaConfig parameters with no success.

Thank you!

Cheers,

Oliver

_______________________________________________
Visit our blog: <a class="moz-txt-link-freetext" href="http://blog.pjsip.org" target="_blank">http://blog.pjsip.org</a>

pjsip mailing list
<a class="moz-txt-link-abbreviated" href="pjsip@lists.pjsip.org" target="_parent">pjsip@lists.pjsip.org</a>
<a class="moz-txt-link-freetext" href="http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org" target="_blank">http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org</a>

_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

BG
Bill Gardner
Wed, Apr 6, 2016 8:52 PM

Hi Oliver,

Please generate a pjsip logfile (level 4 should suffice) and send, there
may be clues in there.

Bill

On 4/6/2016 4:26 PM, Oli Kah wrote:

Hi Bill, hi everyone,
thanks for answering but I can confirm that the config_site.h settings
are NOT the problem. I have now recompiled the lib with nothing in
config_site.h.
The result is exactly the same.
To illustrate what the called person hears I have attached an mp4
which also shows the progress of the Python app in form of PyCharms
debug log.
There are important issues that can be seen + heard. Note that I am
saying "1-2-3" from the beginning(!) of the video until the very end
without ever stopping. Only the receiving side can be heard voice-wise
(or not as you will see/hear).

  1. When picking up the phone the sound CANNOT be heard on the
    receiving side although I am continously saying "1-2-3". It takes
    roughly 10(!!) seconds before the other side can hear me at all!!
  2. It also takes 10 seconds after pickup before the call confirmation
    phase is reached. This is extremly slow and totally unexpected.
  3. When the other side finally can hear me I sound like a monster...
    the sample rate seems to be off - I can't otherwise explain the
    strange sounding voice!
    The Python code of this mini app is attached to this email once more.
    I don't think I am doing anything exotic. It does not work as expected
    though. If I do the same with an app like Phoner (see
    http://www.phoner.de/download_en.htm) none of these problems occur
    within the same environment and using the same accounts and phone
    numbers. So it has to do with pjsip lib somehow.
    Any ideas?
    Thank you.
    Cheers,
    Oliver
    Gesendet: Montag, 04. April 2016 um 20:49 Uhr
    Von: "Bill Gardner" billg@wavearts.com
    An: pjsip@lists.pjsip.org
    Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?
    Hi Oliver,

I think you should try a completely default configuration, i.e. use an
empty config_site.h file. Your config_site.h params may be causing
problems.

Regards,

Bill
On 4/4/2016 2:37 PM, Oli Kah wrote:

 Hmmm, no one?
 Is there some sort of forum somewhere where to post things like
 these??
 Thank you :)
 Cheers,
 Oli
 *Gesendet:* Freitag, 01. April 2016 um 21:38 Uhr
 *Von:* "Oli Kah" <mj_fn@web.de>
 *An:* pjsip@lists.pjsip.org
 *Betreff:* Sound issues: strange samplerates?
 Hi there,
 I am new to this list and want to say "Hello" to everyone listening :)
 My issue using pjsib is rather strange. When calling someone (I
 tested it using two of my own telephone numbers) I get normal
 audio first during early call stages and then when the call is
 finally confirmed the audio rate suddenly is half or so. The voice
 then sounds monsterish and the remote site is no longer audible
 via speakers. This happens every time - reproducible!
 What I did:
 I have successfully compiled pjsua (release build) for Python
 using Visual Studio 2015 Community linking pjsua to Python 2.6
 lib, 32bit running everything on Windows 8.1 Pro 64bit. So far so
 good.
 These values were used for my config_site.h:
 #define PJMEDIA_CONF_USE_SWITCH_BOARD 1
 #define PJMEDIA_SOUND_BUFFER_COUNT 8
 #define PJMEDIA_SND_DEFAULT_REC_LATENCY 50
 #define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 50
 The attached python code shall define a simple SIPPhone that will
 be used in my larger scale application. It's unfinished but I ran
 into these unresolvable audio problems and hope that you might
 help me. In its current form the SIPPhone is totally useless!
 During testing I have been using the onboard audio card of my
 mainboard with some Bose speakers and a Samson UB-1 USB microphone
 which is connected to the Windows-PC using an USB 2.0 port. For
 the "remote" side I use a dedicated VOIP telephone from Grandstream.
 The test code in my attached file is then run using Pycharm +
 Python 2.6 runtimes. For testing you must replace the numbers +
 credientials by valid values on your side. Also note that you
 might have to specify another domain (mine here is "fritz.box").
 The called Grandstream rings. Taking up the phone then starts the
 call confirmation which is going unexpectedly slow. It takes quite
 some time (between roughly 3-10 seconds) before the "confirmed"
 status is reached although the audio starts working before that.
 The scenario is running on my LAN where the SIP server (a
 FritzBox) is also running here. So quite strange why this takes so
 long?
 Right after phone pickup the audio can't be heard at all (me
 constantly talking after phone pickup!) - in both directions! Then
 after a short time (1-4 sec) the voice can be heard normally and
 understandably as expected in both directions. But this only works
 until the "confirmed" status is reached for the call. When it is
 reached there is no longer any sound coming from the PC speaker
 and the voice heard on the Grandstream is monsterish (half sample
 rate?!). The bidirectional audio is lost and the remaining audio
 is really bad.
 The observed behavior happens every time. Just the timing is
 different and the time from starting the program to hearing the
 monsterish voice is between 3 and 10 seconds. It is also rather
 strange that this time span can be so huge!
 What happens here?! In its current form the SIPPhone is pretty
 unusable. I hope you have ideas how to fix that :) I have
 experimented with many of the MediaConfig parameters with no success.
 Thank you!
 Cheers,
 Oliver

 _______________________________________________
 Visit our blog:http://blog.pjsip.org

 pjsip mailing list
 pjsip@lists.pjsip.org
 http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

_______________________________________________ Visit our blog:
http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi Oliver, Please generate a pjsip logfile (level 4 should suffice) and send, there may be clues in there. Bill On 4/6/2016 4:26 PM, Oli Kah wrote: > Hi Bill, hi everyone, > thanks for answering but I can confirm that the config_site.h settings > are NOT the problem. I have now recompiled the lib with nothing in > config_site.h. > The result is exactly the same. > To illustrate what the called person hears I have attached an mp4 > which also shows the progress of the Python app in form of PyCharms > debug log. > There are important issues that can be seen + heard. Note that I am > saying "1-2-3" from the beginning(!) of the video until the very end > without ever stopping. Only the receiving side can be heard voice-wise > (or not as you will see/hear). > 1) When picking up the phone the sound CANNOT be heard on the > receiving side although I am continously saying "1-2-3". It takes > roughly 10(!!) seconds before the other side can hear me at all!! > 2) It also takes 10 seconds after pickup before the call confirmation > phase is reached. This is extremly slow and totally unexpected. > 3) When the other side finally can hear me I sound like a monster... > the sample rate seems to be off - I can't otherwise explain the > strange sounding voice! > The Python code of this mini app is attached to this email once more. > I don't think I am doing anything exotic. It does not work as expected > though. If I do the same with an app like Phoner (see > http://www.phoner.de/download_en.htm) none of these problems occur > within the same environment and using the same accounts and phone > numbers. So it has to do with pjsip lib somehow. > Any ideas? > Thank you. > Cheers, > Oliver > *Gesendet:* Montag, 04. April 2016 um 20:49 Uhr > *Von:* "Bill Gardner" <billg@wavearts.com> > *An:* pjsip@lists.pjsip.org > *Betreff:* Re: [pjsip] Fw: Sound issues: strange samplerates? > Hi Oliver, > > I think you should try a completely default configuration, i.e. use an > empty config_site.h file. Your config_site.h params may be causing > problems. > > Regards, > > Bill > On 4/4/2016 2:37 PM, Oli Kah wrote: > > Hmmm, no one? > Is there some sort of forum somewhere where to post things like > these?? > Thank you :) > Cheers, > Oli > *Gesendet:* Freitag, 01. April 2016 um 21:38 Uhr > *Von:* "Oli Kah" <mj_fn@web.de> > *An:* pjsip@lists.pjsip.org > *Betreff:* Sound issues: strange samplerates? > Hi there, > I am new to this list and want to say "Hello" to everyone listening :) > My issue using pjsib is rather strange. When calling someone (I > tested it using two of my own telephone numbers) I get normal > audio first during early call stages and then when the call is > finally confirmed the audio rate suddenly is half or so. The voice > then sounds monsterish and the remote site is no longer audible > via speakers. This happens every time - reproducible! > What I did: > I have successfully compiled pjsua (release build) for Python > using Visual Studio 2015 Community linking pjsua to Python 2.6 > lib, 32bit running everything on Windows 8.1 Pro 64bit. So far so > good. > These values were used for my config_site.h: > #define PJMEDIA_CONF_USE_SWITCH_BOARD 1 > #define PJMEDIA_SOUND_BUFFER_COUNT 8 > #define PJMEDIA_SND_DEFAULT_REC_LATENCY 50 > #define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 50 > The attached python code shall define a simple SIPPhone that will > be used in my larger scale application. It's unfinished but I ran > into these unresolvable audio problems and hope that you might > help me. In its current form the SIPPhone is totally useless! > During testing I have been using the onboard audio card of my > mainboard with some Bose speakers and a Samson UB-1 USB microphone > which is connected to the Windows-PC using an USB 2.0 port. For > the "remote" side I use a dedicated VOIP telephone from Grandstream. > The test code in my attached file is then run using Pycharm + > Python 2.6 runtimes. For testing you must replace the numbers + > credientials by valid values on your side. Also note that you > might have to specify another domain (mine here is "fritz.box"). > The called Grandstream rings. Taking up the phone then starts the > call confirmation which is going unexpectedly slow. It takes quite > some time (between roughly 3-10 seconds) before the "confirmed" > status is reached although the audio starts working before that. > The scenario is running on my LAN where the SIP server (a > FritzBox) is also running here. So quite strange why this takes so > long? > Right after phone pickup the audio can't be heard at all (me > constantly talking after phone pickup!) - in both directions! Then > after a short time (1-4 sec) the voice can be heard normally and > understandably as expected in both directions. But this only works > until the "confirmed" status is reached for the call. When it is > reached there is no longer any sound coming from the PC speaker > and the voice heard on the Grandstream is monsterish (half sample > rate?!). The bidirectional audio is lost and the remaining audio > is really bad. > The observed behavior happens every time. Just the timing is > different and the time from starting the program to hearing the > monsterish voice is between 3 and 10 seconds. It is also rather > strange that this time span can be so huge! > What happens here?! In its current form the SIPPhone is pretty > unusable. I hope you have ideas how to fix that :) I have > experimented with many of the MediaConfig parameters with no success. > Thank you! > Cheers, > Oliver > > _______________________________________________ > Visit our blog:http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > _______________________________________________ Visit our blog: > http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
OK
Oli Kah
Wed, Apr 6, 2016 11:13 PM

Hi Bill,

thanks for answering so promptly =)

I have created the log and yes, there seem to be lots of suspicious lines like "strm003CAB04 Bad RTP pt 0 (expecting 9)" but the rest of the log does not tell me that much and looks mostly as expected?!

The three major problems currently for me are:

  • it takes much too long to really establish a call (10 seconds are not normal)

  • the sound received by the callee sounds strange, as if the sample rate is wrong

  • the callee is NOT heard at all on the caller's side!

Do you see what issues are there in the log that might explain this behavior? And what needs to be done to fix that?

Thank you so much!

Cheers,

Oliver

Gesendet: Mittwoch, 06. April 2016 um 22:52 Uhr
Von: "Bill Gardner" <billg@wavearts.com>
An: "pjsip list" <pjsip@lists.pjsip.org>
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?

Hi Oliver,

Please generate a pjsip logfile (level 4 should suffice) and send, there may be clues in there.

Bill
On 4/6/2016 4:26 PM, Oli Kah wrote:

Hi Bill, hi everyone,

thanks for answering but I can confirm that the config_site.h settings are NOT the problem. I have now recompiled the lib with nothing in config_site.h.

The result is exactly the same.

To illustrate what the called person hears I have attached an mp4 which also shows the progress of the Python app in form of PyCharms debug log.

There are important issues that can be seen + heard. Note that I am saying "1-2-3" from the beginning(!) of the video until the very end without ever stopping. Only the receiving side can be heard voice-wise (or not as you will see/hear).

  1. When picking up the phone the sound CANNOT be heard on the receiving side although I am continously saying "1-2-3". It takes roughly 10(!!) seconds before the other side can hear me at all!!

  2. It also takes 10 seconds after pickup before the call confirmation phase is reached. This is extremly slow and totally unexpected.

  3. When the other side finally can hear me I sound like a monster... the sample rate seems to be off - I can't otherwise explain the strange sounding voice!

The Python code of this mini app is attached to this email once more.

I don't think I am doing anything exotic. It does not work as expected though. If I do the same with an app like Phoner (see http://www.phoner.de/download_en.htm) none of these problems occur within the same environment and using the same accounts and phone numbers. So it has to do with pjsip lib somehow.

Any ideas?

Thank you.

Cheers,

Oliver

Gesendet: Montag, 04. April 2016 um 20:49 Uhr
Von: "Bill Gardner" <billg@wavearts.com>
An: pjsip@lists.pjsip.org
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?

Hi Oliver,

I think you should try a completely default configuration, i.e. use an empty config_site.h file. Your config_site.h params may be causing problems.

Regards,

Bill
On 4/4/2016 2:37 PM, Oli Kah wrote:

Hmmm, no one?

Is there some sort of forum somewhere where to post things like these??

Thank you :)

Cheers,

Oli

Gesendet: Freitag, 01. April 2016 um 21:38 Uhr
Von: "Oli Kah" <mj_fn@web.de>
An: <a class="moz-txt-link-abbreviated">pjsip@lists.pjsip.org</a>
Betreff: Sound issues: strange samplerates?

Hi there,

I am new to this list and want to say "Hello" to everyone listening :)

My issue using pjsib is rather strange. When calling someone (I tested it using two of my own telephone numbers) I get normal audio first during early call stages and then when the call is finally confirmed the audio rate suddenly is half or so. The voice then sounds monsterish and the remote site is no longer audible via speakers. This happens every time - reproducible!

What I did:

I have successfully compiled pjsua (release build) for Python using Visual Studio 2015 Community linking pjsua to Python 2.6 lib, 32bit running everything on Windows 8.1 Pro 64bit. So far so good.

These values were used for my config_site.h:

#define PJMEDIA_CONF_USE_SWITCH_BOARD 1
#define PJMEDIA_SOUND_BUFFER_COUNT 8
#define PJMEDIA_SND_DEFAULT_REC_LATENCY 50
#define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 50

The attached python code shall define a simple SIPPhone that will be used in my larger scale application. It's unfinished but I ran into these unresolvable audio problems and hope that you might help me. In its current form the SIPPhone is totally useless!

During testing I have been using the onboard audio card of my mainboard with some Bose speakers and a Samson UB-1 USB microphone which is connected to the Windows-PC using an USB 2.0 port. For the "remote" side I use a dedicated VOIP telephone from Grandstream.

The test code in my attached file is then run using Pycharm + Python 2.6 runtimes. For testing you must replace the numbers + credientials by valid values on your side. Also note that you might have to specify another domain (mine here is "fritz.box").

The called Grandstream rings. Taking up the phone then starts the call confirmation which is going unexpectedly slow. It takes quite some time (between roughly 3-10 seconds) before the "confirmed" status is reached although the audio starts working before that. The scenario is running on my LAN where the SIP server (a FritzBox) is also running here. So quite strange why this takes so long?

Right after phone pickup the audio can't be heard at all (me constantly talking after phone pickup!) - in both directions! Then after a short time (1-4 sec) the voice can be heard normally and understandably as expected in both directions. But this only works until the "confirmed" status is reached for the call. When it is reached there is no longer any sound coming from the PC speaker and the voice heard on the Grandstream is monsterish (half sample rate?!). The bidirectional audio is lost and the remaining audio is really bad.

The observed behavior happens every time. Just the timing is different and the time from starting the program to hearing the monsterish voice is between 3 and 10 seconds. It is also rather strange that this time span can be so huge!

What happens here?! In its current form the SIPPhone is pretty unusable. I hope you have ideas how to fix that :) I have experimented with many of the MediaConfig parameters with no success.

Thank you!

Cheers,

Oliver

_______________________________________________
Visit our blog: <a class="moz-txt-link-freetext" href="http://blog.pjsip.org" target="_blank">http://blog.pjsip.org</a>

pjsip mailing list
<a class="moz-txt-link-abbreviated">pjsip@lists.pjsip.org</a>
<a class="moz-txt-link-freetext" href="http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org" target="_blank">http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org</a>

_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

_______________________________________________
Visit our blog: <a class="moz-txt-link-freetext" href="http://blog.pjsip.org" target="_blank">http://blog.pjsip.org</a>

pjsip mailing list
<a class="moz-txt-link-abbreviated" href="pjsip@lists.pjsip.org" target="_parent">pjsip@lists.pjsip.org</a>
<a class="moz-txt-link-freetext" href="http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org" target="_blank">http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org</a>

_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

AA
Andreas Ahland
Thu, Apr 7, 2016 9:14 AM

HI Oliver,

I remember we had issues with the FritzBox as well as ours did not send the media type which was negotiated in advance. This was clearly a fault in the FritxBox. We got our setup working by using G711a only, i.E. disable G722 and G711u.

Mit freundlichen Grüßen

Dr.-Ing.
Andreas Ahland
CTO
Technischer Leiter
Telefon : +49 251 6183-196
Telefax : +49 251 6183-197

Von: pjsip [mailto:pjsip-bounces@lists.pjsip.org] Im Auftrag von Oli Kah
Gesendet: Donnerstag, 7. April 2016 01:13
An: pjsip@lists.pjsip.org
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?

Hi Bill,

thanks for answering so promptly =)
I have created the log and yes, there seem to be lots of suspicious lines like "strm003CAB04  Bad RTP pt 0 (expecting 9)" but the rest of the log does not tell me that much and looks mostly as expected?!

The three major problems currently for me are:

  • it takes much too long to really establish a call (10 seconds are not normal)
  • the sound received by the callee sounds strange, as if the sample rate is wrong
  • the callee is NOT heard at all on the caller's side!

Do you see what issues are there in the log that might explain this behavior? And what needs to be done to fix that?

Thank you so much!

Cheers,
Oliver

Gesendet: Mittwoch, 06. April 2016 um 22:52 Uhr
Von: "Bill Gardner" <billg@wavearts.commailto:billg@wavearts.com>
An: "pjsip list" <pjsip@lists.pjsip.orgmailto:pjsip@lists.pjsip.org>
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?
Hi Oliver,

Please generate a pjsip logfile (level 4 should suffice) and send, there may be clues in there.

Bill

On 4/6/2016 4:26 PM, Oli Kah wrote:
Hi Bill, hi everyone,

thanks for answering but I can confirm that the config_site.h settings are NOT the problem. I have now recompiled the lib with nothing in config_site.h.
The result is exactly the same.

To illustrate what the called person hears I have attached an mp4 which also shows the progress of the Python app in form of PyCharms debug log.

There are important issues that can be seen + heard. Note that I am saying "1-2-3" from the beginning(!) of the video until the very end without ever stopping. Only the receiving side can be heard voice-wise (or not as you will see/hear).

  1. When picking up the phone the sound CANNOT be heard on the receiving side although I am continously saying "1-2-3". It takes roughly 10(!!) seconds before the other side can hear me at all!!
  2. It also takes 10 seconds after pickup before the call confirmation phase is reached. This is extremly slow and totally unexpected.
  3. When the other side finally can hear me I sound like a monster... the sample rate seems to be off - I can't otherwise explain the strange sounding voice!

The Python code of this mini app is attached to this email once more.

I don't think I am doing anything exotic. It does not work as expected though. If I do the same with an app like Phoner (see http://www.phoner.de/download_en.htm) none of these problems occur within the same environment and using the same accounts and phone numbers. So it has to do with pjsip lib somehow.

Any ideas?

Thank you.

Cheers,
Oliver

Gesendet: Montag, 04. April 2016 um 20:49 Uhr
Von: "Bill Gardner" billg@wavearts.combillg@wavearts.com
An: pjsip@lists.pjsip.org
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?
Hi Oliver,

I think you should try a completely default configuration, i.e. use an empty config_site.h file. Your config_site.h params may be causing problems.

Regards,

Bill

On 4/4/2016 2:37 PM, Oli Kah wrote:
Hmmm, no one?

Is there some sort of forum somewhere where to post things like these??

Thank you :)

Cheers,
Oli

Gesendet: Freitag, 01. April 2016 um 21:38 Uhr
Von: "Oli Kah" mj_fn@web.demj_fn@web.de
An: pjsip@lists.pjsip.orgmailto:pjsip@lists.pjsip.org
Betreff: Sound issues: strange samplerates?
Hi there,

I am new to this list and want to say "Hello" to everyone listening :)

My issue using pjsib is rather strange. When calling someone (I tested it using two of my own telephone numbers) I get normal audio first during early call stages and then when the call is finally confirmed the audio rate suddenly is half or so. The voice then sounds monsterish and the remote site is no longer audible via speakers. This happens every time - reproducible!

What I did:

I have successfully compiled pjsua (release build) for Python using Visual Studio 2015 Community linking pjsua to Python 2.6 lib, 32bit running everything on Windows 8.1 Pro 64bit. So far so good.
These values were used for my config_site.h:

#define PJMEDIA_CONF_USE_SWITCH_BOARD 1
#define PJMEDIA_SOUND_BUFFER_COUNT 8
#define PJMEDIA_SND_DEFAULT_REC_LATENCY 50
#define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 50

The attached python code shall define a simple SIPPhone that will be used in my larger scale application. It's unfinished but I ran into these unresolvable audio problems and hope that you might help me. In its current form the SIPPhone is totally useless!

During testing I have been using the onboard audio card of my mainboard with some Bose speakers and a Samson UB-1 USB microphone which is connected to the Windows-PC using an USB 2.0 port. For the "remote" side I use a dedicated VOIP telephone from Grandstream.

The test code in my attached file is then run using Pycharm + Python 2.6 runtimes. For testing you must replace the numbers + credientials by valid values on your side. Also note that you might have to specify another domain (mine here is "fritz.box").

The called Grandstream rings. Taking up the phone then starts the call confirmation which is going unexpectedly slow. It takes quite some time (between roughly 3-10 seconds) before the "confirmed" status is reached although the audio starts working before that. The scenario is running on my LAN where the SIP server (a FritzBox) is also running here. So quite strange why this takes so long?
Right after phone pickup the audio can't be heard at all (me constantly talking after phone pickup!) - in both directions! Then after a short time (1-4 sec) the voice can be heard normally and understandably as expected in both directions. But this only works until the "confirmed" status is reached for the call. When it is reached there is no longer any sound coming from the PC speaker and the voice heard on the Grandstream is monsterish (half sample rate?!). The bidirectional audio is lost and the remaining audio is really bad.

The observed behavior happens every time. Just the timing is different and the time from starting the program to hearing the monsterish voice is between 3 and 10 seconds. It is also rather strange that this time span can be so huge!

What happens here?! In its current form the SIPPhone is pretty unusable. I hope you have ideas how to fix that :) I have experimented with many of the MediaConfig parameters with no success.

Thank you!

Cheers,
Oliver


Visit our blog: http://blog.pjsip.org

pjsip mailing list

pjsip@lists.pjsip.orgmailto:pjsip@lists.pjsip.org

http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


Visit our blog: http://blog.pjsip.org

pjsip mailing list

pjsip@lists.pjsip.org

http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.orgmailto:pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


SELECTRIC Nachrichten-Systeme GmbH
Haferlandweg 18
48155 Muenster

Internet:
www.selectric.de


Sitz der Gesellschaft (Company Premises): Muenster | Registergericht (Register Court): Amtsgericht Muenster | HRB-Nr. 1264
Geschaeftsfuehrer (General Managers): Michael Heussner, Hendrik Pieper

HI Oliver, I remember we had issues with the FritzBox as well as ours did not send the media type which was negotiated in advance. This was clearly a fault in the FritxBox. We got our setup working by using G711a only, i.E. disable G722 and G711u. Mit freundlichen Grüßen Dr.-Ing. Andreas Ahland CTO Technischer Leiter Telefon : +49 251 6183-196 Telefax : +49 251 6183-197 Von: pjsip [mailto:pjsip-bounces@lists.pjsip.org] Im Auftrag von Oli Kah Gesendet: Donnerstag, 7. April 2016 01:13 An: pjsip@lists.pjsip.org Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates? Hi Bill, thanks for answering so promptly =) I have created the log and yes, there seem to be lots of suspicious lines like "strm003CAB04 Bad RTP pt 0 (expecting 9)" but the rest of the log does not tell me that much and looks mostly as expected?! The three major problems currently for me are: - it takes much too long to really establish a call (10 seconds are not normal) - the sound received by the callee sounds strange, as if the sample rate is wrong - the callee is NOT heard at all on the caller's side! Do you see what issues are there in the log that might explain this behavior? And what needs to be done to fix that? Thank you so much! Cheers, Oliver Gesendet: Mittwoch, 06. April 2016 um 22:52 Uhr Von: "Bill Gardner" <billg@wavearts.com<mailto:billg@wavearts.com>> An: "pjsip list" <pjsip@lists.pjsip.org<mailto:pjsip@lists.pjsip.org>> Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates? Hi Oliver, Please generate a pjsip logfile (level 4 should suffice) and send, there may be clues in there. Bill On 4/6/2016 4:26 PM, Oli Kah wrote: Hi Bill, hi everyone, thanks for answering but I can confirm that the config_site.h settings are NOT the problem. I have now recompiled the lib with nothing in config_site.h. The result is exactly the same. To illustrate what the called person hears I have attached an mp4 which also shows the progress of the Python app in form of PyCharms debug log. There are important issues that can be seen + heard. Note that I am saying "1-2-3" from the beginning(!) of the video until the very end without ever stopping. Only the receiving side can be heard voice-wise (or not as you will see/hear). 1) When picking up the phone the sound CANNOT be heard on the receiving side although I am continously saying "1-2-3". It takes roughly 10(!!) seconds before the other side can hear me at all!! 2) It also takes 10 seconds after pickup before the call confirmation phase is reached. This is extremly slow and totally unexpected. 3) When the other side finally can hear me I sound like a monster... the sample rate seems to be off - I can't otherwise explain the strange sounding voice! The Python code of this mini app is attached to this email once more. I don't think I am doing anything exotic. It does not work as expected though. If I do the same with an app like Phoner (see http://www.phoner.de/download_en.htm) none of these problems occur within the same environment and using the same accounts and phone numbers. So it has to do with pjsip lib somehow. Any ideas? Thank you. Cheers, Oliver Gesendet: Montag, 04. April 2016 um 20:49 Uhr Von: "Bill Gardner" <billg@wavearts.com><billg@wavearts.com> An: pjsip@lists.pjsip.org Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates? Hi Oliver, I think you should try a completely default configuration, i.e. use an empty config_site.h file. Your config_site.h params may be causing problems. Regards, Bill On 4/4/2016 2:37 PM, Oli Kah wrote: Hmmm, no one? Is there some sort of forum somewhere where to post things like these?? Thank you :) Cheers, Oli Gesendet: Freitag, 01. April 2016 um 21:38 Uhr Von: "Oli Kah" <mj_fn@web.de><mj_fn@web.de> An: pjsip@lists.pjsip.org<mailto:pjsip@lists.pjsip.org> Betreff: Sound issues: strange samplerates? Hi there, I am new to this list and want to say "Hello" to everyone listening :) My issue using pjsib is rather strange. When calling someone (I tested it using two of my own telephone numbers) I get normal audio first during early call stages and then when the call is finally confirmed the audio rate suddenly is half or so. The voice then sounds monsterish and the remote site is no longer audible via speakers. This happens every time - reproducible! What I did: I have successfully compiled pjsua (release build) for Python using Visual Studio 2015 Community linking pjsua to Python 2.6 lib, 32bit running everything on Windows 8.1 Pro 64bit. So far so good. These values were used for my config_site.h: #define PJMEDIA_CONF_USE_SWITCH_BOARD 1 #define PJMEDIA_SOUND_BUFFER_COUNT 8 #define PJMEDIA_SND_DEFAULT_REC_LATENCY 50 #define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 50 The attached python code shall define a simple SIPPhone that will be used in my larger scale application. It's unfinished but I ran into these unresolvable audio problems and hope that you might help me. In its current form the SIPPhone is totally useless! During testing I have been using the onboard audio card of my mainboard with some Bose speakers and a Samson UB-1 USB microphone which is connected to the Windows-PC using an USB 2.0 port. For the "remote" side I use a dedicated VOIP telephone from Grandstream. The test code in my attached file is then run using Pycharm + Python 2.6 runtimes. For testing you must replace the numbers + credientials by valid values on your side. Also note that you might have to specify another domain (mine here is "fritz.box"). The called Grandstream rings. Taking up the phone then starts the call confirmation which is going unexpectedly slow. It takes quite some time (between roughly 3-10 seconds) before the "confirmed" status is reached although the audio starts working before that. The scenario is running on my LAN where the SIP server (a FritzBox) is also running here. So quite strange why this takes so long? Right after phone pickup the audio can't be heard at all (me constantly talking after phone pickup!) - in both directions! Then after a short time (1-4 sec) the voice can be heard normally and understandably as expected in both directions. But this only works until the "confirmed" status is reached for the call. When it is reached there is no longer any sound coming from the PC speaker and the voice heard on the Grandstream is monsterish (half sample rate?!). The bidirectional audio is lost and the remaining audio is really bad. The observed behavior happens every time. Just the timing is different and the time from starting the program to hearing the monsterish voice is between 3 and 10 seconds. It is also rather strange that this time span can be so huge! What happens here?! In its current form the SIPPhone is pretty unusable. I hope you have ideas how to fix that :) I have experimented with many of the MediaConfig parameters with no success. Thank you! Cheers, Oliver _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org<mailto:pjsip@lists.pjsip.org> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org<mailto:pjsip@lists.pjsip.org> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org __________________________________________________________________________________ SELECTRIC Nachrichten-Systeme GmbH Haferlandweg 18 48155 Muenster Internet: www.selectric.de --- Sitz der Gesellschaft (Company Premises): Muenster | Registergericht (Register Court): Amtsgericht Muenster | HRB-Nr. 1264 Geschaeftsfuehrer (General Managers): Michael Heussner, Hendrik Pieper
AT
Alain Totouom
Thu, Apr 7, 2016 10:00 AM

Hi Oliver,

the callee (Fr!tzBox) did alter the supported codec list (offer/answer)
between his provisional (183/INVITE/cseq=6911) and his final response
(200/INVITE/cseq=6911) and did decline the callers request
(UPDATE/cseq=6912) to use the previously negotiated one (G722).
A more robust solution in a case like this, would i.E. imply caching the
answer-codec-list and updating the offer-codec-list for subsequent calls
to the same endpoint…

00:58:12.143  pjsua_core.c  .......TX 1276 bytes Request msg
INVITE/cseq=6911 (tdta003BBA90) to UDP 192.168.1.1:5060:
[..]
m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 9 96
[..]

00:58:12.347  pjsua_core.c  .RX 755 bytes Response msg
183/INVITE/cseq=6911 (rdata003392C4) from UDP 192.168.1.1:5060:
[..]
m=audio 7086 RTP/AVP 9 0 8 96
[..]

00:58:12.347  pjsua_media.c  ......Audio updated, stream #0: G722 (sendrecv)
00:58:34.052  pjsua_core.c  .RX 1001 bytes Response msg
200/INVITE/cseq=6911 (rdata003392C4) from UDP 192.168.1.1:5060:
[..]
m=audio 7086 RTP/AVP 0 8 96
[..]

00:58:34.104  pjsua_core.c  ....TX 815 bytes Request msg
UPDATE/cseq=6912 (tdta003D31C8) to UDP 192.168.1.1:5060:
[..]
m=audio 4000 RTP/AVP 9 96
[..]

00:58:34.155  pjsua_core.c !.RX 353 bytes Response msg
488/UPDATE/cseq=6912 (rdata003392C4) from UDP 192.168.1.1:5060:

Cheers,
Alain

On 07/04/16 11:14, Andreas Ahland wrote:

HI Oliver,

I remember we had issues with the FritzBox as well as ours did not send the media type which was negotiated in advance. This was clearly a fault in the FritxBox. We got our setup working by using G711a only, i.E. disable G722 and G711u.

Mit freundlichen Grüßen

Dr.-Ing.
Andreas Ahland
CTO
Technischer Leiter
Telefon : +49 251 6183-196
Telefax : +49 251 6183-197

Von: pjsip [mailto:pjsip-bounces@lists.pjsip.org] Im Auftrag von Oli Kah
Gesendet: Donnerstag, 7. April 2016 01:13
An: pjsip@lists.pjsip.org
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?

Hi Bill,

thanks for answering so promptly =)
I have created the log and yes, there seem to be lots of suspicious lines like "strm003CAB04  Bad RTP pt 0 (expecting 9)" but the rest of the log does not tell me that much and looks mostly as expected?!

The three major problems currently for me are:

  • it takes much too long to really establish a call (10 seconds are not normal)
  • the sound received by the callee sounds strange, as if the sample rate is wrong
  • the callee is NOT heard at all on the caller's side!

Do you see what issues are there in the log that might explain this behavior? And what needs to be done to fix that?

Thank you so much!

Cheers,
Oliver

Gesendet: Mittwoch, 06. April 2016 um 22:52 Uhr
Von: "Bill Gardner" <billg@wavearts.commailto:billg@wavearts.com>
An: "pjsip list" <pjsip@lists.pjsip.orgmailto:pjsip@lists.pjsip.org>
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?
Hi Oliver,

Please generate a pjsip logfile (level 4 should suffice) and send, there may be clues in there.

Bill

On 4/6/2016 4:26 PM, Oli Kah wrote:
Hi Bill, hi everyone,

thanks for answering but I can confirm that the config_site.h settings are NOT the problem. I have now recompiled the lib with nothing in config_site.h.
The result is exactly the same.

To illustrate what the called person hears I have attached an mp4 which also shows the progress of the Python app in form of PyCharms debug log.

There are important issues that can be seen + heard. Note that I am saying "1-2-3" from the beginning(!) of the video until the very end without ever stopping. Only the receiving side can be heard voice-wise (or not as you will see/hear).

  1. When picking up the phone the sound CANNOT be heard on the receiving side although I am continously saying "1-2-3". It takes roughly 10(!!) seconds before the other side can hear me at all!!
  2. It also takes 10 seconds after pickup before the call confirmation phase is reached. This is extremly slow and totally unexpected.
  3. When the other side finally can hear me I sound like a monster... the sample rate seems to be off - I can't otherwise explain the strange sounding voice!

The Python code of this mini app is attached to this email once more.

I don't think I am doing anything exotic. It does not work as expected though. If I do the same with an app like Phoner (see http://www.phoner.de/download_en.htm) none of these problems occur within the same environment and using the same accounts and phone numbers. So it has to do with pjsip lib somehow.

Any ideas?

Thank you.

Cheers,
Oliver

Gesendet: Montag, 04. April 2016 um 20:49 Uhr
Von: "Bill Gardner" billg@wavearts.combillg@wavearts.com
An: pjsip@lists.pjsip.org
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?
Hi Oliver,

I think you should try a completely default configuration, i.e. use an empty config_site.h file. Your config_site.h params may be causing problems.

Regards,

Bill

On 4/4/2016 2:37 PM, Oli Kah wrote:
Hmmm, no one?

Is there some sort of forum somewhere where to post things like these??

Thank you :)

Cheers,
Oli

Gesendet: Freitag, 01. April 2016 um 21:38 Uhr
Von: "Oli Kah" mj_fn@web.demj_fn@web.de
An: pjsip@lists.pjsip.orgmailto:pjsip@lists.pjsip.org
Betreff: Sound issues: strange samplerates?
Hi there,

I am new to this list and want to say "Hello" to everyone listening :)

My issue using pjsib is rather strange. When calling someone (I tested it using two of my own telephone numbers) I get normal audio first during early call stages and then when the call is finally confirmed the audio rate suddenly is half or so. The voice then sounds monsterish and the remote site is no longer audible via speakers. This happens every time - reproducible!

What I did:

I have successfully compiled pjsua (release build) for Python using Visual Studio 2015 Community linking pjsua to Python 2.6 lib, 32bit running everything on Windows 8.1 Pro 64bit. So far so good.
These values were used for my config_site.h:

#define PJMEDIA_CONF_USE_SWITCH_BOARD 1
#define PJMEDIA_SOUND_BUFFER_COUNT 8
#define PJMEDIA_SND_DEFAULT_REC_LATENCY 50
#define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 50

The attached python code shall define a simple SIPPhone that will be used in my larger scale application. It's unfinished but I ran into these unresolvable audio problems and hope that you might help me. In its current form the SIPPhone is totally useless!

During testing I have been using the onboard audio card of my mainboard with some Bose speakers and a Samson UB-1 USB microphone which is connected to the Windows-PC using an USB 2.0 port. For the "remote" side I use a dedicated VOIP telephone from Grandstream.

The test code in my attached file is then run using Pycharm + Python 2.6 runtimes. For testing you must replace the numbers + credientials by valid values on your side. Also note that you might have to specify another domain (mine here is "fritz.box").

The called Grandstream rings. Taking up the phone then starts the call confirmation which is going unexpectedly slow. It takes quite some time (between roughly 3-10 seconds) before the "confirmed" status is reached although the audio starts working before that. The scenario is running on my LAN where the SIP server (a FritzBox) is also running here. So quite strange why this takes so long?
Right after phone pickup the audio can't be heard at all (me constantly talking after phone pickup!) - in both directions! Then after a short time (1-4 sec) the voice can be heard normally and understandably as expected in both directions. But this only works until the "confirmed" status is reached for the call. When it is reached there is no longer any sound coming from the PC speaker and the voice heard on the Grandstream is monsterish (half sample rate?!). The bidirectional audio is lost and the remaining audio is really bad.

The observed behavior happens every time. Just the timing is different and the time from starting the program to hearing the monsterish voice is between 3 and 10 seconds. It is also rather strange that this time span can be so huge!

What happens here?! In its current form the SIPPhone is pretty unusable. I hope you have ideas how to fix that :) I have experimented with many of the MediaConfig parameters with no success.

Thank you!

Cheers,
Oliver


Visit our blog: http://blog.pjsip.org

pjsip mailing list

pjsip@lists.pjsip.orgmailto:pjsip@lists.pjsip.org

http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


Visit our blog: http://blog.pjsip.org

pjsip mailing list

pjsip@lists.pjsip.org

http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.orgmailto:pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


SELECTRIC Nachrichten-Systeme GmbH
Haferlandweg 18
48155 Muenster

Internet:
www.selectric.de


Sitz der Gesellschaft (Company Premises): Muenster | Registergericht (Register Court): Amtsgericht Muenster | HRB-Nr. 1264
Geschaeftsfuehrer (General Managers): Michael Heussner, Hendrik Pieper


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

--
1024D/A9F85A52      2000-01-18      Alain Totouom totouom@gmx.de
PGP Fingerprint DA18 0DF2 FBD2 5F67 0656 452D E3A2 7531 A9F8 5A52

Hi Oliver, the callee (Fr!tzBox) did alter the supported codec list (offer/answer) between his provisional (183/INVITE/cseq=6911) and his final response (200/INVITE/cseq=6911) and did decline the callers request (UPDATE/cseq=6912) to use the previously negotiated one (G722). A more robust solution in a case like this, would i.E. imply caching the answer-codec-list and updating the offer-codec-list for subsequent calls to the same endpoint… 00:58:12.143 pjsua_core.c .......TX 1276 bytes Request msg INVITE/cseq=6911 (tdta003BBA90) to UDP 192.168.1.1:5060: [..] m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 9 96 [..] 00:58:12.347 pjsua_core.c .RX 755 bytes Response msg 183/INVITE/cseq=6911 (rdata003392C4) from UDP 192.168.1.1:5060: [..] m=audio 7086 RTP/AVP 9 0 8 96 [..] 00:58:12.347 pjsua_media.c ......Audio updated, stream #0: G722 (sendrecv) 00:58:34.052 pjsua_core.c .RX 1001 bytes Response msg 200/INVITE/cseq=6911 (rdata003392C4) from UDP 192.168.1.1:5060: [..] m=audio 7086 RTP/AVP 0 8 96 [..] 00:58:34.104 pjsua_core.c ....TX 815 bytes Request msg UPDATE/cseq=6912 (tdta003D31C8) to UDP 192.168.1.1:5060: [..] m=audio 4000 RTP/AVP 9 96 [..] 00:58:34.155 pjsua_core.c !.RX 353 bytes Response msg 488/UPDATE/cseq=6912 (rdata003392C4) from UDP 192.168.1.1:5060: Cheers, Alain On 07/04/16 11:14, Andreas Ahland wrote: > HI Oliver, > > I remember we had issues with the FritzBox as well as ours did not send the media type which was negotiated in advance. This was clearly a fault in the FritxBox. We got our setup working by using G711a only, i.E. disable G722 and G711u. > > Mit freundlichen Grüßen > > Dr.-Ing. > Andreas Ahland > CTO > Technischer Leiter > Telefon : +49 251 6183-196 > Telefax : +49 251 6183-197 > > > > > Von: pjsip [mailto:pjsip-bounces@lists.pjsip.org] Im Auftrag von Oli Kah > Gesendet: Donnerstag, 7. April 2016 01:13 > An: pjsip@lists.pjsip.org > Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates? > > Hi Bill, > > thanks for answering so promptly =) > I have created the log and yes, there seem to be lots of suspicious lines like "strm003CAB04 Bad RTP pt 0 (expecting 9)" but the rest of the log does not tell me that much and looks mostly as expected?! > > The three major problems currently for me are: > - it takes much too long to really establish a call (10 seconds are not normal) > - the sound received by the callee sounds strange, as if the sample rate is wrong > - the callee is NOT heard at all on the caller's side! > > Do you see what issues are there in the log that might explain this behavior? And what needs to be done to fix that? > > Thank you so much! > > Cheers, > Oliver > > Gesendet: Mittwoch, 06. April 2016 um 22:52 Uhr > Von: "Bill Gardner" <billg@wavearts.com<mailto:billg@wavearts.com>> > An: "pjsip list" <pjsip@lists.pjsip.org<mailto:pjsip@lists.pjsip.org>> > Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates? > Hi Oliver, > > Please generate a pjsip logfile (level 4 should suffice) and send, there may be clues in there. > > Bill > > On 4/6/2016 4:26 PM, Oli Kah wrote: > Hi Bill, hi everyone, > > thanks for answering but I can confirm that the config_site.h settings are NOT the problem. I have now recompiled the lib with nothing in config_site.h. > The result is exactly the same. > > To illustrate what the called person hears I have attached an mp4 which also shows the progress of the Python app in form of PyCharms debug log. > > There are important issues that can be seen + heard. Note that I am saying "1-2-3" from the beginning(!) of the video until the very end without ever stopping. Only the receiving side can be heard voice-wise (or not as you will see/hear). > > 1) When picking up the phone the sound CANNOT be heard on the receiving side although I am continously saying "1-2-3". It takes roughly 10(!!) seconds before the other side can hear me at all!! > 2) It also takes 10 seconds after pickup before the call confirmation phase is reached. This is extremly slow and totally unexpected. > 3) When the other side finally can hear me I sound like a monster... the sample rate seems to be off - I can't otherwise explain the strange sounding voice! > > The Python code of this mini app is attached to this email once more. > > I don't think I am doing anything exotic. It does not work as expected though. If I do the same with an app like Phoner (see http://www.phoner.de/download_en.htm) none of these problems occur within the same environment and using the same accounts and phone numbers. So it has to do with pjsip lib somehow. > > Any ideas? > > Thank you. > > Cheers, > Oliver > > Gesendet: Montag, 04. April 2016 um 20:49 Uhr > Von: "Bill Gardner" <billg@wavearts.com><billg@wavearts.com> > An: pjsip@lists.pjsip.org > Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates? > Hi Oliver, > > I think you should try a completely default configuration, i.e. use an empty config_site.h file. Your config_site.h params may be causing problems. > > Regards, > > Bill > > On 4/4/2016 2:37 PM, Oli Kah wrote: > Hmmm, no one? > > Is there some sort of forum somewhere where to post things like these?? > > Thank you :) > > Cheers, > Oli > > Gesendet: Freitag, 01. April 2016 um 21:38 Uhr > Von: "Oli Kah" <mj_fn@web.de><mj_fn@web.de> > An: pjsip@lists.pjsip.org<mailto:pjsip@lists.pjsip.org> > Betreff: Sound issues: strange samplerates? > Hi there, > > > I am new to this list and want to say "Hello" to everyone listening :) > > My issue using pjsib is rather strange. When calling someone (I tested it using two of my own telephone numbers) I get normal audio first during early call stages and then when the call is finally confirmed the audio rate suddenly is half or so. The voice then sounds monsterish and the remote site is no longer audible via speakers. This happens every time - reproducible! > > What I did: > > I have successfully compiled pjsua (release build) for Python using Visual Studio 2015 Community linking pjsua to Python 2.6 lib, 32bit running everything on Windows 8.1 Pro 64bit. So far so good. > These values were used for my config_site.h: > > #define PJMEDIA_CONF_USE_SWITCH_BOARD 1 > #define PJMEDIA_SOUND_BUFFER_COUNT 8 > #define PJMEDIA_SND_DEFAULT_REC_LATENCY 50 > #define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 50 > > The attached python code shall define a simple SIPPhone that will be used in my larger scale application. It's unfinished but I ran into these unresolvable audio problems and hope that you might help me. In its current form the SIPPhone is totally useless! > > During testing I have been using the onboard audio card of my mainboard with some Bose speakers and a Samson UB-1 USB microphone which is connected to the Windows-PC using an USB 2.0 port. For the "remote" side I use a dedicated VOIP telephone from Grandstream. > > The test code in my attached file is then run using Pycharm + Python 2.6 runtimes. For testing you must replace the numbers + credientials by valid values on your side. Also note that you might have to specify another domain (mine here is "fritz.box"). > > The called Grandstream rings. Taking up the phone then starts the call confirmation which is going unexpectedly slow. It takes quite some time (between roughly 3-10 seconds) before the "confirmed" status is reached although the audio starts working before that. The scenario is running on my LAN where the SIP server (a FritzBox) is also running here. So quite strange why this takes so long? > Right after phone pickup the audio can't be heard at all (me constantly talking after phone pickup!) - in both directions! Then after a short time (1-4 sec) the voice can be heard normally and understandably as expected in both directions. But this only works until the "confirmed" status is reached for the call. When it is reached there is no longer any sound coming from the PC speaker and the voice heard on the Grandstream is monsterish (half sample rate?!). The bidirectional audio is lost and the remaining audio is really bad. > > The observed behavior happens every time. Just the timing is different and the time from starting the program to hearing the monsterish voice is between 3 and 10 seconds. It is also rather strange that this time span can be so huge! > > > What happens here?! In its current form the SIPPhone is pretty unusable. I hope you have ideas how to fix that :) I have experimented with many of the MediaConfig parameters with no success. > > > Thank you! > > Cheers, > Oliver > > > > _______________________________________________ > > Visit our blog: http://blog.pjsip.org > > > > pjsip mailing list > > pjsip@lists.pjsip.org<mailto:pjsip@lists.pjsip.org> > > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > _______________________________________________ > > Visit our blog: http://blog.pjsip.org > > > > pjsip mailing list > > pjsip@lists.pjsip.org > > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org<mailto:pjsip@lists.pjsip.org> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > __________________________________________________________________________________ > SELECTRIC Nachrichten-Systeme GmbH > Haferlandweg 18 > 48155 Muenster > > Internet: > www.selectric.de > > --- > Sitz der Gesellschaft (Company Premises): Muenster | Registergericht (Register Court): Amtsgericht Muenster | HRB-Nr. 1264 > Geschaeftsfuehrer (General Managers): Michael Heussner, Hendrik Pieper > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > -- > 1024D/A9F85A52 2000-01-18 Alain Totouom <totouom@gmx.de> > PGP Fingerprint DA18 0DF2 FBD2 5F67 0656 452D E3A2 7531 A9F8 5A52
OK
Oli Kah
Thu, Apr 7, 2016 2:39 PM

Hi Andreas,

sounds like the way that I should go, too. Thanks for answering :)

Is there a way so that I can totally get rid of all non G711a codecs? I am currently looking at ways to not even compile them into the Python bound library (_pjsua.pyd).

config_site.h seems like the correct choice for something like this but I am rather unfamiliar with the defines that would be involved in removing these codecs.

E.g. I found PJMEDIA_HAS_G711_CODEC which I could set to '1' or '0' to enable or disable it but how would I distinguish G711a from G711u then?

Is there any documentation how to enable or diable specific codecs anywhere?

Thanks again!

Cheers,

Oliver

Gesendet: Donnerstag, 07. April 2016 um 11:14 Uhr
Von: "Andreas Ahland" <Andreas.Ahland@selectric.de>
An: "pjsip list" <pjsip@lists.pjsip.org>
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?

HI Oliver,

I remember we had issues with the FritzBox as well as ours did not send the media type which was negotiated in advance. This was clearly a fault in the FritxBox. We got our setup working by using G711a only, i.E. disable G722 and G711u.

Mit freundlichen Grüßen

Dr.-Ing.
Andreas Ahland
CTO
Technischer Leiter

Telefon : +49 251 6183-196
Telefax : +49 251 6183-197

Von: pjsip [mailto:pjsip-bounces@lists.pjsip.org] Im Auftrag von Oli Kah
Gesendet: Donnerstag, 7. April 2016 01:13
An: pjsip@lists.pjsip.org
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?

Hi Bill,

thanks for answering so promptly =)

I have created the log and yes, there seem to be lots of suspicious lines like "strm003CAB04 Bad RTP pt 0 (expecting 9)" but the rest of the log does not tell me that much and looks mostly as expected?!

The three major problems currently for me are:

- it takes much too long to really establish a call (10 seconds are not normal)

- the sound received by the callee sounds strange, as if the sample rate is wrong

- the callee is NOT heard at all on the caller's side!

Do you see what issues are there in the log that might explain this behavior? And what needs to be done to fix that?

Thank you so much!

Cheers,

Oliver

Gesendet: Mittwoch, 06. April 2016 um 22:52 Uhr
Von: "Bill Gardner" <billg@wavearts.com>
An: "pjsip list" <pjsip@lists.pjsip.org>
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?

Hi Oliver,

Please generate a pjsip logfile (level 4 should suffice) and send, there may be clues in there.

Bill

On 4/6/2016 4:26 PM, Oli Kah wrote:

Hi Bill, hi everyone,

thanks for answering but I can confirm that the config_site.h settings are NOT the problem. I have now recompiled the lib with nothing in config_site.h.

The result is exactly the same.

To illustrate what the called person hears I have attached an mp4 which also shows the progress of the Python app in form of PyCharms debug log.

There are important issues that can be seen + heard. Note that I am saying "1-2-3" from the beginning(!) of the video until the very end without ever stopping. Only the receiving side can be heard voice-wise (or not as you will see/hear).

1) When picking up the phone the sound CANNOT be heard on the receiving side although I am continously saying "1-2-3". It takes roughly 10(!!) seconds before the other side can hear me at all!!

2) It also takes 10 seconds after pickup before the call confirmation phase is reached. This is extremly slow and totally unexpected.

3) When the other side finally can hear me I sound like a monster... the sample rate seems to be off - I can't otherwise explain the strange sounding voice!

The Python code of this mini app is attached to this email once more.

I don't think I am doing anything exotic. It does not work as expected though. If I do the same with an app like Phoner (see http://www.phoner.de/download_en.htm) none of these problems occur within the same environment and using the same accounts and phone numbers. So it has to do with pjsip lib somehow.

Any ideas?

Thank you.

Cheers,

Oliver

Gesendet: Montag, 04. April 2016 um 20:49 Uhr
Von: "Bill Gardner" <a><billg@wavearts.com></a>
An: <a>pjsip@lists.pjsip.org</a>
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?

Hi Oliver,

I think you should try a completely default configuration, i.e. use an empty config_site.h file. Your config_site.h params may be causing problems.

Regards,

Bill

On 4/4/2016 2:37 PM, Oli Kah wrote:

Hmmm, no one?

Is there some sort of forum somewhere where to post things like these??

Thank you :)

Cheers,

Oli

Gesendet: Freitag, 01. April 2016 um 21:38 Uhr
Von: "Oli Kah" <a><mj_fn@web.de></a>
An: pjsip@lists.pjsip.org
Betreff: Sound issues: strange samplerates?

Hi there,

I am new to this list and want to say "Hello" to everyone listening :)

My issue using pjsib is rather strange. When calling someone (I tested it using two of my own telephone numbers) I get normal audio first during early call stages and then when the call is finally confirmed the audio rate suddenly is half or so. The voice then sounds monsterish and the remote site is no longer audible via speakers. This happens every time - reproducible!

What I did:

I have successfully compiled pjsua (release build) for Python using Visual Studio 2015 Community linking pjsua to Python 2.6 lib, 32bit running everything on Windows 8.1 Pro 64bit. So far so good.

These values were used for my config_site.h:

#define PJMEDIA_CONF_USE_SWITCH_BOARD 1
#define PJMEDIA_SOUND_BUFFER_COUNT 8
#define PJMEDIA_SND_DEFAULT_REC_LATENCY 50
#define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 50

The attached python code shall define a simple SIPPhone that will be used in my larger scale application. It's unfinished but I ran into these unresolvable audio problems and hope that you might help me. In its current form the SIPPhone is totally useless!

During testing I have been using the onboard audio card of my mainboard with some Bose speakers and a Samson UB-1 USB microphone which is connected to the Windows-PC using an USB 2.0 port. For the "remote" side I use a dedicated VOIP telephone from Grandstream.

The test code in my attached file is then run using Pycharm + Python 2.6 runtimes. For testing you must replace the numbers + credientials by valid values on your side. Also note that you might have to specify another domain (mine here is "fritz.box").

The called Grandstream rings. Taking up the phone then starts the call confirmation which is going unexpectedly slow. It takes quite some time (between roughly 3-10 seconds) before the "confirmed" status is reached although the audio starts working before that. The scenario is running on my LAN where the SIP server (a FritzBox) is also running here. So quite strange why this takes so long?

Right after phone pickup the audio can't be heard at all (me constantly talking after phone pickup!) - in both directions! Then after a short time (1-4 sec) the voice can be heard normally and understandably as expected in both directions. But this only works until the "confirmed" status is reached for the call. When it is reached there is no longer any sound coming from the PC speaker and the voice heard on the Grandstream is monsterish (half sample rate?!). The bidirectional audio is lost and the remaining audio is really bad.

The observed behavior happens every time. Just the timing is different and the time from starting the program to hearing the monsterish voice is between 3 and 10 seconds. It is also rather strange that this time span can be so huge!

What happens here?! In its current form the SIPPhone is pretty unusable. I hope you have ideas how to fix that :) I have experimented with many of the MediaConfig parameters with no success.

Thank you!

Cheers,

Oliver

<pre style="background: white;">_______________________________________________
<pre style="background: white;">Visit our blog: <a href="http://blog.pjsip.org" target="_blank">http://blog.pjsip.org</a>
<pre style="background: white;"> 
<pre style="background: white;">pjsip mailing list
<pre style="background: white;"><a href="pjsip@lists.pjsip.org" target="_parent">pjsip@lists.pjsip.org</a>
<pre style="background: white;"><a href="http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org" target="_blank">http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org</a>

_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list <a> pjsip@lists.pjsip.org</a> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

<pre style="background: white;">_______________________________________________
<pre style="background: white;">Visit our blog: <a href="http://blog.pjsip.org" target="_blank">http://blog.pjsip.org</a>
<pre style="background: white;"> 
<pre style="background: white;">pjsip mailing list
<pre style="background: white;"><a>pjsip@lists.pjsip.org</a>
<pre style="background: white;"><a href="http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org" target="_blank">http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org</a>

_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

__________________________________________________________________________________
SELECTRIC Nachrichten-Systeme GmbH
Haferlandweg 18
48155 Muenster

Internet:
www.selectric.de


Sitz der Gesellschaft (Company Premises): Muenster | Registergericht (Register Court): Amtsgericht Muenster | HRB-Nr. 1264
Geschaeftsfuehrer (General Managers): Michael Heussner, Hendrik Pieper _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

OK
Oli Kah
Thu, Apr 7, 2016 2:41 PM

Hi Alain,

thank you for answering :) Yes it seems that my VOIP router performs things it should not do.

Currently I am looking for ways to ONLY include one specific codec: G711a.

But I don't know which defines should be set in config_site.h to achieve this.

Cheers,

Oliver

Gesendet: Donnerstag, 07. April 2016 um 12:00 Uhr
Von: "Alain Totouom" <alain.totouom@gmx.de>
An: "pjsip list" <pjsip@lists.pjsip.org>
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?

Hi Oliver,

the callee (Fr!tzBox) did alter the supported codec list (offer/answer) between his provisional (183/INVITE/cseq=6911) and his final response (200/INVITE/cseq=6911) and did decline the callers request (UPDATE/cseq=6912) to use the previously negotiated one (G722).
A more robust solution in a case like this, would i.E. imply caching the answer-codec-list and updating the offer-codec-list for subsequent calls to the same endpoint…

00:58:12.143 pjsua_core.c .......TX 1276 bytes Request msg INVITE/cseq=6911 (tdta003BBA90) to UDP 192.168.1.1:5060:
[..]
m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 9 96
[..]

00:58:12.347 pjsua_core.c .RX 755 bytes Response msg 183/INVITE/cseq=6911 (rdata003392C4) from UDP 192.168.1.1:5060:
[..]
m=audio 7086 RTP/AVP 9 0 8 96
[..]

00:58:12.347 pjsua_media.c ......Audio updated, stream #0: G722 (sendrecv)
00:58:34.052 pjsua_core.c .RX 1001 bytes Response msg 200/INVITE/cseq=6911 (rdata003392C4) from UDP 192.168.1.1:5060:
[..]
m=audio 7086 RTP/AVP 0 8 96
[..]

00:58:34.104 pjsua_core.c ....TX 815 bytes Request msg UPDATE/cseq=6912 (tdta003D31C8) to UDP 192.168.1.1:5060:
[..]
m=audio 4000 RTP/AVP 9 96
[..]

00:58:34.155 pjsua_core.c !.RX 353 bytes Response msg 488/UPDATE/cseq=6912 (rdata003392C4) from UDP 192.168.1.1:5060:

Cheers,
Alain
On 07/04/16 11:14, Andreas Ahland wrote:

HI Oliver,

I remember we had issues with the FritzBox as well as ours did not send the media type which was negotiated in advance. This was clearly a fault in the FritxBox. We got our setup working by using G711a only, i.E. disable G722 and G711u.

Mit freundlichen Grüßen

Dr.-Ing.
Andreas Ahland
CTO
Technischer Leiter
Telefon : +49 251 6183-196
Telefax : +49 251 6183-197




Von: pjsip [<a class="moz-txt-link-freetext" href="pjsip-bounces@lists.pjsip.org" target="_parent">mailto:pjsip-bounces@lists.pjsip.org</a>] Im Auftrag von Oli Kah
Gesendet: Donnerstag, 7. April 2016 01:13
An: <a class="moz-txt-link-abbreviated" href="pjsip@lists.pjsip.org" target="_parent">pjsip@lists.pjsip.org</a>
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?

Hi Bill,

thanks for answering so promptly =)
I have created the log and yes, there seem to be lots of suspicious lines like "strm003CAB04  Bad RTP pt 0 (expecting 9)" but the rest of the log does not tell me that much and looks mostly as expected?!

The three major problems currently for me are:
- it takes much too long to really establish a call (10 seconds are not normal)
- the sound received by the callee sounds strange, as if the sample rate is wrong
- the callee is NOT heard at all on the caller's side!

Do you see what issues are there in the log that might explain this behavior? And what needs to be done to fix that?

Thank you so much!

Cheers,
Oliver

Gesendet: Mittwoch, 06. April 2016 um 22:52 Uhr
Von: "Bill Gardner" <<a class="moz-txt-link-abbreviated" href="billg@wavearts.com" target="_parent">billg@wavearts.com</a><a class="moz-txt-link-rfc2396E" href="billg@wavearts.com" target="_parent"><mailto:billg@wavearts.com></a>>
An: "pjsip list" <<a class="moz-txt-link-abbreviated" href="pjsip@lists.pjsip.org" target="_parent">pjsip@lists.pjsip.org</a><a class="moz-txt-link-rfc2396E" href="pjsip@lists.pjsip.org" target="_parent"><mailto:pjsip@lists.pjsip.org></a>>
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?
Hi Oliver,

Please generate a pjsip logfile (level 4 should suffice) and send, there may be clues in there.

Bill

On 4/6/2016 4:26 PM, Oli Kah wrote:
Hi Bill, hi everyone,

thanks for answering but I can confirm that the config_site.h settings are NOT the problem. I have now recompiled the lib with nothing in config_site.h.
The result is exactly the same.

To illustrate what the called person hears I have attached an mp4 which also shows the progress of the Python app in form of PyCharms debug log.

There are important issues that can be seen + heard. Note that I am saying "1-2-3" from the beginning(!) of the video until the very end without ever stopping. Only the receiving side can be heard voice-wise (or not as you will see/hear).

1) When picking up the phone the sound CANNOT be heard on the receiving side although I am continously saying "1-2-3". It takes roughly 10(!!) seconds before the other side can hear me at all!!
2) It also takes 10 seconds after pickup before the call confirmation phase is reached. This is extremly slow and totally unexpected.
3) When the other side finally can hear me I sound like a monster... the sample rate seems to be off - I can't otherwise explain the strange sounding voice!

The Python code of this mini app is attached to this email once more.

I don't think I am doing anything exotic. It does not work as expected though. If I do the same with an app like Phoner (see <a class="moz-txt-link-freetext" href="http://www.phoner.de/download_en.htm" target="_blank">http://www.phoner.de/download_en.htm</a>) none of these problems occur within the same environment and using the same accounts and phone numbers. So it has to do with pjsip lib somehow.

Any ideas?

Thank you.

Cheers,
Oliver

Gesendet: Montag, 04. April 2016 um 20:49 Uhr
Von: "Bill Gardner" <a class="moz-txt-link-rfc2396E" href="billg@wavearts.com" target="_parent"><billg@wavearts.com></a><a class="moz-txt-link-rfc2396E" href="billg@wavearts.com" target="_parent"><billg@wavearts.com></a>
An: <a class="moz-txt-link-abbreviated" href="pjsip@lists.pjsip.org" target="_parent">pjsip@lists.pjsip.org</a>
Betreff: Re: [pjsip] Fw: Sound issues: strange samplerates?
Hi Oliver,

I think you should try a completely default configuration, i.e. use an empty config_site.h file. Your config_site.h params may be causing problems.

Regards,

Bill

On 4/4/2016 2:37 PM, Oli Kah wrote:
Hmmm, no one?

Is there some sort of forum somewhere where to post things like these??

Thank you :)

Cheers,
Oli

Gesendet: Freitag, 01. April 2016 um 21:38 Uhr
Von: "Oli Kah" <a class="moz-txt-link-rfc2396E" href="mj_fn@web.de" target="_parent"><mj_fn@web.de></a><a class="moz-txt-link-rfc2396E" href="mj_fn@web.de" target="_parent"><mj_fn@web.de></a>
An: <a class="moz-txt-link-abbreviated" href="pjsip@lists.pjsip.org" target="_parent">pjsip@lists.pjsip.org</a><a class="moz-txt-link-rfc2396E" href="pjsip@lists.pjsip.org" target="_parent"><mailto:pjsip@lists.pjsip.org></a>
Betreff: Sound issues: strange samplerates?
Hi there,


I am new to this list and want to say "Hello" to everyone listening :)

My issue using pjsib is rather strange. When calling someone (I tested it using two of my own telephone numbers) I get normal audio first during early call stages and then when the call is finally confirmed the audio rate suddenly is half or so. The voice then sounds monsterish and the remote site is no longer audible via speakers. This happens every time - reproducible!

What I did:

I have successfully compiled pjsua (release build) for Python using Visual Studio 2015 Community linking pjsua to Python 2.6 lib, 32bit running everything on Windows 8.1 Pro 64bit. So far so good.
These values were used for my config_site.h:

#define PJMEDIA_CONF_USE_SWITCH_BOARD 1
#define PJMEDIA_SOUND_BUFFER_COUNT 8
#define PJMEDIA_SND_DEFAULT_REC_LATENCY 50
#define PJMEDIA_SND_DEFAULT_PLAY_LATENCY 50

The attached python code shall define a simple SIPPhone that will be used in my larger scale application. It's unfinished but I ran into these unresolvable audio problems and hope that you might help me. In its current form the SIPPhone is totally useless!

During testing I have been using the onboard audio card of my mainboard with some Bose speakers and a Samson UB-1 USB microphone which is connected to the Windows-PC using an USB 2.0 port. For the "remote" side I use a dedicated VOIP telephone from Grandstream.

The test code in my attached file is then run using Pycharm + Python 2.6 runtimes. For testing you must replace the numbers + credientials by valid values on your side. Also note that you might have to specify another domain (mine here is "fritz.box").

The called Grandstream rings. Taking up the phone then starts the call confirmation which is going unexpectedly slow. It takes quite some time (between roughly 3-10 seconds) before the "confirmed" status is reached although the audio starts working before that. The scenario is running on my LAN where the SIP server (a FritzBox) is also running here. So quite strange why this takes so long?
Right after phone pickup the audio can't be heard at all (me constantly talking after phone pickup!) - in both directions! Then after a short time (1-4 sec) the voice can be heard normally and understandably as expected in both directions. But this only works until the "confirmed" status is reached for the call. When it is reached there is no longer any sound coming from the PC speaker and the voice heard on the Grandstream is monsterish (half sample rate?!). The bidirectional audio is lost and the remaining audio is really bad.

The observed behavior happens every time. Just the timing is different and the time from starting the program to hearing the monsterish voice is between 3 and 10 seconds. It is also rather strange that this time span can be so huge!


What happens here?! In its current form the SIPPhone is pretty unusable. I hope you have ideas how to fix that :) I have experimented with many of the MediaConfig parameters with no success.


Thank you!

Cheers,
Oliver



_______________________________________________

Visit our blog: <a class="moz-txt-link-freetext" href="http://blog.pjsip.org" target="_blank">http://blog.pjsip.org</a>



pjsip mailing list

<a class="moz-txt-link-abbreviated" href="pjsip@lists.pjsip.org" target="_parent">pjsip@lists.pjsip.org</a><a class="moz-txt-link-rfc2396E" href="pjsip@lists.pjsip.org" target="_parent"><mailto:pjsip@lists.pjsip.org></a>

<a class="moz-txt-link-freetext" href="http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org" target="_blank">http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org</a>

_______________________________________________ Visit our blog: <a class="moz-txt-link-freetext" href="http://blog.pjsip.org" target="_blank">http://blog.pjsip.org</a> pjsip mailing list <a class="moz-txt-link-abbreviated" href="pjsip@lists.pjsip.org" target="_parent">pjsip@lists.pjsip.org</a> <a class="moz-txt-link-freetext" href="http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org" target="_blank">http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org</a>


_______________________________________________

Visit our blog: <a class="moz-txt-link-freetext" href="http://blog.pjsip.org" target="_blank">http://blog.pjsip.org</a>



pjsip mailing list

<a class="moz-txt-link-abbreviated" href="pjsip@lists.pjsip.org" target="_parent">pjsip@lists.pjsip.org</a>

<a class="moz-txt-link-freetext" href="http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org" target="_blank">http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org</a>

_______________________________________________ Visit our blog: <a class="moz-txt-link-freetext" href="http://blog.pjsip.org" target="_blank">http://blog.pjsip.org</a> pjsip mailing list <a class="moz-txt-link-abbreviated" href="pjsip@lists.pjsip.org" target="_parent">pjsip@lists.pjsip.org</a><a class="moz-txt-link-rfc2396E" href="pjsip@lists.pjsip.org" target="_parent"><mailto:pjsip@lists.pjsip.org></a> <a class="moz-txt-link-freetext" href="http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org" target="_blank">http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org</a>
__________________________________________________________________________________
SELECTRIC Nachrichten-Systeme GmbH
Haferlandweg 18
48155 Muenster

Internet:
<a class="moz-txt-link-abbreviated" href="http://www.selectric.de" target="_blank">www.selectric.de</a>

---
Sitz der Gesellschaft (Company Premises): Muenster | Registergericht (Register Court): Amtsgericht Muenster | HRB-Nr. 1264
Geschaeftsfuehrer (General Managers): Michael Heussner, Hendrik Pieper
_______________________________________________
Visit our blog: <a class="moz-txt-link-freetext" href="http://blog.pjsip.org" target="_blank">http://blog.pjsip.org</a>

pjsip mailing list
<a class="moz-txt-link-abbreviated" href="pjsip@lists.pjsip.org" target="_parent">pjsip@lists.pjsip.org</a>
<a class="moz-txt-link-freetext" href="http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org" target="_blank">http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org</a>
<pre class="moz-signature">-- 
1024D/A9F85A52      2000-01-18      Alain Totouom <a class="moz-txt-link-rfc2396E" href="totouom@gmx.de" target="_parent"><totouom@gmx.de></a>
PGP Fingerprint DA18 0DF2 FBD2 5F67 0656 452D E3A2 7531 A9F8 5A52

_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org