VoiSmart / pjsip-android

SIP Service for Android based on PJSIP
http://www.pjsip.org/
Apache License 2.0
290 stars 140 forks source link

Error creating SDP answer: SRTP crypto attribute required (PJMEDIA_SRTP_ESDPREQCRYPTO) [status=220228] #156

Closed dpproduction closed 2 years ago

dpproduction commented 2 years ago

Trying to use library with srtp enabled and got this error on incoming call. Looks like missed attributes in sdp. How to fix it ? ` SrtpOpt opt = new SrtpOpt(); IntVector optVector = new IntVector(); optVector.add(pjmedia_srtp_keying_method.PJMEDIA_SRTP_KEYING_DTLS_SRTP); optVector.add(pjmedia_srtp_keying_method.PJMEDIA_SRTP_KEYING_SDES); opt.setKeyings(optVector);

    accCfg.getMediaConfig().setSrtpOpt(opt);

    accCfg.getMediaConfig().setSrtpUse(pjmedia_srtp_use.PJMEDIA_SRTP_OPTIONAL);
    accCfg.getMediaConfig().setRtcpMuxEnabled(true);
    accCfg.getMediaConfig().setSrtpSecureSignaling(0);

`

dpproduction commented 2 years ago

The problem was in incoming SDP. Fixed on server.