We’ve been calling out from Twilio to our asterisk (v13.13-cert4, pjsip v2.5.5) via SIP (non-TLS) with great luck. I’m now working on trying to get secure trunking turned on, and am pulling my hair out trying to get Twilio and Asterisk to play nice.
When I attempt a call with pjsip debugging turned on, I do see SIP traffic on the asterisk console, but it ends up throwing this error:
<--- Transmitting SIP response (864 bytes) to TLS:54.172.60.1:44591 --->
SIP/2.0 488 Not Acceptable Here
I’ve followed Twilio’s documentation on this topic, but it is clearly incomplete or outright incorrect. Their support are not proving helpful either, as they insist that their documentation is correct.
I’ll take any pointers you’ll throw my direction. Thanks!
I’ve wondered if it would be worth switching to chan_sip temporarily to see if this is some odd interaction between Twilio’s SIP+TLS implementation and PJSIP.
If it was SDES then it would be RTP/SAVP instead of RTP/AVP, and there would be an a=crypto line which contains the SDES key information to use for the encryption.
Well, for those that stumble upon this in the future, I was not able to resolve the problem with PJSIP. I switched “back” to chan_sip and secure calling from Twilio started working immediately.
Sorry for not responding, this fell off my list. The core code we use is the same between chan_sip and chan_pjsip, and your configuration is correct so it is concerning it did not work there. We also have pretty thorough test coverage so it may be something specific with Twilio. Can you file an issue[1] and attach your config and the SIP log so we can investigate and ensure we have a test case?