[sip-comm-dev] Some problems when using secure calls


#1

All,

using the latest SVN version I tested to setup securs call another party.
The call setp and the ZRTP handshake works but when starting the SRTP
encoded voice starts the I see the exceptions and error messages below.
Non-encrypted calls to the same client work.

I have not yet digged into the problem, however because of massive changes
in the transfom stuff as well as in the Raw packet handling I would suspect
that these changes trigger this behaviour:

- either the SRTP transformer is not called and the audio decoder get
  encrypted data, thus gets garbage

or

- the handling of the raw packets is not correct, thus after decryption
  the data the new packet was not setup correctly

or

- the raw packet that was handed over to SRTP processing is not correct, that
  is does not contain the right length etc

or something else :slight_smile:

Any Ideas where to look first?

Regards,
Werner

     [java]
     [java] Welcome to Felix.
     [java] =================
     [java]
     [java] Media port: 30342
     [java] warning: The VAD has been replaced by a hack pending a complete rewrite
     [java] BasicTrackControl:prefetchTrack():96 4 bm = com.sun.media.BasicFilterModule@efb78af
     [java] BasicTrackControl:prefetchTrack():96 4 bm = com.sun.media.BasicFilterModule@1fb030d8
     [java] BasicTrackControl:prefetchTrack():96 4 bm = com.sun.media.BasicFilterModule@6856c528
     [java] BasicTrackControl:prefetchTrack():96 4 bm = com.sun.media.BasicRendererModule@18a9fa9c
     [java] BasicRendererModule.doPrefetch:155 Render : true
     [java] Media port: 0
     [java] BasicTrackControl:prefetchTrack():96 3 bm = com.sun.media.BasicFilterModule@876800e
     [java] BasicTrackControl:prefetchTrack():96 3 bm = com.sun.media.BasicFilterModule@1bd11b79
     [java] BasicTrackControl:prefetchTrack():96 3 bm = com.sun.media.BasicFilterModule@3d62b333
     [java] warning: The VAD has been replaced by a hack pending a complete rewrite
     [java] Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1029
     [java] Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1186

     [java] Expression 'PaAlsaStreamComponent_Initialize( &self->playback, alsaApi, outParams, StreamDirection_Out, NULL != callback )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1417
     [java] Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags,
userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1994
     [java] javax.media.ResourceUnavailableException: Device unavailable
     [java] at net.java.sip.communicator.impl.neomedia.jmfext.media.renderer.audio.PortAudioRenderer.open(PortAudioRenderer.java:189)
     [java] at com.sun.media.BasicRendererModule.doPrefetch(BasicRendererModule.java:158)
     [java] at com.sun.media.BasicTrackControl.prefetchTrack(BasicTrackControl.java:99)
     [java] at com.sun.media.PlaybackEngine.doPrefetch1(PlaybackEngine.java:682)
     [java] at com.sun.media.ProcessEngine.doPrefetch(ProcessEngine.java:230)
     [java] at com.sun.media.PrefetchWorkThread.process(BasicController.java:1430)
     [java] at com.sun.media.StateTransitionWorkThread.run(BasicController.java:1339)
     [java] Cannot build a flow graph with the customized options:
     [java] Unable to add customed codecs:
     [java] net.java.sip.communicator.impl.neomedia.audiolevel.AudioLevelEffect@e9dc852
     [java] Failed to prefetch: com.sun.media.ProcessEngine@24ca1465
     [java] BasicRenderModule.doPrefetch:159
     [java] !!!!!!!����������� BasicTrackControl:prefetchTrack():96
     [java] Error: Unable to prefetch com.sun.media.ProcessEngine@24ca1465
     [java]
     [java] Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1029
     [java] Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1186
     [java] Expression 'PaAlsaStreamComponent_Initialize( &self->playback, alsaApi, outParams, StreamDirection_Out, NULL != callback )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1417
     [java] Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags,
userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1994
     [java] 19:17:56.657 SCHWERWIEGEND: impl.neomedia.notify.PortAudioClipImpl.run().153 Cannot open portaudio device for notifications
     [java] net.java.sip.communicator.impl.neomedia.portaudio.PortAudioException: Device unavailable
     [java] at net.java.sip.communicator.impl.neomedia.portaudio.PortAudio.Pa_OpenStream(Native Method)
     [java] at net.java.sip.communicator.impl.neomedia.portaudio.streams.OutputPortAudioStream.initStream(OutputPortAudioStream.java:79)
     [java] at net.java.sip.communicator.impl.neomedia.portaudio.streams.OutputPortAudioStream.<init>(OutputPortAudioStream.java:62)
     [java] at net.java.sip.communicator.impl.neomedia.portaudio.PortAudioManager.getOutputStream(PortAudioManager.java:202)
     [java] at net.java.sip.communicator.impl.neomedia.notify.PortAudioClipImpl$PlayThread.run(PortAudioClipImpl.java:119)
     [java] at java.lang.Thread.run(Thread.java:636)

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hi Werner,

all problems you describe in recent mails that contains the exception :

Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir,
&self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1186

is a problem that portaudio cannot open the alsa device. And so all
other processing fails. In the current stack trace you can see
"Cannot build a flow graph" this means that no processor is processing
the media so there are no working transforms and srtp. Which is really
strange for me, you say that unencrypted call works but encrypted one
fails. Does the encrypted call is the first one after starting SC ?

Cheers
damencho

···

On Fri, Dec 18, 2009 at 8:30 PM, Werner Dittmann <Werner.Dittmann@t-online.de> wrote:

All,

using the latest SVN version I tested to setup securs call another party.
The call setp and the ZRTP handshake works but when starting the SRTP
encoded voice starts the I see the exceptions and error messages below.
Non-encrypted calls to the same client work.

I have not yet digged into the problem, however because of massive changes
in the transfom stuff as well as in the Raw packet handling I would suspect
that these changes trigger this behaviour:

- either the SRTP transformer is not called and the audio decoder get
encrypted data, thus gets garbage

or

- the handling of the raw packets is not correct, thus after decryption
the data the new packet was not setup correctly

or

- the raw packet that was handed over to SRTP processing is not correct, that
is does not contain the right length etc

or something else :slight_smile:

Any Ideas where to look first?

Regards,
Werner

\[java\]
\[java\] Welcome to Felix\.
\[java\] =================
\[java\]
\[java\] Media port: 30342
\[java\] warning: The VAD has been replaced by a hack pending a complete rewrite
\[java\] BasicTrackControl:prefetchTrack\(\):96  4 bm =  com\.sun\.media\.BasicFilterModule@efb78af
\[java\] BasicTrackControl:prefetchTrack\(\):96  4 bm =  com\.sun\.media\.BasicFilterModule@1fb030d8
\[java\] BasicTrackControl:prefetchTrack\(\):96  4 bm =  com\.sun\.media\.BasicFilterModule@6856c528
\[java\] BasicTrackControl:prefetchTrack\(\):96  4 bm =  com\.sun\.media\.BasicRendererModule@18a9fa9c
\[java\] BasicRendererModule\.doPrefetch:155 Render : true
\[java\] Media port: 0
\[java\] BasicTrackControl:prefetchTrack\(\):96  3 bm =  com\.sun\.media\.BasicFilterModule@876800e
\[java\] BasicTrackControl:prefetchTrack\(\):96  3 bm =  com\.sun\.media\.BasicFilterModule@1bd11b79
\[java\] BasicTrackControl:prefetchTrack\(\):96  3 bm =  com\.sun\.media\.BasicFilterModule@3d62b333
\[java\] warning: The VAD has been replaced by a hack pending a complete rewrite
\[java\] Expression &#39;ret&#39; failed in &#39;src/hostapi/alsa/pa\_linux\_alsa\.c&#39;, line: 1029
\[java\] Expression &#39;AlsaOpen\( &amp;alsaApi\-&gt;baseHostApiRep, params, streamDir, &amp;self\-&gt;pcm \)&#39; failed in &#39;src/hostapi/alsa/pa\_linux\_alsa\.c&#39;, line: 1186

\[java\] Expression &#39;PaAlsaStreamComponent\_Initialize\( &amp;self\-&gt;playback, alsaApi, outParams, StreamDirection\_Out, NULL \!= callback \)&#39; failed in

'src/hostapi/alsa/pa_linux_alsa.c', line: 1417
[java] Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags,
userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1994
[java] javax.media.ResourceUnavailableException: Device unavailable
[java] at net.java.sip.communicator.impl.neomedia.jmfext.media.renderer.audio.PortAudioRenderer.open(PortAudioRenderer.java:189)
[java] at com.sun.media.BasicRendererModule.doPrefetch(BasicRendererModule.java:158)
[java] at com.sun.media.BasicTrackControl.prefetchTrack(BasicTrackControl.java:99)
[java] at com.sun.media.PlaybackEngine.doPrefetch1(PlaybackEngine.java:682)
[java] at com.sun.media.ProcessEngine.doPrefetch(ProcessEngine.java:230)
[java] at com.sun.media.PrefetchWorkThread.process(BasicController.java:1430)
[java] at com.sun.media.StateTransitionWorkThread.run(BasicController.java:1339)
[java] Cannot build a flow graph with the customized options:
[java] Unable to add customed codecs:
[java] net.java.sip.communicator.impl.neomedia.audiolevel.AudioLevelEffect@e9dc852
[java] Failed to prefetch: com.sun.media.ProcessEngine@24ca1465
[java] BasicRenderModule.doPrefetch:159
[java] !!!!!!!§§§§§§§§§§§ BasicTrackControl:prefetchTrack():96
[java] Error: Unable to prefetch com.sun.media.ProcessEngine@24ca1465
[java]
[java] Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1029
[java] Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1186
[java] Expression 'PaAlsaStreamComponent_Initialize( &self->playback, alsaApi, outParams, StreamDirection_Out, NULL != callback )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1417
[java] Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags,
userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1994
[java] 19:17:56.657 SCHWERWIEGEND: impl.neomedia.notify.PortAudioClipImpl.run().153 Cannot open portaudio device for notifications
[java] net.java.sip.communicator.impl.neomedia.portaudio.PortAudioException: Device unavailable
[java] at net.java.sip.communicator.impl.neomedia.portaudio.PortAudio.Pa_OpenStream(Native Method)
[java] at net.java.sip.communicator.impl.neomedia.portaudio.streams.OutputPortAudioStream.initStream(OutputPortAudioStream.java:79)
[java] at net.java.sip.communicator.impl.neomedia.portaudio.streams.OutputPortAudioStream.<init>(OutputPortAudioStream.java:62)
[java] at net.java.sip.communicator.impl.neomedia.portaudio.PortAudioManager.getOutputStream(PortAudioManager.java:202)
[java] at net.java.sip.communicator.impl.neomedia.notify.PortAudioClipImpl$PlayThread.run(PortAudioClipImpl.java:119)
[java] at java.lang.Thread.run(Thread.java:636)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Damian,

it's always the first call :wink: because I cannot place a second call
at all with the current SVN version of SC - see my e-mail describing
this problem.

I'll try to get more info about the problem and keep you informed.

Regards,
Werner

···

Am 19.12.2009 10:34, schrieb Damian Minkov:

Hi Werner,

all problems you describe in recent mails that contains the exception :

Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir,
&self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1186

is a problem that portaudio cannot open the alsa device. And so all
other processing fails. In the current stack trace you can see
"Cannot build a flow graph" this means that no processor is processing
the media so there are no working transforms and srtp. Which is really
strange for me, you say that unencrypted call works but encrypted one
fails. Does the encrypted call is the first one after starting SC ?

Cheers
damencho

On Fri, Dec 18, 2009 at 8:30 PM, Werner Dittmann > <Werner.Dittmann@t-online.de> wrote:

All,

using the latest SVN version I tested to setup securs call another party.
The call setp and the ZRTP handshake works but when starting the SRTP
encoded voice starts the I see the exceptions and error messages below.
Non-encrypted calls to the same client work.

I have not yet digged into the problem, however because of massive changes
in the transfom stuff as well as in the Raw packet handling I would suspect
that these changes trigger this behaviour:

- either the SRTP transformer is not called and the audio decoder get
encrypted data, thus gets garbage

or

- the handling of the raw packets is not correct, thus after decryption
the data the new packet was not setup correctly

or

- the raw packet that was handed over to SRTP processing is not correct, that
is does not contain the right length etc

or something else :slight_smile:

Any Ideas where to look first?

Regards,
Werner

    [java]
    [java] Welcome to Felix.
    [java] =================
    [java]
    [java] Media port: 30342
    [java] warning: The VAD has been replaced by a hack pending a complete rewrite
    [java] BasicTrackControl:prefetchTrack():96 4 bm = com.sun.media.BasicFilterModule@efb78af
    [java] BasicTrackControl:prefetchTrack():96 4 bm = com.sun.media.BasicFilterModule@1fb030d8
    [java] BasicTrackControl:prefetchTrack():96 4 bm = com.sun.media.BasicFilterModule@6856c528
    [java] BasicTrackControl:prefetchTrack():96 4 bm = com.sun.media.BasicRendererModule@18a9fa9c
    [java] BasicRendererModule.doPrefetch:155 Render : true
    [java] Media port: 0
    [java] BasicTrackControl:prefetchTrack():96 3 bm = com.sun.media.BasicFilterModule@876800e
    [java] BasicTrackControl:prefetchTrack():96 3 bm = com.sun.media.BasicFilterModule@1bd11b79
    [java] BasicTrackControl:prefetchTrack():96 3 bm = com.sun.media.BasicFilterModule@3d62b333
    [java] warning: The VAD has been replaced by a hack pending a complete rewrite
    [java] Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1029
    [java] Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1186

    [java] Expression 'PaAlsaStreamComponent_Initialize( &self->playback, alsaApi, outParams, StreamDirection_Out, NULL != callback )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1417
    [java] Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags,
userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1994
    [java] javax.media.ResourceUnavailableException: Device unavailable
    [java] at net.java.sip.communicator.impl.neomedia.jmfext.media.renderer.audio.PortAudioRenderer.open(PortAudioRenderer.java:189)
    [java] at com.sun.media.BasicRendererModule.doPrefetch(BasicRendererModule.java:158)
    [java] at com.sun.media.BasicTrackControl.prefetchTrack(BasicTrackControl.java:99)
    [java] at com.sun.media.PlaybackEngine.doPrefetch1(PlaybackEngine.java:682)
    [java] at com.sun.media.ProcessEngine.doPrefetch(ProcessEngine.java:230)
    [java] at com.sun.media.PrefetchWorkThread.process(BasicController.java:1430)
    [java] at com.sun.media.StateTransitionWorkThread.run(BasicController.java:1339)
    [java] Cannot build a flow graph with the customized options:
    [java] Unable to add customed codecs:
    [java] net.java.sip.communicator.impl.neomedia.audiolevel.AudioLevelEffect@e9dc852
    [java] Failed to prefetch: com.sun.media.ProcessEngine@24ca1465
    [java] BasicRenderModule.doPrefetch:159
    [java] !!!!!!!����������� BasicTrackControl:prefetchTrack():96
    [java] Error: Unable to prefetch com.sun.media.ProcessEngine@24ca1465
    [java]
    [java] Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1029
    [java] Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1186
    [java] Expression 'PaAlsaStreamComponent_Initialize( &self->playback, alsaApi, outParams, StreamDirection_Out, NULL != callback )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1417
    [java] Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags,
userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1994
    [java] 19:17:56.657 SCHWERWIEGEND: impl.neomedia.notify.PortAudioClipImpl.run().153 Cannot open portaudio device for notifications
    [java] net.java.sip.communicator.impl.neomedia.portaudio.PortAudioException: Device unavailable
    [java] at net.java.sip.communicator.impl.neomedia.portaudio.PortAudio.Pa_OpenStream(Native Method)
    [java] at net.java.sip.communicator.impl.neomedia.portaudio.streams.OutputPortAudioStream.initStream(OutputPortAudioStream.java:79)
    [java] at net.java.sip.communicator.impl.neomedia.portaudio.streams.OutputPortAudioStream.<init>(OutputPortAudioStream.java:62)
    [java] at net.java.sip.communicator.impl.neomedia.portaudio.PortAudioManager.getOutputStream(PortAudioManager.java:202)
    [java] at net.java.sip.communicator.impl.neomedia.notify.PortAudioClipImpl$PlayThread.run(PortAudioClipImpl.java:119)
    [java] at java.lang.Thread.run(Thread.java:636)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hi Damian, all

this is the second mail and this could be a long explenation :-).
First of all many non-SRTP calls also fail if I use a specific
SIP client. See below why.

These problems occur, IMHO, due to several errors that overlap each
other and give some strange results. But let's go step-by-step:

First: I noticed a difference when comparing SDP data of calls that
work and calls that don't. I use different clients together with SC.
A call that works has a media description line in SDP that looks like
this for video where the other clients don't support video:

m=video 0 RTP/AVP 100

SC offers video as receive only, with a video format number of 100
and the other client sends back the above line so signal that it does
not support video (port is 0). A client that causes the calls to fail
returns the following line:

m=video 0 RTP/AVP

Note that the format number (100) is missing. This causes the list of
supported formats to be empty.
Have a look at "processAnswer(SessionDescription answer)" in
CallPeerMediaHandler: If the list of supported formats is empty then
SC thinks the other party did something wrong with the SDP offer:
SC offered video but the other party does not correctly say: I don't
support video.
Well, the RFC is not very clear if there must be a format number
or if is just a should. However, the missing format number causes
an empty list

