<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>I found out what I was doing wrong. I was using forward(); instead of t_reply(); Since forward(); is stateless is was killing the dialog.</div>
<div><br>
</div>
<div>
<div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Calibri">Thank you,</font></font></div>
<div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Calibri"><br>
</font></font></div>
<div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Calibri">John Komara</font></font></div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Johnathan Komara &lt;<a href="mailto:john.komara@mongoosemetrics.com">john.komara@mongoosemetrics.com</a>&gt;<br>
<span style="font-weight:bold">Reply-To: </span>OpenSIPS users mailling list &lt;<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Thursday, August 28, 2014 at 9:50 AM<br>
<span style="font-weight:bold">To: </span>OpenSIPS users mailling list &lt;<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>Re: [OpenSIPS-Users] Replace IP in To Field<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>
<div>I am able to accomplish this through the use of the textops module though it is nowhere near as clean as what it appears the uac module would do.</div>
<div><br>
</div>
<div>From everything that I have read the &#8220;To:&#8221; field is the IP of the logical recipient. The Record-Route and Via headers are used to get the traffic to where it needs to go, correct? If I am sending a message through this path:</div>
<div><br>
</div>
<div>SwitchA -&gt; ProxyA -&gt; ProxyB -&gt; SwitchB</div>
<div><br>
</div>
<div>Does the &#8220;To:&#8221; field have to contain the IP address of ProxyB? Before I was able to modify the header with substr it contained the IP address of ProxyA (my side).</div>
<div><br>
</div>
<div>
<div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Calibri">Thank you,</font></font></div>
<div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Calibri"><br>
</font></font></div>
<div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Calibri">John Komara</font></font></div>
</div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Johnathan Komara &lt;<a href="mailto:john.komara@mongoosemetrics.com">john.komara@mongoosemetrics.com</a>&gt;<br>
<span style="font-weight:bold">Reply-To: </span>OpenSIPS users mailling list &lt;<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Wednesday, August 27, 2014 at 6:08 PM<br>
<span style="font-weight:bold">To: </span>&quot;<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>&quot; &lt;<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>[OpenSIPS-Users] Replace IP in To Field<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>I need to replace the IP in the To field. It is a requirement for a customer. I am trying to do this with uac_replace_to. It replaces the To field in the INVITE. However it does not replace it ACK to the 200OK. Looking at the logs I see that a dialog is
 created for the INVITE. Immediately after the INVITE is sent the dialog is destroyed. I am assuming that this is why the To field is not being modified in the ACK.</div>
<div><br>
</div>
<div>It looks as though the dialog is never stored. I have tried to do this in memory and in mysql. I am never able to retrieve a dialog with the &#8220;opensipsctl fifo dlg_list&#8221; command. I have attached links to my debug logs and config.&nbsp;</div>
<div><br>
</div>
<div>Is there a better way to accomplish this than what I am trying to do?</div>
<div><br>
</div>
<div>Debug Logs:&nbsp;<a href="http://pastebin.com/mvKx5AQp">http://pastebin.com/mvKx5AQp</a></div>
<div>Config:&nbsp;<a href="http://pastebin.com/n9vwncpU">http://pastebin.com/n9vwncpU</a></div>
<div><br>
</div>
<div>
<div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Calibri">Thank you,</font></font></div>
<div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Calibri"><br>
</font></font></div>
<div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Calibri">John</font></font></div>
</div>
</div>
</div>
</span></div>
</div>
</span>
</body>
</html>