Hi, Win
The project fusionpbx-pilot: https://github.com/gnovit/fusionpbx-pilot uses selenium to access FusionPBX interface to make it as a python lib.
I think that the sponsor has a SAS API to offer.
On FusionPBX you can set variable rtp_secure_media on Agent Contact field.
Edit the Agent then click on < button at right side of contact field Add {rtp_secure_media=true} before user/...