2009/4/29 Krishna Kishore G <gki...@gmail.com>: > Hi, > I am trying to build a b2bua using NTA. I need some clarifications > regarding the destroying of objects like nta_icoming etc. > For intial request i get a call back with irq,leg,sip > > For example: > > static int proxy_request(union proxy_or_domain *proxy, > nta_leg_t *leg, > nta_incoming_t *irq, > sip_t const *sip); > > > In the callback i will create a new leg(new_leg) for this request so > that can send new requests for the client using this leg. > I keep this leg until the dialog persists and call nta_leg_destroy(new_leg) > on newly created leg. > > What should I do with the objects that come as a part of callback? > a) Do I need to call nta_incoming_destroy(irq) immediately once I respond > with final response for this transaction > ex: nta_incoming_treply(irq,response_code,reason_phrase); > nta_incoming_destroy(irq);
Yes. Or in case of INVITE and 200 OK, you can keep original INVITE until you get ACKed. > b)Do Ineed destroy the nta_leg which i received in callback ? That is probably your default leg. Do not destroy it. -- Pekka.Pessi mail at nokia.com ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel