PJSIP TLS SRTP not working with trunks

I’m running Distro 14, with Asterisk 15.1.3.
Pjsip version: 2.6

TLS/SRTP works fine with all extensions (they are all pjsip).
Tried to configure my TLS trunk with Twilio and so far no luck. Twilio complains that the channel doesn’t have SRTP (which is true).

I tried adding this to pjsip.endpoint_custom.conf

[Twilio-TLS]+
media_encryption=sdes

But it had no effect.
Some guidance please?

Have you tried with CHAN_SIP?

No, I built this new system specifically to convert everything over to pjsip. Many reasons, better NAT support, simpler firewall configuration.
Everything works expect for this one thing.

We’ll, if you can get it working with Chan_sip then it’s either a misconfiguration with pjsip or a bug.

I think I have it working. I’m still going over the wireshark logs to verify.

pjsip.endpoint_custom_post.conf

[Twilio-TLS](+)
media_encryption=sdes