src/net/java/sip/communicator/impl/protocol/jabber/CallPeerMediaHandlerJabberImpl.java
/**
     * Detects and adds ZRTP available encryption method present in the
     * description given in parameter.
     *
     * @param isInitiator True if the local call instance is the initiator of
     * the call. False otherwise.
     * @param description The DESCRIPTION element of the JINGLE element which
     * contains the PAYLOAD-TYPE and (more important here) the ENCRYPTION.
     * @param mediaType The type of media (AUDIO or VIDEO).
     */
Detects and adds ZRTP available encryption method present in the
description given in parameter.

@param isInitiator True if the local call instance is the initiator of
the call. False otherwise.
@param description The DESCRIPTION element of the JINGLE element which
contains the PAYLOAD-TYPE and (more important here) the ENCRYPTION.
@param mediaType The type of media (AUDIO or VIDEO).
Detects and adds ZRTP available encryption method present in the description given in parameter . @param isInitiator True if the local call instance is the initiator of the call . False otherwise . @param description The DESCRIPTION element of the JINGLE element which contains the PAYLOAD - TYPE and ( more important here ) the ENCRYPTION . @param mediaType The type of media ( AUDIO or VIDEO ) .
private void addZrtpAdvertisedEncryptions(
        boolean isInitiator,
        RtpDescriptionPacketExtension description,
        MediaType mediaType)
    {
        CallPeer peer = getPeer();
        Call call = peer.getCall();
        if (call.getConference().isJitsiVideobridge())
            return;
        EncryptionPacketExtension encryptionPacketExtension
            = description.getFirstChildOfType(
                    EncryptionPacketExtension.class);
        if(encryptionPacketExtension != null)
        {
            AccountID accountID = peer.getProtocolProvider().getAccountID();
            if (accountID.getAccountPropertyBoolean(
                        ProtocolProviderFactory.DEFAULT_ENCRYPTION,
                        true)
                    && accountID.isEncryptionProtocolEnabled(
                            SrtpControlType.ZRTP)
                    && call.isSipZrtpAttribute())
            {
                ZrtpHashPacketExtension zrtpHashPacketExtension
                    = encryptionPacketExtension.getFirstChildOfType(
                            ZrtpHashPacketExtension.class);
                if ((zrtpHashPacketExtension != null)
                        && (zrtpHashPacketExtension.getValue() != null))
                {
                    addAdvertisedEncryptionMethod(SrtpControlType.ZRTP);
                }
            }
        }
    }
private void addZrtpAdvertisedEncryptions ( boolean isInitiator , RtpDescriptionPacketExtension description , MediaType mediaType ) { CallPeer peer = getPeer ( ) ; Call call = peer . getCall ( ) ; if ( call . getConference ( ) . isJitsiVideobridge ( ) ) return ; EncryptionPacketExtension encryptionPacketExtension = description . getFirstChildOfType ( EncryptionPacketExtension . class ) ; if ( encryptionPacketExtension != null ) { AccountID accountID = peer . getProtocolProvider ( ) . getAccountID ( ) ; if ( accountID . getAccountPropertyBoolean ( ProtocolProviderFactory . DEFAULT_ENCRYPTION , true ) && accountID . isEncryptionProtocolEnabled ( SrtpControlType . ZRTP ) && call . isSipZrtpAttribute ( ) ) { ZrtpHashPacketExtension zrtpHashPacketExtension = encryptionPacketExtension . getFirstChildOfType ( ZrtpHashPacketExtension . class ) ; if ( ( zrtpHashPacketExtension != null ) && ( zrtpHashPacketExtension . getValue ( ) != null ) ) { addAdvertisedEncryptionMethod ( SrtpControlType . ZRTP ) ; } } } }
Detects and adds ZRTP available encryption method present in the
 description given in parameter.
Detects and adds ZRTP available encryption method present in the description given in parameter .
// ZRTP is not supported in telephony conferences utilizing the // server-side technology Jitsi Videobridge yet. // Conforming to XEP-0167 schema there is 0 or 1 ENCRYPTION element for // a given DESCRIPTION. // ZRTP