#2100 closed enhancement (fixed)
Move SRTP setting in PJSUA and PJSUA2 to account setting
Reported by: | nanang | Owned by: | bennylp |
---|---|---|---|
Priority: | normal | Milestone: | release-2.8 |
Component: | pjsua-lib | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: | no |
Description (last modified by nanang)
Currently 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:
- 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.
- 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.
Here are sample codes to enable DTLS-SRTP in outgoing SDP offer:
- using PJSUA:
acc_cfg.srtp_opt.keying_count = 2; acc_cfg.srtp_opt.keying[0] = PJMEDIA_SRTP_KEYING_DTLS_SRTP; acc_cfg.srtp_opt.keying[1] = PJMEDIA_SRTP_KEYING_SDES; // optional, as a fallback for handling incoming call using SRTP with SDES
- using PJSUA2:
acc_cfg.mediaConfig.srtpOpt.keyings.push_back(PJMEDIA_SRTP_KEYING_DTLS_SRTP); acc_cfg.mediaConfig.srtpOpt.keyings.push_back(PJMEDIA_SRTP_KEYING_SDES); // optional, as a fallback for handling incoming call using SRTP with SDES
Change History (6)
comment:1 Changed 7 years ago by nanang
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 7 years ago by nanang
- Description modified (diff)
comment:3 Changed 7 years ago by ming
In 5775:
comment:4 Changed 6 years ago by ming
In 5872:
comment:5 Changed 6 years ago by ming
In 5875:
comment:6 Changed 6 years ago by ming
In 5876:
Note: See
TracTickets for help on using
tickets.
In 5755: