On 2/11/07, adi yoresh <[EMAIL PROTECTED]> wrote:
> I'm new to Sofia-SIP and I'm trying to figure out the flow within the stack.
>
> As I would like to build a SIP-Proxy on-top of the Sofia I used the
> test_proxy sample as a starting point.

> I have a few questions that I hope someone can answer:

> Where is the parsing takes place? I see that in agent_recv_message (nta.c)
> the message is already parsed? Does the parsing include the SDP also?

The tport module drives the parsing process. It receives data, creates
a msg_t object and calls msg_extract() and lets it parse the data. The
parsed message is then handed over to SIP protocol engine in nta.

> Is there a possibility to do partial parsing and NOT parse the entire
> message – this can improve the proxy performance.

It is possible. There is a parsing table structure called msg_mclass_t
that is given to nta when it is created. You can get the default
parsing table from sip_default_mclass() and then create an empty copy
with msg_mclass_clone(). You can and add the header classes you are
interested in to the mclass with msg_mclass_insert_with_mask() or
msg_mclass_insert().

If you do any performance comparisons, I'd be interested in your results.

> What call-backs can the application regsiter to :
>
> can I receive the packet after the parsing and before its passed to the nta?

Unfortunately no, at least at the moment. In principle you could
replace the tport_stack_class_t with your own (and then call the nta
class from there) but there is no  API for that yet.

-- 
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to