Changes between Initial Version and Version 2 of Ticket #2100


Ignore:
Timestamp:
Mar 26, 2018 11:04:20 AM (6 years ago)
Author:
nanang
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2100

    • Property Status changed from new to closed
    • Property Resolution changed from to fixed
  • Ticket #2100 – Description

    initial v2  
    11Currently SRTP crypto and keying method is configurable via callback, i.e: {{{on_create_media_transport_srtp()}}} in PJSUA or {{{onCreateMediaTransportSrtp()}}} in PJSUA2 (only crypto). And after some review and internal discussions, we decided to deprecate the callback and move the settings to account config, here are some reasons: 
    22 - SRTP setting type used in callback param is {{{pjmedia_srtp_setting}}}, which has some fields that are PJMEDIA specifics, e.g: {{{close_member_tp, cb, user_data}}}. So this ticket will also create a new SRTP settings specifically for PJSUA and PJSUA2. 
    3  - other media transports are configurable via account setting (instead of PJSUA/PJSUA2 callback). 
     3 - media transport settings are usually configurable via account setting (instead of PJSUA/PJSUA2 callback), so it'd better to use the same pattern for SRTP. 
     4 
     5Here are sample codes to enable DTLS-SRTP in outgoing SDP offer: 
     6 - using PJSUA: 
     7   {{{ 
     8    acc_cfg.srtp_opt.keying_count = 2; 
     9    acc_cfg.srtp_opt.keying[0] = PJMEDIA_SRTP_KEYING_DTLS_SRTP; 
     10    acc_cfg.srtp_opt.keying[1] = PJMEDIA_SRTP_KEYING_SDES; // optional, as a fallback for handling incoming call using SRTP with SDES 
     11   }}} 
     12 - using PJSUA2: 
     13   {{{ 
     14acc_cfg.mediaConfig.srtpOpt.keyings.push_back(PJMEDIA_SRTP_KEYING_DTLS_SRTP); 
     15acc_cfg.mediaConfig.srtpOpt.keyings.push_back(PJMEDIA_SRTP_KEYING_SDES); // optional, as a fallback for handling incoming call using SRTP with SDES 
     16   }}}