Hi Pete, Hi Pete, 2010/8/7 Pete Kay <pete...@gmail.com>: >> Do you have multiple nta_agent_t instances running, or how do you >> handle the UAS side? What kind of task you plan to implement in the >> cloned task, some kind of db lookup?
> Yes, I am using DB to store routing information. Have you considered using su_msg_send() and su_msg_reply() to talk with the DB thread instead of multi-threaded agent? Please note that while nta functions are thread-safe, the nta objects are not. >> If you want to see later messages from UAC, you need to insert a >> Record-Route header into the request which you forward towards the >> UAS. > > I am looking at > http://sofia-sip.sourceforge.net/refdocs/sip/group__sip__record__route.html > which shows how to creat a record_route structure. How do I add it to > the outgoing sip message? Which api should I use? That depends on how you plan to do the forwarding. E.g., sip_record_route_t *rr = sip_record_route_format(msg_home(msg), ...); msg_header_insert(mg, NULL, (msg_header_t *)rr); > Also, should I store both UAC-related RR and UAS-related RR in the > RR-URI's user part? User part is easiest, I think. > In the hash table you suggested, should I use an UUID to represent > each leg ( one for UAC and the other one for UAS) and then store the > leg corrspond to each UUID? I would not use legs: if you process same request twice (say, one of your users forwards his calls to another user) the legs cannot make difference between loops. I'd process each incoming request either statelessly or with default leg, and look for the UUID from the topmost route. > Also, I don't understand why it matter whether I am using one or two > nta_agent_t. I still need two UUID ( one for each leg ) regardless of > whether I use one or two nta_agent_t right? Or am I missing > something? Well, in principle you could do with one UUID and RR if you used one agent. >> You have to remove the resulting Route headers when processing the >> later messages, too. > > Which API can I use to remove the Route header and when you say later > messages, what are you referring to? When should the Route header be > removed? The RFC 3216 sections 16.4 and 16.12 describes how the Route header should be processed. Basically, when you receive a request with Route header, you should forward request based on topmost Route instead of request-URI. If topmost Route URI belongs to your proxy, you remove it. The lr URI parameter complicates matters, however. -- Pekka.Pessi mail at nokia.com ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel