Ignore:
Timestamp:
Feb 26, 2018 7:50:18 AM (7 years ago)
Author:
nanang
Message:

Fixe #2096:

  • Fixed re-INVITE scenario: always generate SRTP attr in SDP re-offer/answer as both offerer/answerer (as long as SRTP is not disabled of course), currently it does not generate SRTP attr if active session does not use SRTP.
  • Fixed bug in retrieving video stream info from SDP that caused DTLS transport (UDP/TLS/RTP/SAVP) getting rejected.
  • Added pjsua app param '--srtp-keying=0/1' to choose SRTP keying to be used in the outgoing offer (0=SDES (default), 1=DTLS-SRTP).
  • Few minors, e.g: adding transport_srtp_dtls/sdes.c to pjmedia MSVC2015 project.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_config.c

    r5701 r5746  
    192192    puts  ("  --turn-user         TURN username"); 
    193193    puts  ("  --turn-passwd       TURN password"); 
     194#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 
     195    puts  ("  --srtp-keying       SRTP keying method for outgoing SDP offer."); 
     196    puts  ("                      0=SDES (default), 1=DTLS"); 
     197#endif 
    194198 
    195199    puts  (""); 
     
    356360           OPT_USE_ICE, OPT_ICE_REGULAR, OPT_USE_SRTP, OPT_SRTP_SECURE, 
    357361           OPT_USE_TURN, OPT_ICE_MAX_HOSTS, OPT_ICE_NO_RTCP, OPT_TURN_SRV, 
    358            OPT_TURN_TCP, OPT_TURN_USER, OPT_TURN_PASSWD, 
     362           OPT_TURN_TCP, OPT_TURN_USER, OPT_TURN_PASSWD, OPT_SRTP_KEYING, 
    359363           OPT_PLAY_FILE, OPT_PLAY_TONE, OPT_RTP_PORT, OPT_ADD_CODEC, 
    360364           OPT_ILBC_MODE, OPT_REC_FILE, OPT_AUTO_REC, 
     
    453457        { "use-srtp",   1, 0, OPT_USE_SRTP}, 
    454458        { "srtp-secure",1, 0, OPT_SRTP_SECURE}, 
     459        { "srtp-keying",1, 0, OPT_SRTP_KEYING}, 
    455460#endif 
    456461        { "add-codec",  1, 0, OPT_ADD_CODEC}, 
     
    10421047            cur_acc->srtp_secure_signaling = app_config.cfg.srtp_secure_signaling; 
    10431048            break; 
     1049        case OPT_SRTP_KEYING: 
     1050            app_config.srtp_keying = my_atoi(pj_optarg); 
     1051            if (!pj_isdigit(*pj_optarg) || app_config.srtp_keying < 0 || 
     1052                app_config.srtp_keying > 1) 
     1053            { 
     1054                PJ_LOG(1,(THIS_FILE, "Invalid value for --srtp-keying option")); 
     1055                return -1; 
     1056            } 
     1057            break; 
    10441058#endif 
    10451059 
     
    19261940        pj_strcat2(&cfg, line); 
    19271941    } 
     1942    if (app_config.srtp_keying >= 0 && app_config.srtp_keying <= 1) 
     1943    { 
     1944        pj_ansi_sprintf(line, "--srtp-keying %d\n", 
     1945                        app_config.srtp_keying); 
     1946        pj_strcat2(&cfg, line); 
     1947    } 
    19281948#endif 
    19291949 
Note: See TracChangeset for help on using the changeset viewer.