[OpenSER-Users] OpenSER 1.2.2 and 302 Moved, funny log issue?

Zahid Mehmood zm23 at columbia.edu
Wed Feb 27 21:51:02 CET 2008


Hi,
    If get_redirect() is already pushing the contacts as branches,  
then what is the purpose /  benefit / drawback of doing something like  
this:

taken from sipwise online config:

         if(!get_redirects("1:1"))
         {

             xlog("L_ERROR", "Failed to fetch contact '$ct' from  
301/302 - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
             acc_db_request("480", "acc");
             t_reply("480", "Temporarily Unavailable");
             exit;
         }
         # get last URI from destination-set and set it as R-URI
         avp_delete("$avp(s:tmp)/g");
         $avp(s:tmp) = $ds;
         avp_subst("$avp(s:tmp)", "/.*(sip:.+@[^:;>]+).*$/\1/");
         avp_pushto("$ru", "$avp(s:tmp)");


I'd greatly appreciate your answers as they will help me better  
understand the use of branches/destination set.

Thanks.

-- 
Zahid


On Feb 25, 2008, at 7:04 AM, Bogdan-Andrei Iancu wrote:

> Hi Tobias,
>
> get_redirects() already pushes the contacts as branches, so I'm afraid
> you cannot change them anymore.....
> And even if you try yo change the 3xx reply in on_reply route (before
> failure route), the changes will not be vizible in failure route...
>
> Regards,
> Bogdan
>
> Tobias Lindgren wrote:
>> Hello,
>>
>> yes I'm using that one. What I'm trying to do is to rewrite the
>> hostpart of the URI after doing get_redirects, but preferrably only
>> after 302s with a special number.
>>
>> Br,
>> /Tobias
>>
>> Bogdan-Andrei Iancu said the following on 2008-02-19 17:00:
>>> Hi Tobias,
>>>
>>> Have you looked at the uac_redirect module first?
>>>
>>> Regards,
>>> Bogdan
>>>
>>> Tobias Lindgren wrote:
>>>> Bogdan,
>>>>
>>>> can you please hint me of a way to make decisions with the
>>>> information in the 302? Could I use the "on_reply"-route for this  
>>>> or
>>>> am I still only re-processing INVITEs there aswell?
>>>>
>>>> Br,
>>>> /Tobias
>>>>
>>>> Tobias Lindgren said the following on 2008-02-15 15:28:
>>>>> Hi Bogdan,
>>>>>
>>>>> cool, didn't know that, thanks!
>>>>>
>>>>> Br,
>>>>> /Tobias
>>>>>
>>>>> Bogdan-Andrei Iancu said the following on 2008-02-15 15:26:
>>>>>> Hi Tobias,
>>>>>>
>>>>>> It is nothing bogus or funny :)...
>>>>>>
>>>>>> Shortly, in failure route, you re-process the original INVITE  
>>>>>> (and
>>>>>> not the reply that trigger the route). So you will see the source
>>>>>> ip of the request ;).
>>>>>>
>>>>>> For more on this, see the admin training material :
>>>>>>    http://www.voice-sistem.ro/downloads/2007.08.29-Admin-Course/
>>>>>>
>>>>>> Regards,
>>>>>> Bogdan
>>>>>>
>>>>>> Tobias Lindgren wrote:
>>>>>>> Hi there,
>>>>>>>
>>>>>>> I was trying to do this in OpenSER 1.2.2:
>>>>>>> failure_route[1] {
>>>>>>>  if (t_check_status("302")){
>>>>>>>      xlog("L_ERR", "302 source ip address is $si");
>>>>>>>    if (src_ip == 192.168.5.1) {
>>>>>>>        # Do something
>>>>>>>    };
>>>>>>>  };
>>>>>>> };
>>>>>>>
>>>>>>> But the proxy sending the 302 (192.168.5.1) is not the one who
>>>>>>> ends up in my logs, instead my sip-server (192.168.1.1) who
>>>>>>> initiated the call ends up in the log.
>>>>>>>
>>>>>>> "302 source ip address is 192.168.1.1".
>>>>>>>
>>>>>>> Have I understood the "$si" psuedo variable wrong? Can I find  
>>>>>>> the
>>>>>>> correct source address of the 302-message somehow?
>>>>>>>
>>>>>>> Br,
>>>>>>> /Tobias
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Users mailing list
>>>>>>> Users at lists.openser.org
>>>>>>> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users





More information about the Users mailing list