[OpenSIPS-Users] UAC_REDIRECT : get_redirects does not rewritehost

Julien Chavanton jc at atlastelecom.com
Thu Aug 13 22:25:02 CEST 2009


I have activated full debug mode, sort_contacts() seems to find the host somewhere else ?
Maybe this will help you understand what is going on
 
 
#
U 10.0.1.73:57226 -> 10.0.5.10:5060
SIP/2.0 302 Moved Temporarily.
Via: SIP/2.0/UDP 10.0.5.10;branch=z9hG4bK2714.0ee86a21.0.
Via: SIP/2.0/UDP 10.0.1.73:57226;received=10.0.1.73;branch=z9hG4bK-d8754z-7048034193434959-1---d8754z-;rport=57226.
Contact: <sip:new_target at 10.0.1.1:5060>.
To: "777"<sip:777 at osip.domain.com>;tag=944d064a.
From: "777"<sip:777 at osip.domain.com>;tag=d650bd17.
Call-ID: YmI3ZmQ0Mzk2MDE3OGY0M2FlNjVkNGVlY2EwZmI5NzM..
CSeq: 1 INVITE.
User-Agent: X-Lite release 1103d stamp 53117.
Content-Length: 0.

 
Aug 13 21:23:27 osip /usr/local/sbin/opensips[16925]: ***FAILURE ROUTE - REDIRECT ru[sip:777 at 10.0.1.73:57226;rinstance=c699f35c276783d3]** 
Aug 13 21:23:27 osip /usr/local/sbin/opensips[16925]: DBG:uac_redirect:get_redirect: resume branch=0 
Aug 13 21:23:27 osip /usr/local/sbin/opensips[16925]: DBG:uac_redirect:get_redirect: checking branch=0 (added=0) 
Aug 13 21:23:27 osip /usr/local/sbin/opensips[16925]: DBG:uac_redirect:get_redirect: branch=0 is a redirect (added=0) 
Aug 13 21:23:27 osip /usr/local/sbin/opensips[16925]: DBG:uac_redirect:sort_contacts: sort_contacts: <sip:new_target at 10.0.1.73:57226> q=10 
Aug 13 21:23:27 osip /usr/local/sbin/opensips[16925]: DBG:uac_redirect:shmcontact2dset: adding contact <sip:new_target at 10.0.1.73:57226> 
Aug 13 21:23:27 osip /usr/local/sbin/opensips[16925]: DBG:core:parse_headers: flags=78 
Aug 13 21:23:27 osip /usr/local/sbin/opensips[16925]: ACC: request accounted: timestamp=1250195007;method=INVITE;from_tag=d61cb370;to_tag=;call_id=NDA2ZmI4YmNmMjJmMGNjYjI4YjUxODUyNTNkZmUyNzQ.;code=;reason=redirect 
Aug 13 21:23:27 osip /usr/local/sbin/opensips[16925]: ***FAILURE ROUTE - REDIRECTED TO: sip:new_target at 10.0.1.73:57226]** .

 

________________________________

From: users-bounces at lists.opensips.org on behalf of Julien Chavanton
Sent: Thu 13/08/2009 6:43 PM
To: OpenSIPS users mailling list; OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] UAC_REDIRECT : get_redirects does not rewritehost


Hi Bogdan, 
 
version: opensips 1.5.1-notls (x86_64/linux) 
 
failure_route[1] {
        sip_trace();
         if (t_check_status("302")) {
                xlog("L_NOTICE", "***FAILURE ROUTE - REDIRECT ru[$ru]**\n");
                get_redirects("6:2","redirect");
                xlog("L_NOTICE", "***FAILURE ROUTE - REDIRECTED TO: $ru]**\n");
                t_relay();
        }
}
 
Aug 13 18:44:17 osip /usr/local/sbin/opensips[16565]: ***FAILURE ROUTE - REDIRECT ru[sip:777 at 10.0.1.73:57226;rinstance=c699f35c276783d3]** 
Aug 13 18:44:17 osip /usr/local/sbin/opensips[16565]: ***FAILURE ROUTE - REDIRECTED TO: ru[sip:new_target at 10.0.1.73:57226]**
 

________________________________

From: users-bounces at lists.opensips.org on behalf of Bogdan-Andrei Iancu
Sent: Thu 13/08/2009 6:29 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] UAC_REDIRECT : get_redirects does not rewrite host



Hi Julien,

The get_redirects() function does replace the entire RURI with the
contact URI. My feeling is you (by mistake) rewrite the domain part
after the new RURI is set - try printing the RURI just after the
get_redirects() function.

BTW, what version of opensips are you using?

Regards,
Bogdan

Julien Chavanton wrote:
> I am looking to handle redirect 302 request, get_redirect does not
> replace the domain/host part of the new target ?
> 
> How do we handle redirection to a different IP address ?
> 
> 
> Example :
> 
> U 10.0.4.44:5060 -> 10.0.1.73:57226
> INVITE sip:777 at 10.0.1.73:57226;rinstance=c699f35c276783d3 SIP/2.0.
> 
> U 10.0.1.73:57226 -> 10.0.4.44:5060
> SIP/2.0 302 Moved Temporarily.
> Contact: <sip:new_target at 10.0.1.1:5060>.
> 
> U 10.0.4.44:5060 -> 10.0.1.73:57226
> INVITE sip:new_target at 10.0.1.73:57226 SIP/2.0.
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090813/dca63f4a/attachment.htm 


More information about the Users mailing list