On 10/19/06, Chung Pak Lai <[EMAIL PROTECTED]> wrote:
> I am a newbie to Sofia-Sip and right now I am exploring the SDP/SOA model
> that Sofia-sip provides. After going through the documentation and trying
> different stuff, I  have  the following list of questions:
>
> 1. I am currently using the SOA model as a helper  in  which I pass in the
> remote sdp,  create a  user sdp and  call  soa_generate_answer to generate a
> local - sdp. However, I saw there are soa_activate and soa_deactivate
> functions in the SOA documentation, how should the functions  be used in Sip
> offer/answer protocol?

They have no effect on current SOA implementation. The purpose of
soa_activate() is to tell SOA object that the session is now active.
We plan to use them on some other media beside audio or video, like
MSRP or a COMEDIA  for instance. The SOA could establish a COMEDIA
connection when the soa_activate() is called.

> 2. Here is the message I received in my program
>
> Sender ---> Receiver (my program)
>
>     v=0
>     o=user1 53655765 2353687637 IN IP4 10.0.0.162
>     s=-
>     c=IN IP4 10.0.0.162
>     t=0 0
>     m=application 9 TCP/MRCPv2
>
>
>      to send back a response I used soa_set_params (...) with user sdp as
> "m=application 1002 TCP/VOIP\n",surprisingly the message gets modified as
> below
>
> Receiver--->Sender
>
>     v=0
>     o=- 7572928847019244131 4895308761159947024 IN IP4 10.0.0.127
>     s=-
>     c=IN IP4 10.0.0.127
>     t=0 0
>     m=application 0 TCP/MRCPv2 9

> My question is, why does the port number  change to 0 and  also I see there
> is an extra number "9" after the applicatioIf there was none in the offer, we 
> add "9" .n media  type ?

The offer contains just one media line, m=application 9 TCP/MRCPv2.
Your user SDP does not match with it, so SOA rejects the media. The
rejection is indicated by setting the port number to 0. The extra
number "9" is the media format: the SDP syntax requires that there
must be at least one media format on the media line. If there is
nothing, we just add "9".

The SDP which you receive is not syntactically valid, it misses the
media format. ... and it is -10 draft. Time to send some syntax police
to speechsc. ;)

Just for curiosity: what is the device that sends the offer?

But, I guess you should have user SDP like

m=application <server-port> TCP/MRCPv2
a=connection:new
a=setup:passive

and the SOA negotiation should work

If your application uses more than one MRCP connection per client, you
could try to modify sdp_media_match_with() in sdp/sdp.c so that it
regocnizes MRCPv2 and the a=resource under it.

> 3. Here is the way ,  I am using SOA, am I doing the right  things in the
> right order?
>
>
>             sdp_parser parser =
> sdp_parse(magic->home,sip->sip_payload->pl_data,
> strlen(sip->sip_payload->pl_data),       0);
>             sdp = sdp_session(parser);
>             soa_session_t *ss = soa_create("default", magic->root, magic);
>             soa_init_offer_answer(ss);
>             soa_set_params(ss, SOATAG_RTP_MISMATCH(0),
> SOATAG_RTP_SELECT(SOA_RTP_SELECT_COMMON),
> SOATAG_AUDIO_AUX("telephone-event"), TAG_END());
>             soa_set_remote_sdp(ss, sdp, sip->sip_payload->pl_data,
> strlen(sip->sip_payload->pl_data));
>            const char *user_sdp_msg = "m=application 1002 TCP/VOIP\n";
>             soa_set_user_sdp(ss, NULL, user_sdp_msg, strlen(user_sdp_msg));
>                     soa_generate_answer(ss, NULL);
>             const char *msg;
>             const sdp_session_t *sdp2;
>             unsigned int len;
>             soa_get_local_sdp(ss, &sdp2, &msg, &len);

Yes, that looks right.

> 4. After going over the documentation, I am not quite sure how to use SOA in
> my application.  can you provide me of any examples that shows a way of
> using the SOA API, I have spent time looking at soa_test.c, do you have any
> other pointers ?

I'm afraid the other examples are just inside nua_session.c and it is
quite obfuscated... ;-/

-- 
Pekka.Pessi mail at nokia.com

-------------------------------------------------------------------------
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
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to