Hi Bogdan, I installed a test server with 1.5.1 1.5.2 and the SVN I have the same behavior, where the IP adress is not taken from the contact header but from somewhere else (maybe the VIA hdr) The setup I have in my lab : X-Lite(caller computer) and another X-Lite(called computer). I set X-Lite(called computer), to forward the call to another target [email protected] for example. Maybe I should test with gateway instead of registered phones. Regards
________________________________ From: [email protected] on behalf of Bogdan-Andrei Iancu Sent: Fri 14/08/2009 8:51 AM To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] UAC_REDIRECT : get_redirects doesnot rewritehost Hi Julien, Could you please try the latest 1.5 from SVN (1.5.2) ? I remember there were some fixes in the uac_redirect part and I want to be sure we are not troubleshooting it again. What is really strange is that the IP in the printed contacts is actually the IP + port from VIA hdr :-/.. If upgrading is an issue for you, I can prepare some debuging patch to print more stuff and to see where the change comes from. Regards, Bogdan Julien Chavanton wrote: > 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:[email protected]:5060>. > To: "777"<sip:[email protected]>;tag=944d064a. > From: "777"<sip:[email protected]>;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:[email protected]: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:[email protected]:57226> q=10 > Aug 13 21:23:27 osip /usr/local/sbin/opensips[16925]: > DBG:uac_redirect:shmcontact2dset: adding contact > <sip:[email protected]: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:[email protected]:57226]** . > > > ------------------------------------------------------------------------ > *From:* [email protected] 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:[email protected]:57226;rinstance=c699f35c276783d3]** > Aug 13 18:44:17 osip /usr/local/sbin/opensips[16565]: ***FAILURE ROUTE > - REDIRECTED TO: ru[sip:[email protected]:57226]** > > > ------------------------------------------------------------------------ > *From:* [email protected] 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:[email protected]: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:[email protected]:5060>. > > > > U 10.0.4.44:5060 -> 10.0.1.73:57226 > > INVITE sip:[email protected]:57226 SIP/2.0. > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Users mailing list > > [email protected] > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
