On Monday 24 February 2014 14:00:01 Mike Claudi Pedersen wrote:
i want to setup a test environment to see how kamailio handles redirection. i want to be able to reroute calls between servers, where do i insert the configuration for this?
A redirect is acomplished by manipulating $ru (or its parts $rU/$rd/...) and instead of relaying the request (t_relay()) sending a 302 Redirect (send_reply("302", "Redirect")). This has to be handled from the request_route.
can i append a list of user and destination to make the configuration go through, to see where the call is going?
You could use the alias_db module http://www.kamailio.org/docs/modules/4.1.x/modules/alias_db.html
request_route { #do stuff
if(alias_db_lookup("dbaliases")) { send_reply("302", "Redirect"); } else { send_reply("404", "Unknow destination"); }
exit; }