[OpenSIPS-Users] 302 handling

Bogdan-Andrei Iancu bogdan at voice-system.ro
Sun Aug 17 20:16:11 CEST 2008


Hi Alex,

Actually, after the get_redirects(), you should not do a rewiteXXXX() - 
just to t_relay(); the get_redirects() already populates the new branch 
with all the information.

Regards,
Bogdan

Ovidiu Sas wrote:
> If you want to rewrite the port, you need to use the following syntax:
> rewritehostport("XXX.XXX.XXX.XXX:ZZZZZ");
> where ZZZZZ is the new port.
>
>
> Regards,
> Ovidiu Sas
>
> On Wed, Aug 13, 2008 at 4:54 PM, Alex G <greekman0000 at gmail.com> wrote:
>   
>> unfortunately the solution is a bit vague for what I'm trying to do...
>>
>>
>> in the 302 packet the contact for redirect is sip xyz at abc.abc.abc.abc
>>
>> failure_route[1] {
>>     if (t_check_status("302")) {
>>     xlog("in redirect failure $fu");
>>      get_redirects("*:1","redirect");
>>       rewritehostport("XXX.XXX.XXX.XXX");
>>      t_relay();
>>     }
>>
>> this should take the contact address and rewrite the host port for it
>> relaying it to the new location right? should be an immediate invite to
>> abc at XXX.XXX.XXX.XXX
>>
>> unfortunately it doesn't rewrite the host port. It merely relays directly to
>> the contact in the 302 packet xyz at abc.abc.abc.abc
>>
>> any ideas would be welcome :)
>>
>> thanks
>>
>> alex
>>
>> On Wed, Aug 13, 2008 at 2:38 PM, Ovidiu Sas <osas at voipembedded.com> wrote:
>>     
>>> It is all here:
>>> http://www.opensips.org/html/uac_redirect.html#id2519995
>>>
>>> Regards,
>>> Ovidiu Sas
>>>
>>> On Wed, Aug 13, 2008 at 2:03 PM, Alex G <greekman0000 at gmail.com> wrote:
>>>       
>>>> I know there was some stuff about how to handle 302s and send forward a
>>>> new
>>>> invite to the diversion contact on the old mailing list archives, but
>>>> they
>>>> are all gone now :(
>>>>
>>>> wondering if anyone can help me with this.....
>>>>
>>>> opensips -> ua -> moved -> opensips invite contact from diversion
>>>>
>>>>
>>>>
>>>> basically opensips makes an invite to locally registered uac, the uac
>>>> redirects to an external pstn number XXX-XXX-XXXX, opensips then needs
>>>> to
>>>> handle the 302 and generate an invite to XXX-XXX-XXXX
>>>>
>>>>
>>>> any help would be most appreciated
>>>>
>>>> thanks Alex
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>>         
>>     
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   




More information about the Users mailing list