[asterisk-dev] pjsip asterisk 13.24: sips / srtp and Deutsche Telekom doesn't work because of missing mediasec parameters

Joshua C. Colp jcolp at digium.com
Fri May 31 04:34:08 CDT 2019


On Fri, May 31, 2019, at 3:38 AM, Michael Maier wrote:
> On 30.05.19 at 10:24 Michael Maier wrote:
> [...]
> > Another yet missing point is the qualify OPTIONS package. I'm not sure where to add the mediasec headers exactly (which function?). At the
> > moment, the Response after OPTION request is (if already registered):
> > 
> > SIP/2.0 494 Security Agreement Required
> > CSeq: 21671 OPTIONS
> > Security-Server: msrp-tls;mediasec
> > Security-Server: sdes-srtp;mediasec
> > Security-Server: dtls-srtp;mediasec
> > 
> > If you are not already registered, you get a 403 Forbidden.
> 
> I managed to add the necessary headers statically in
> sip_options_qualify_contact() and they are working as expected. But this 
> isn't a good solution. I would like to handle those additions 
> dynamically like that:
> 
> - sending the usual OPTIONS request
> - acting on the 494 Security Agreement Required response
> - resend the correct OPTIONS request
> 
> Where is the OPTIONS response handled (from a client view) - means, 
> where can I check the response code and act on it?

The qualify_contact_cb function is called in res/res_pjsip/pjsip_options.c on received responses. It doesn't currently examine or care about the response so you would have to figure out how (I don't recall off the top of my head) and do what is needed.

-- 
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list