Hi Pete, 2010/7/30 Pete Kay <pete...@gmail.com>: > In my request_handler, I am creating a new cloned_task upon receiving > of INVITE from uac. I am using this cloned_task to create a leg to > talk to the uas and forward the INVITE to the uas.
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? > When I get another message from uac, such as ACK, how can I reuse the > same cloned task and the same leg that was previously created or I > should recreate it for ACK as well? 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. > Where can I store the cloned task and the nta_leg_t object and have it > be reused for the next message received from the same UAC? The problem with legs is that you have no control on Call-ID and From/To tags, they are chosen by UAC/AUS. Also, a dialog may loop through your proxy multiple times. It is better to insert a Record-Route URL that you can use to lookup the dialog and the associated state from some kind of hash table. (E.g., insert a hashed identifier of your dialog in user-part of the RR URI, use that to lookup from the hash table). If the RR points to different nta_agent_t instances, you need to insert two Record-Route headers, one used by UAC, another by UAS. With two Record-Route headers you can also easily make difference between requests sent by original UAC and UAS. You have to remove the resulting Route headers when processing the later messages, too. -- 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