Hello, I'm using OpenSER to make load balancing among a bunch of Asterisk boxes. I whipped up a very simple script that works:
# module stuff goes before here route{ if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); break; }; if (msg:len >= 2048 ) { sl_send_reply("513", "Message too big"); break; };
route(1); break; }
route[1] { exec_dset("/usr/local/bin/selectserver.sh"); if (!t_relay()) { sl_reply_error(); }; }
selectserver.sh alters the server in the destination URI to choose from a dynamic pool of servers that's always changing according to a funky proprietary logic of ours. This works just peachy. The problem is OpenSER stays as man-in-the-middle all the time. I'd like it to do a REFER to a random server of our choosing and stay out of the loop from there on. How could I do that?