<div dir="ltr"><div>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">Hi,</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt"> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">In the scenario i am using, the flow is as followed:</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">1. Getting the INVITE from the user</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">2. Sending an INVITE with RURI changes to the NP server (sip NP server)</span></p>

<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">3. Getting a 301 reply (using the reply for the NP code)</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">4. Sending the call to the destination.</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt"> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">My problem is that the NP server needs some parameters in the contact header.</span></p>

<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">So, here is what i do :</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt"> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">First, before sending the invite to the NP:</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt"> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">remove_hf(&quot;Contact&quot;);</span></p>
<p style="LINE-HEIGHT:normal" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">append_hf(&quot;Contact :&lt;sip:XXX@server_ip:port;param1=p1;param2=p2&gt;\r\n&quot;,&quot;Contact&quot;);</span></p>

<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt"> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">(The invite is sent perfectly and works great)</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt"> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">After the NP reply i do:</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt"> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">remove_hf(&quot;Contact&quot;);</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">append_hf(&quot;Contact :$ct&quot;,&quot;Contact&quot;);</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt"> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">Now I notice there are two contact headers. It seems that the remove_hf didn’t work this time.</span></p>

<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">Any ideas?</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt"> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">Thanks,</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">Uri</span></p></div></div>