Hi Arsen, 2011/1/4 Arsen Chaloyan <achalo...@yahoo.com>
> Let me clarify this a bit. > > The response to the SIP OPTIONS request does contain an SDP message and > it's clear how it should be parsed in general. The question is how to > retrieve the SDP message included in the response to the SIP OPTIONS request > using nua API in particular. > > nua_options() is used to send requests, while nua_r_options is intended to > be used to handle the responses. The nua documentation states > > http://sofia-sip.sourceforge.net/refdocs/nua/nua_8h.html#abca36033336ce16e538a279413d2ca51a379a42069d0268db014b5d3bb5d40112 > > *nua_r_options* > > Answer to outgoing OPTIONS. > *Parameters:* > *status* response status code (if the request is retried the *status* is > 100 and the *sip->sip_status->st_status* contain the real status code from > the response message, e.g., 302, 401, or 407) > *phrase* a short textual description of *status* code > *nh* operation handle associated with the incoming OPTIONS request > *hmagic* application context associated with the handle > *sip* response to OPTIONS request or NULL upon an error (status code is in > *status* and descriptive message in *phrase* parameters) > *tags* empty *See > also:*nua_options()<http://sofia-sip.sourceforge.net/refdocs/nua/nua_8h.html#a8f5c7d4da3868ee1131dd1f760aef36d>, > RFC 3261 <http://www.faqs.org/rfcs/rfc3261.html> section 11, > nua_i_options<http://sofia-sip.sourceforge.net/refdocs/nua/nua_8h.html#abca36033336ce16e538a279413d2ca51a9333c2fe86eae2a33d472e0e84445303> > All is good. However, as you can see, the tags are always empty and this is > the problem. As a workaround, instead of nua, it's certainly possible to use > nta directly... > Sofia-SIP does not parse the body in the OPTIONS reply, because it is not supposed to change the session state. Instead you can find the SDP payload in the sip->sip_payload field in nua_r_options event. Like Jarod said, you can parse the SDP in your application using the sdp module. I'm just curious, what you plan to do with SDP returned by OPTIONS reply? Initiate re-INVITE if needed? --Pekka -- Pekka.Pessi mail at nokia.com
------------------------------------------------------------------------------ Gaining the trust of online customers is vital for the success of any company that requires sensitive data to be transmitted over the Web. Learn how to best implement a security strategy that keeps consumers' information secure and instills the confidence they need to proceed with transactions. http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel