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? can i append a list of user and destination to make the configuration go through, to see where the call is going?
im new at kamailio, and im having a really hard time finding the right documentation to support a redirect server.
could somone please give me an example?
lets say i have 3 user 1000 1001 1002
and they are at 3 different servers eg. 1000@192.168.1.10 1001@192.168.1.11 1002@192.168.1.12
then i call user 1002 from user 1000, through the kamailio redirect server, which redirects to corresponding servers.
Mike Claudi Pedersen
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; }