<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi, <br>
<br>
You can use this, basically taken from the default OpenSIPS
script - at the end of the route check the "rewritehostport" : <br>
<br>
####### Routing Logic ########<br>
<br>
# main request routing logic<br>
<br>
route{<br>
if (!mf_process_maxfwd_header("10")) {<br>
sl_send_reply("483","Too Many Hops");<br>
exit;<br>
}<br>
<br>
if (has_totag()) {<br>
# sequential request withing a dialog should<br>
# take the path determined by record-routing<br>
if (loose_route()) {<br>
if (is_method("INVITE")) {<br>
# even if in most of the cases is
useless, do RR for<br>
# re-INVITEs alos, as some buggy
clients do change route set<br>
# during the dialog.<br>
record_route();<br>
}<br>
<br>
# route it out to whatever destination was
set by loose_route()<br>
# in $du (destination URI).<br>
t_relay();<br>
exit;<br>
} else {<br>
if ( is_method("ACK") ) {<br>
if ( t_check_trans() ) {<br>
# non loose-route, but
stateful ACK; must be an ACK after <br>
# a 487 or e.g. 404 from
upstream server<br>
t_relay();<br>
exit;<br>
} else {<br>
# ACK without matching
transaction -><br>
# ignore and discard<br>
exit;<br>
}<br>
}<br>
sl_send_reply("404","Not here");<br>
}<br>
exit;<br>
}<br>
<br>
# CANCEL processing<br>
if (is_method("CANCEL"))<br>
{<br>
if (t_check_trans())<br>
t_relay();<br>
exit;<br>
}<br>
<br>
t_check_trans();<br>
<br>
<br>
if (!is_method("INVITE")) {<br>
sl_send_reply("500","Method not allowed");<br>
exit;<br>
}<br>
<br>
record_route(); <br>
rewritehostport("<span
style="font-family:"Arial","sans-serif";
color:black">10.0.2.16:5060</span>"); <br>
t_relay();<br>
exit;<br>
}<br>
<br>
On 11/22/2012 06:04 PM, Christian Cambier wrote:<br>
</div>
<blockquote
cite="mid:159A725B01BDB746ADDB7F32CC64AC8770F0AC@mail.voxtron.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal" style="margin-bottom:12.0pt"><span
style="font-family:"Arial","sans-serif";
color:black">Hi.<br>
<br>
I'd like to use openSIPS proxy (10.0.4.34) for tracing but
leave all
SIP-handling to a PBX that is on the same network
(10.0.2.16)<o:p></o:p></span></p>
<p class="MsoNormal" style="orphans: 2;text-align:start;widows:
2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px"><span
style="font-family:"Arial","sans-serif";
color:black">I tried just forwarding the sip-messages on the
proxy using<span class="apple-converted-space"> </span><br>
forward("<a moz-do-not-send="true"
href="http://10.0.2.16:5060/" target="_blank">10.0.2.16:5060</a>");<br>
but the UAC receives a "Moved permanently"<br>
<br>
How can this be achieved?<br>
<br>
thx<br>
Chris<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>