On Nov 16, 2009 at 23:46, Juha Heinanen jh@tutpro.com wrote:
is there a flag that i can set before calling t_relay that causes t_relay not to try to create a new tcp connection to the destination if one does not already exist? this would be handy when t_relaying to registered tcp contacts.
From the script, use set_forward_no_connect() before t_relay().
If you want to do this from a module, then use: msg->fwd_send_flags |=SND_F_FORCE_CON_REUSE.
See also set_reply_no_connect(), set_forward_close() and set_reply_close() (they are documented in NEWS and thanks to Klaus also in http://sip-router.org/wiki/cookbooks/core-cookbook/devel).
Andrei