[SR-Users] Redirect Server Including Path/Recieved Information
Asgaroth
00asgaroth00 at gmail.com
Thu Jan 8 22:09:36 CET 2015
Hi All,
I am attempting to setup a standalone redirect server which will lookup
contact info and redirect to appropriate outbound proxy.
The problem I am having is that the registrar is storing the path and
recieved information, however, when I perform a lookup and reply with
302, the recieved and path information is not included.
Are there module parameters in the registrar module that will include
these contact parameters (recieved) or create the appropriate headers
(path/route) in the 302 response, or, is this something I need to do
manually.
Currently I have the following lookup code:
route {
t_check_trans();
if ( method == "INVITE" ) {
xlog("route[MAIN] : $rm : ruri=$ru");
xlog("route[MAIN] : $rm : lookup=sip:$rU at registered.domain");
if ( lookup("location", "sip:$rU at registered.domain") ) {
send_reply("302", "Moved Temporarily");
exit;
}
}
}
I had a look at the path_mode parameter but this looks like it only
takes affect for REGISTER methods.
The INVITE that comes in supports the PATH header but I dont see this
being passed back. In fact, I'm not entirely sure if the path header is
a supported header in the 302 response message. I had a quick google and
I cant seem to easily find what headers are suported in the 302 message,
and where I need to put the path/recieved information. I presume I can
add the recieved info as a parameter to the contact header, but how
would i specify the outbound proxy to use, would that be in a route or a
path header in the 302 response?
I can see that the $du pseudo variable is set with the appropriate
outbound path and received information, now I just need to include this
information in the 302 response.
Any suggestions/comments to assist in how I get this info into the 302
message would be greatly appreciated.
Thanks in advance.
More information about the sr-users
mailing list