ladendirekt / pjsip4net

A wrapper library exposing the pjsip library to the .NET world in a OO-friendly way.
71 stars 42 forks source link

BufferUnderrun #35

Closed VincentGijsen closed 9 years ago

VincentGijsen commented 9 years ago

Hi,

first-off, nice work on the wrapper!

I've got it almost working, but the audio is ginving me troubles, not sure how to fix this. my setup: laptop(pjsip4net) ->asterisk (linux) -> sip-device

I can register to asterisk, and dial, however I hear for 0,5 sec crippled audio

my app.config:

   <sipua srtp="Disabled" secureSignaling="0" logMessages="true" logLevel="5" traceAndDebug="false" autoAnswer="true" autoRecording="false" autoConference="false" maxCalls="1" >
    <accounts>
      <!--<account accountId="sip:1002@192.168.10.254:5080" registrarUri="sip:192.168.10.1:5060" userName="1002" password="1002" realm="*" isDefault="true" publishPresence="false" /> -->
    </accounts>
    <sipTransport type="udp" Port="5080" />
   <media isVADEnabled="true" Quality="5" />
  </sipua>

I set my codec to PCMU/8000/1, prio 1

and dail my sipSpeaker:

        call = ua.CallManager.MakeCall(x =>
                    x.To("1000")
                    .At("192.168.10.1")
                    .From(ua.AccountManager.GetAccountById(Convert.ToInt32(1)))
                    .Call()
        );

and attach it to my conference:

 ua.MediaManager.ConferenceBridge.ConnectCall(call);
 Debug.WriteLine("cap: "+ ua.MediaManager.CurrentCaptureDevice.Name);
 Debug.WriteLine("play: " + ua.MediaManager.CurrentPlaybackDevice.Name);

my log:

2015-07-28 15:14:11,461 [13] DEBUG -  15:14:11.461     ec0A962F88  Underflow, buf_cnt=1, will generate 1 frame

2015-07-28 15:14:11,481 [13] DEBUG -  15:14:11.481     ec0A962F88  Underflow, buf_cnt=1, will generate 1 frame

2015-07-28 15:14:11,649 [13] DEBUG -  15:14:11.649     ec0A962F88  Underflow, buf_cnt=1, will generate 1 frame

2015-07-28 15:14:11,650 [13] DEBUG -  15:14:11.650     ec0A962F88  Underflow, buf_cnt=1, will generate 1 frame

2015-07-28 15:14:11,650 [13] DEBUG -  15:14:11.650     ec0A962F88  Underflow, buf_cnt=1, will generate 1 frame

2015-07-28 15:14:11,651 [13] DEBUG -  15:14:11.651     ec0A962F88  Underflow, buf_cnt=1, will generate 1 frame

2015-07-28 15:14:11,651 [13] DEBUG -  15:14:11.651     ec0A962F88  Underflow, buf_cnt=1, will generate 1 frame

2015-07-28 15:14:12,446 [13] DEBUG -  15:14:12.446   sound_port.c  EC suspended because of inactivity

Any idea's how to tackle this last hurdle?

It seems to me that the buffer size is too small, I don't care for more latency

cheers, Vincent

VincentGijsen commented 9 years ago

Mmm very strange, whenever I use GSM or G722 as codecs, it works as expected...