2008/12/22 Aleksander Morgado <sofia-sip-de...@aleksander.es>:
> I need to make SIP message forwarding in a stateful NTA, but not sure
> which is the correct way to do it. I receive the incoming transaction
> in the default leg, but how do I forward the SIP message to another
> user? Do I need to create an outgoing transaction with
> nta_outgoing_tcreate() to perform the forwarding? That seems
> complicated, as I would need to put the same input headers in the new
> outgoing transaction...

You should make a copy of your msg_t (w/ msg_copy() and call
nta_outgoing_mcreate() with the copy.

> Is it easier to do the forwarding using an stateless callback to get
> the input msg_t and just call nta_msg_tsend()?

That does not create a transaction, so you might have problems if the
sent request gets lost.

You should have a peek on simple proxy from <tests/test_proxy.c>. That
does not have the hard parts (like, forking), however...

-- 
Pekka.Pessi mail at nokia.com

------------------------------------------------------------------------------
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to