Hi there, I'm having some trouble upgrading my Software from PJSUA-1 to PJSUA2. Following behaviour of PJSUA2: I am trying to init a Jabra-USB-Headset (Jabra Link 280). This Headset-Adapter is working under PJSUA-1, but PJSUA2 refuses any cooperation, when I set the device with the audiodevmanager. Other Devices (like Jabra Link 260) do the work, but we are already using the 280-Device on hundrets of workstations. So I have to get this working somehow or continue using PJSUA-1. Note: Even if I try ep_cfg.medConfig.sndClockrate = 16000 it's the same result. (I tried every conceivable combination) Code-Example and Output-Example below. Any Ideas? Thx in advance! Niels Klaas - - - - python - code - - snip - - - - - - - - - - - - - - import pjsua2 as pj import time print "UA tonegen test.." ep_cfg = pj.EpConfig() ep = pj.Endpoint() ep.libCreate() ep.libInit(ep_cfg) ep.libStart() tonegen = pj.ToneGenerator() tonegen.createToneGenerator() adManager = ep.audDevManager() adevs = adManager.enumDev() for i in range(0, len(adevs)): adev = adevs[i] print "{}: name: '{}', driver: '{}', caps: '{}', defaultSamplesPerSec: '{}', outputCount: '{}', inputCount: '{}'".format(i, adev.name, adev.driver, adev.caps, adev.defaultSamplesPerSec, adev.outputCount, adev.inputCount) r_input = raw_input('tell dev 4 test: ') dev_idx = int( r_input ) try: adManager.setPlaybackDev(dev_idx) adManager.setCaptureDev(dev_idx) except pj.Error as pjsua_error: print "### Error in File {}, line {}, status: '{}', title: '{}', reason: '{}'".format(pjsua_error.srcFile, pjsua_error.srcLine, pjsua_error.status, pjsua_error.title, pjsua_error.reason) ep.libDestroy() - - - - python - code - - snap - - - - - - - - - - - - - - - - - - - - program output - - - - - snip - - - - - - - - - pydev debugger: starting UA tonegen test.. 16:01:55.945 os_core_unix.c !pjlib 2.2.1-svn for POSIX initialized 16:01:55.945 sip_endpoint.c .Creating endpoint instance... 16:01:55.945 pjlib .select() I/O Queue created (0x17a7ec0) 16:01:55.945 sip_endpoint.c .Module "mod-msg-print" registered 16:01:55.945 sip_transport. .Transport manager created. 16:01:55.945 pjsua_core.c .PJSUA state changed: NULL --> CREATED 16:01:55.945 sip_endpoint.c .Module "mod-pjsua-log" registered 16:01:55.945 sip_endpoint.c .Module "mod-tsx-layer" registered 16:01:55.945 sip_endpoint.c .Module "mod-stateful-util" registered 16:01:55.945 sip_endpoint.c .Module "mod-ua" registered 16:01:55.945 sip_endpoint.c .Module "mod-100rel" registered 16:01:55.945 sip_endpoint.c .Module "mod-pjsua" registered 16:01:55.945 sip_endpoint.c .Module "mod-invite" registered 16:01:55.985 pa_dev.c ..PortAudio sound library initialized, status=0 16:01:55.985 pa_dev.c ..PortAudio host api count=2 16:01:55.985 pa_dev.c ..Sound device count=14 16:01:55.985 pjlib ..select() I/O Queue created (0x195f768) 16:01:55.998 sip_endpoint.c .Module "mod-evsub" registered 16:01:55.998 sip_endpoint.c .Module "mod-presence" registered 16:01:55.998 sip_endpoint.c .Module "mod-mwi" registered 16:01:55.998 sip_endpoint.c .Module "mod-refer" registered 16:01:55.998 sip_endpoint.c .Module "mod-pjsua-pres" registered 16:01:55.998 sip_endpoint.c .Module "mod-pjsua-im" registered 16:01:55.998 sip_endpoint.c .Module "mod-pjsua-options" registered 16:01:55.998 pjsua_core.c .1 SIP worker threads created 16:01:55.998 pjsua_core.c .pjsua version 2.2.1-svn for Linux-3.13.0.24/x86_64/glibc-2.15 initialized 16:01:55.998 pjsua_core.c .PJSUA state changed: CREATED --> INIT 16:01:55.998 pjsua_core.c PJSUA state changed: INIT --> STARTING 16:01:55.998 sip_endpoint.c .Module "mod-unsolicited-mwi" registered 16:01:55.998 pjsua_core.c .PJSUA state changed: STARTING --> RUNNING 0: name: 'HDA Intel PCH: CX20590 Analog (hw:0,0)', driver: 'PA', caps: '6', defaultSamplesPerSec: '44100', outputCount: '4', inputCount: '2' 1: name: 'HDA Intel PCH: HDMI 0 (hw:0,3)', driver: 'PA', caps: '6', defaultSamplesPerSec: '44100', outputCount: '8', inputCount: '0' 2: name: 'HDA Intel PCH: HDMI 1 (hw:0,7)', driver: 'PA', caps: '6', defaultSamplesPerSec: '44100', outputCount: '8', inputCount: '0' 3: name: 'HDA Intel PCH: HDMI 2 (hw:0,8)', driver: 'PA', caps: '6', defaultSamplesPerSec: '44100', outputCount: '8', inputCount: '0' 4: name: 'Jabra LINK 280 USB: USB Audio (hw:1,0)', driver: 'PA', caps: '6', defaultSamplesPerSec: '16000', outputCount: '1', inputCount: '1' 5: name: 'sysdefault', driver: 'PA', caps: '6', defaultSamplesPerSec: '44100', outputCount: '128', inputCount: '128' 6: name: 'front', driver: 'PA', caps: '6', defaultSamplesPerSec: '44100', outputCount: '4', inputCount: '0' 7: name: 'surround40', driver: 'PA', caps: '6', defaultSamplesPerSec: '44100', outputCount: '4', inputCount: '0' 8: name: 'surround51', driver: 'PA', caps: '6', defaultSamplesPerSec: '44100', outputCount: '4', inputCount: '0' 9: name: 'surround71', driver: 'PA', caps: '6', defaultSamplesPerSec: '44100', outputCount: '4', inputCount: '0' 10: name: 'hdmi', driver: 'PA', caps: '6', defaultSamplesPerSec: '44100', outputCount: '8', inputCount: '0' 11: name: 'pulse', driver: 'PA', caps: '6', defaultSamplesPerSec: '44100', outputCount: '32', inputCount: '32' 12: name: 'dmix', driver: 'PA', caps: '6', defaultSamplesPerSec: '48000', outputCount: '2', inputCount: '0' 13: name: 'default', driver: 'PA', caps: '6', defaultSamplesPerSec: '44100', outputCount: '32', inputCount: '32' tell dev 4 test: 4 16:01:58.533 pjsua_aud.c Set sound device: capture=-1, playback=4 Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1294 Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1870 Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1994 16:01:58.533 pjsua_aud.c .Opening sound device PCM at 16000/1/20ms 16:01:58.534 pjsua_aud.c .Opening sound device PCM at 44100/1/20ms Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1294 Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1873 Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1994 16:01:58.540 pjsua_aud.c .Opening sound device PCM at 48000/1/20ms Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1294 Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1873 Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1994 16:01:58.548 pjsua_aud.c .Opening sound device PCM at 32000/1/20ms Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1294 Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1870 Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1994 Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1294 Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1870 Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1994 Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1294 Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1870 Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1994 16:01:58.549 pjsua_aud.c .Opening sound device PCM at 16000/1/20ms 16:01:58.549 pjsua_aud.c .Opening sound device PCM at 8000/1/20ms 16:01:58.550 pjsua_aud.c .Unable to open sound device: Invalid sample rate [status=469996] 16:01:58.550 media.cpp pjsua_set_snd_dev(capture_dev, playback_dev) error: Invalid sample rate (status=469996) [../src/pjsua2/media.cpp:691] ### Error in File ../src/pjsua2/media.cpp, line 691, status: '469996', title: 'pjsua_set_snd_dev(capture_dev, playback_dev)', reason: 'Invalid sample rate' 16:01:58.550 pjsua_core.c Shutting down, flags=0... 16:01:58.550 pjsua_core.c PJSUA state changed: RUNNING --> CLOSING 16:01:58.553 pjsua_call.c .Hangup all calls.. 16:01:58.553 pjsua_media.c .Call 0: deinitializing media.. 16:01:58.553 pjsua_media.c .Call 1: deinitializing media.. 16:01:58.553 pjsua_media.c .Call 2: deinitializing media.. 16:01:58.553 pjsua_media.c .Call 3: deinitializing media.. 16:01:58.553 pjsua_pres.c .Shutting down presence.. 16:01:59.557 pjsua_core.c .Destroying... 16:01:59.557 pjsua_media.c .Shutting down media.. 16:01:59.987 pa_dev.c ..PortAudio sound library shutting down.. 16:01:59.987 sip_transactio .Stopping transaction layer module 16:01:59.987 sip_transactio .Stopped transaction layer module 16:01:59.987 sip_endpoint.c .Module "mod-unsolicited-mwi" unregistered 16:01:59.987 sip_endpoint.c .Module "mod-pjsua-options" unregistered 16:01:59.987 sip_endpoint.c .Module "mod-pjsua-im" unregistered 16:01:59.987 sip_endpoint.c .Module "mod-pjsua-pres" unregistered 16:01:59.987 sip_endpoint.c .Module "mod-pjsua" unregistered 16:01:59.987 sip_endpoint.c .Module "mod-stateful-util" unregistered 16:01:59.987 sip_endpoint.c .Module "mod-refer" unregistered 16:01:59.987 sip_endpoint.c .Module "mod-mwi" unregistered 16:01:59.987 sip_endpoint.c .Module "mod-presence" unregistered 16:01:59.987 sip_endpoint.c .Module "mod-evsub" unregistered 16:01:59.987 sip_endpoint.c .Module "mod-invite" unregistered 16:01:59.987 sip_endpoint.c .Module "mod-100rel" unregistered 16:01:59.987 sip_endpoint.c .Module "mod-ua" unregistered 16:01:59.987 sip_transactio .Transaction layer module destroyed 16:01:59.987 sip_endpoint.c .Module "mod-tsx-layer" unregistered 16:01:59.987 sip_endpoint.c .Module "mod-msg-print" unregistered 16:01:59.987 sip_endpoint.c .Module "mod-pjsua-log" unregistered 16:01:59.987 sip_endpoint.c .Endpoint 0x17a9eb8 destroyed 16:01:59.987 tonegen0x19738 .Pool is not released by application, releasing now 16:01:59.987 pjsua_core.c .PJSUA state changed: CLOSING --> NULL 16:01:59.987 pjsua_core.c .PJSUA destroyed... python2.7: ../src/pjmedia/conference.c:1097: pjmedia_conf_remove_port: Assertion `conf && port < conf->max_ports' failed. - - - - - - program output - - - - - snap - - - - - - - - -