[SR-Users] Redirect Server Including Path/Recieved Information
Asgaroth
00asgaroth00 at gmail.com
Thu Jan 15 09:43:41 CET 2015
I just noticed a typo, the contacts should look like this:
what I end up with:
[a] Contact:
<sip:user at 192.168.1.1:12345;rinstance=ef7f216ba0d07156;transport=UDP*;received=sip:213.146.165.189:37891*>
what I am trying to achieve
[b] Contact:
<sip:user at 192.168.1.1:12345;rinstance=ef7f216ba0d07156;transport=UDP>*;received=sip:213.146.165.189:37891*
Thanks
On 15/01/2015 08:30, Asgaroth wrote:
> Hi All,
>
> Thanks for the responses thus far, I would be interrested in the
> patches mentioned when they are released for 4.2 :)
>
> In the meantime, I have another question relating to this configuration:
>
> [1] How would I apply the recieved paramaters to the contact header in
> the reply message, I have tried the following logic,
>
> if ( lookup("location", "sip:$rU at domain.com") ) {
> $var(received) = $(du{uri.param,received});
> if !strempty( $var(received) ) {
> $ru = $ru + ";received="+ $var(received);
> }
> sl_send_reply("302", "Moved Temporarily");
> exit;
> }
>
> and end up with a contact header looking like below:
>
> [a] Contact:
> <sip:user at 192.168.1.1:37891;rinstance=ef7f216ba0d07156;transport=UDP*;received=sip:213.146.165.189:37891*>
>
> What I am trying to achieve is:
>
> [a] Contact:
> <sip:user at 213.146.165.189:37891;rinstance=ef7f216ba0d07156;transport=UDP>*;received=sip:213.146.165.189:37891*
>
> Are these two versions of the contact header interpretted the same way?
>
> Thanks
>
>
>
> On 08/01/2015 21: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.
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150115/c956b706/attachment.html>
More information about the sr-users
mailing list