Hi,

On Wed, 10 May 2006, Saurav SAHU wrote:

Which sofia-sip tag does the application use to determine the selected codec as a result of the SOA media negotiation?

you'll have to check the whole SDP. The tags are SOATAG_USER_SDP() (parsed) and SOATAG_USER_SDP_STR() (raw text). These get you the whole negotiated local SDP. Then there're SOATAG_REMOTE_SDP*() to get the remote SDP.

For an example how to use it take a look at sofsip-cli/src/ssc_sip.c
and segments in comments marked with "SDP O/A":

- http://dev-126.openlaboratory.net/repos/sofsip-cli/src/ssc_sip.c

Sofsip-cli takes the _STR versions of local and remote SDP, and passes
these to the media implementation. The media implementation parses the SDP again (yep, a bit dumb, but I wanted to use ascii SDP in ssc_media.h
interface).

To see how to access the codec information from a parser SDP struct (sdp_session_t), check for instance ssc_media_farsight.c:priv_remote_sdp_codecs():

- http://dev-126.openlaboratory.net/repos/sofsip-cli/src/ssc_media_farsight.c

Basicly you can iterate through remote_sdp->sdp_media (media lines) and for each, sdp_media->m_rtpmaps has the codec information parsed for you (encoding name, clock rate, channels, params, etc).

If you need to convert from/to ascii and parsed SDP, there are lots of example both in sofia-sip's sdp documentation, and in sofsip-cli sources.

I am now wondering how to extract the one common codec selected by the sofia-sip stack so that I establish the media session between the 2 UA applications.

Hopefully the above helps to get you started. For example sofsip-cli's implementation for gstreamer is really, really simple. It only supports one codec, and requires negotiation to a single codec, so if the negotiation is succesful, you know which codec to use. :)

--
 under work: Sofia-SIP at http://sofia-sip.sf.net


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to