[SR-Users] Redirect Server Including Path/Recieved Information

Daniel-Constantin Mierla miconda at gmail.com
Fri Jan 9 14:14:08 CET 2015


Hello,

I am not sure if path and received from location will be of any
information for the redirect. At least received is the proto, source and
port of incoming REGISTER. Then, the Path is to be used by location
server when forwarding requests.

Can you give more details of how path and received from location should
be used by the one receiving the 30x redirect?

Cheers,
Daniel

On 08/01/15 22:09, Asgaroth wrote:
> 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.
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda




More information about the sr-users mailing list