Ignore:
Timestamp:
Mar 15, 2018 3:00:59 AM (7 years ago)
Author:
nanang
Message:

Close #2100:

  • Added new APIs:
    • PJMEDIA: pjmedia_srtp_enum_crypto(), pjmedia_srtp_enum_keying()
    • PJSUA: pjsua_config.srtp_opt, pjsua_acc_config.srtp_opt, pjsua_srtp_opt_default()
    • PJSUA2: AccountMediaConfig::srtpOpt, Endpoint::srtpCryptoEnum()
  • Deprecated PJSUA callback on_create_media_transport_srtp() (not removed yet, just warnings).
  • Slightly refactored SRTP code:
    • Fixed potential issue with on_create_media_transport_srtp(), some PJSUA internal values in pjmedia_srtp_setting may be overridden by app.
    • Fixed few issues in SRTP and keying mechanism, e.g: premature local SDP modification (it should be done after verification).
    • Potential minor backward compatibility issue: default value of pjmedia_srtp_setting.crypto_count is now zero, previously it was initialized with all crypto via pjmedia_srtp_setting_default(), actually zero and all cryptos in this setting semantically are the same.
File:
1 edited

Legend:

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

    r5746 r5755  
    10111011} 
    10121012 
    1013 /* 
    1014  * This callback is called when media transport SRTP needs to be created. 
    1015  */ 
    1016 static 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  
    10321013#ifdef TRANSPORT_ADAPTER_SAMPLE 
    10331014/* 
     
    13631344    app_config.cfg.cb.on_snd_dev_operation = &on_snd_dev_operation; 
    13641345    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; 
    13671346#ifdef TRANSPORT_ADAPTER_SAMPLE 
    13681347    app_config.cfg.cb.on_create_media_transport = &on_create_media_transport; 
Note: See TracChangeset for help on using the changeset viewer.