Hello,
On 03/28/2016 02:39 PM, Marrold wrote:
I'd like to use the Dispatcher Module along with 30X redirects, to monitor gateway availability with SIP options and to provide redundancy / fail over.
Some sources online suggest it's as easy as -
if ( method=="INVITE" ) { dst_select_domain("1","4"); sl_send_reply("300","Redirect"); exit; }
However when the 30X reply is sent, it contains no contact header.
Please could someone advise if it's possible to use the Dispatcher module with 302 redirects, and what they syntax is?
The core functionality provided by the dispatcher module is simplify to modify the request URI ($ru) (ds_select_domain()) or the destination set ($du) (ds_select_dst()).
Thus, after running the operation, you would append the Contact yourself:
ds_select_domain("1", "4"); append_to_reply("Contact: <$ru>\r\n"); sl_send_reply("300", "Redirect");
-- Alex