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.c

    r5677 r5746  
    10111011} 
    10121012 
     1013/* 
     1014 * This callback is called when media transport SRTP needs to be created. 
     1015 */ 
     1016static void on_create_media_transport_srtp(pjsua_call_id call_id, 
     1017                                           unsigned media_idx, 
     1018                                           pjmedia_srtp_setting *srtp_opt) 
     1019{ 
     1020    PJ_UNUSED_ARG(call_id); 
     1021    PJ_UNUSED_ARG(media_idx); 
     1022 
     1023    /* Set SRTP keying to use DTLS over SDES */ 
     1024    if (app_config.srtp_keying == 1) { 
     1025        srtp_opt->keying_count = 2; 
     1026        srtp_opt->keying[0] = PJMEDIA_SRTP_KEYING_DTLS_SRTP; 
     1027        srtp_opt->keying[1] = PJMEDIA_SRTP_KEYING_SDES; 
     1028    } 
     1029} 
     1030 
     1031 
    10131032#ifdef TRANSPORT_ADAPTER_SAMPLE 
    10141033/* 
     
    13441363    app_config.cfg.cb.on_snd_dev_operation = &on_snd_dev_operation; 
    13451364    app_config.cfg.cb.on_call_media_event = &on_call_media_event; 
     1365    app_config.cfg.cb.on_create_media_transport_srtp = 
     1366                                            &on_create_media_transport_srtp; 
    13461367#ifdef TRANSPORT_ADAPTER_SAMPLE 
    13471368    app_config.cfg.cb.on_create_media_transport = &on_create_media_transport; 
Note: See TracChangeset for help on using the changeset viewer.