Because the stream is closed anyway if the port number is 0 I've
rearranged the checks in "processAnswer(SessionDescription answer)" to
overcome this problem (code needs to be cleaned up of course). This
codes closes the allocated media stream as soon as it sees that
the other client does not support this media (port is 0) and continues.
This is sort of defensive programming and silently skips problems
if they do not cause any real harm. Someone needs to check this.

Code snippet:
...
    private void processAnswer(SessionDescription answer)
        throws OperationFailedException,
               IllegalArgumentException
    {
        this.remoteSess = answer;

        Vector<MediaDescription> remoteDescriptions
            = SdpUtils.extractMediaDescriptions(answer);

        this.setCallInfoURL(SdpUtils.getCallInfoURL(answer));

        for ( MediaDescription mediaDescription : remoteDescriptions)
        {
            MediaType mediaType = SdpUtils.getMediaType(mediaDescription);
            try {
                int mp = mediaDescription.getMedia().getMediaPort();
// System.out.println("Media port: " + mp);
                if (mp == 0) {
                    closeStream(mediaType);
                    continue;
                }
            } catch (SdpParseException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

            List<MediaFormat> supportedFormats = SdpUtils.extractFormats(
                            mediaDescription, dynamicPayloadTypes);

            MediaDevice dev = getDefaultDevice(mediaType);
            MediaDirection devDirection
                = (dev == null) ? MediaDirection.INACTIVE : dev.getDirection();

            if (supportedFormats.isEmpty()
                    >> (devDirection == MediaDirection.INACTIVE))
            {
                //remote party must have messed up our SDP. throw an exception.
                ProtocolProviderServiceSipImpl.throwOperationFailedException(
                    "Remote party sent an invlid SDP answer.",
                     OperationFailedException.ILLEGAL_ARGUMENT, null, logger);
            }

            StreamConnector connector = getStreamConnector(mediaType);

            //determine the direction that we need to announce.
            MediaDirection remoteDirection
                = SdpUtils.getDirection(mediaDescription);

            MediaDirection direction
                = devDirection.getDirectionForAnswer(remoteDirection);

            //stream target
            MediaStreamTarget target
                = SdpUtils.extractDefaultTarget(mediaDescription, answer);

            // create the corresponding stream...
            if(target.getDataAddress().getPort() != 0)
            {
                initStream(connector, dev, supportedFormats.get(0), target,
                                direction);
            }
            else
            // or destroy it in case the target port was 0.
            {
                closeStream(mediaType);
            }
        }
    }

...

However, this not not solve the problem completely. Sometimes I can make 1, 2, or
three calls before I get the same problem. It seems that some thread blocks
the audio device which then cause the exception - please refer to one of my
emails I sent yesterday.

This oppinion is also supported when I do ZRTP/SRTP calls:
- the RTP session is active, the audio channel is open and active when ZRTP
  starts (usually a very short time after RTP started) with its handshake.
- If the handshake is ok then ZRTP plays a short notification sound while
  the audio stream is already active. Could it be that this causes the
  audio device to report "busy"?

Thus we may have to causes here: first a thread blocks the audio device after
some call (we solved a similar problem in old media some weeks ago). And in
case of ZRTP it could be that the notify sound causes portaudio the screw up.

What do you think?

Regards,
Werner

···

Am 19.12.2009 10:34, schrieb Damian Minkov:

Hi Werner,

all problems you describe in recent mails that contains the exception :

Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir,
&self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1186

is a problem that portaudio cannot open the alsa device. And so all
other processing fails. In the current stack trace you can see
"Cannot build a flow graph" this means that no processor is processing
the media so there are no working transforms and srtp. Which is really
strange for me, you say that unencrypted call works but encrypted one
fails. Does the encrypted call is the first one after starting SC ?

Cheers
damencho

On Fri, Dec 18, 2009 at 8:30 PM, Werner Dittmann > <Werner.Dittmann@t-online.de> wrote:

All,

using the latest SVN version I tested to setup securs call another party.
The call setp and the ZRTP handshake works but when starting the SRTP
encoded voice starts the I see the exceptions and error messages below.
Non-encrypted calls to the same client work.

I have not yet digged into the problem, however because of massive changes
in the transfom stuff as well as in the Raw packet handling I would suspect
that these changes trigger this behaviour:

- either the SRTP transformer is not called and the audio decoder get
encrypted data, thus gets garbage

or

- the handling of the raw packets is not correct, thus after decryption
the data the new packet was not setup correctly

or

- the raw packet that was handed over to SRTP processing is not correct, that
is does not contain the right length etc

or something else :slight_smile:

Any Ideas where to look first?

Regards,
Werner

    [java]
    [java] Welcome to Felix.
    [java] =================
    [java]
    [java] Media port: 30342
    [java] warning: The VAD has been replaced by a hack pending a complete rewrite
    [java] BasicTrackControl:prefetchTrack():96 4 bm = com.sun.media.BasicFilterModule@efb78af
    [java] BasicTrackControl:prefetchTrack():96 4 bm = com.sun.media.BasicFilterModule@1fb030d8
    [java] BasicTrackControl:prefetchTrack():96 4 bm = com.sun.media.BasicFilterModule@6856c528
    [java] BasicTrackControl:prefetchTrack():96 4 bm = com.sun.media.BasicRendererModule@18a9fa9c
    [java] BasicRendererModule.doPrefetch:155 Render : true
    [java] Media port: 0
    [java] BasicTrackControl:prefetchTrack():96 3 bm = com.sun.media.BasicFilterModule@876800e
    [java] BasicTrackControl:prefetchTrack():96 3 bm = com.sun.media.BasicFilterModule@1bd11b79
    [java] BasicTrackControl:prefetchTrack():96 3 bm = com.sun.media.BasicFilterModule@3d62b333
    [java] warning: The VAD has been replaced by a hack pending a complete rewrite
    [java] Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1029
    [java] Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1186

    [java] Expression 'PaAlsaStreamComponent_Initialize( &self->playback, alsaApi, outParams, StreamDirection_Out, NULL != callback )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1417
    [java] Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags,
userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1994
    [java] javax.media.ResourceUnavailableException: Device unavailable
    [java] at net.java.sip.communicator.impl.neomedia.jmfext.media.renderer.audio.PortAudioRenderer.open(PortAudioRenderer.java:189)
    [java] at com.sun.media.BasicRendererModule.doPrefetch(BasicRendererModule.java:158)
    [java] at com.sun.media.BasicTrackControl.prefetchTrack(BasicTrackControl.java:99)
    [java] at com.sun.media.PlaybackEngine.doPrefetch1(PlaybackEngine.java:682)
    [java] at com.sun.media.ProcessEngine.doPrefetch(ProcessEngine.java:230)
    [java] at com.sun.media.PrefetchWorkThread.process(BasicController.java:1430)
    [java] at com.sun.media.StateTransitionWorkThread.run(BasicController.java:1339)
    [java] Cannot build a flow graph with the customized options:
    [java] Unable to add customed codecs:
    [java] net.java.sip.communicator.impl.neomedia.audiolevel.AudioLevelEffect@e9dc852
    [java] Failed to prefetch: com.sun.media.ProcessEngine@24ca1465
    [java] BasicRenderModule.doPrefetch:159
    [java] !!!!!!!����������� BasicTrackControl:prefetchTrack():96
    [java] Error: Unable to prefetch com.sun.media.ProcessEngine@24ca1465
    [java]
    [java] Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1029
    [java] Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1186
    [java] Expression 'PaAlsaStreamComponent_Initialize( &self->playback, alsaApi, outParams, StreamDirection_Out, NULL != callback )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1417
    [java] Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags,
userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1994
    [java] 19:17:56.657 SCHWERWIEGEND: impl.neomedia.notify.PortAudioClipImpl.run().153 Cannot open portaudio device for notifications
    [java] net.java.sip.communicator.impl.neomedia.portaudio.PortAudioException: Device unavailable
    [java] at net.java.sip.communicator.impl.neomedia.portaudio.PortAudio.Pa_OpenStream(Native Method)
    [java] at net.java.sip.communicator.impl.neomedia.portaudio.streams.OutputPortAudioStream.initStream(OutputPortAudioStream.java:79)
    [java] at net.java.sip.communicator.impl.neomedia.portaudio.streams.OutputPortAudioStream.<init>(OutputPortAudioStream.java:62)
    [java] at net.java.sip.communicator.impl.neomedia.portaudio.PortAudioManager.getOutputStream(PortAudioManager.java:202)
    [java] at net.java.sip.communicator.impl.neomedia.notify.PortAudioClipImpl$PlayThread.run(PortAudioClipImpl.java:119)
    [java] at java.lang.Thread.run(Thread.java:636)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net