Hi Pekka,



________________________________
From: Pekka Pessi <ppe...@gmail.com>
To: Arsen Chaloyan <achalo...@yahoo.com>
Cc: Jarod Neuner <j.neu...@networkharbor.com>; Boris Ouretskey 
<borisu...@gmail.com>; "sofia-sip-devel@lists.sourceforge.net" 
<sofia-sip-devel@lists.sourceforge.net>
Sent: Mon, January 10, 2011 2:05:03 PM
Subject: Re: [Sofia-sip-devel] Parsing OPTIONS SDP body

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(), RFC 3261 section 11, nua_i_options 
>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.

Well, I didn't notice before that the SDP message can be retrieved through the 
sip->sip_payload field. This is exactly what we need.


> I'm just curious, what you plan to do with SDP returned by OPTIONS reply? 
>Initiate re-INVITE if needed?

In the MRCPv2 specification, the SIP OPTIONS method is used for resource 
discovery.
http://tools.ietf.org/html/draft-ietf-speechsc-mrcpv2-22#section-7

This way an MRCP client (SIP uac) can learn the capabilities of the MRCP 
servers 
(SIP uas) it's supposed to work with. 


Thanks,
Arsen

www.unimrcp.org



--Pekka

-- 
Pekka.Pessi mail at nokia.com
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
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

Reply via email to