<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">I tried the &quot;change_reply_status&quot;.</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 12pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">The problem with it is that i need to do &quot;append_to_reply&quot; as well. The first one can be called only on the &quot;on reply&quot; route, and the second on the &quot;on failure&quot; route. </span></p>

<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 12pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">And as i notice, doing &quot;append_to_reply&quot; with no &quot;t_reply&quot; does not really append anything... so it looks like I will have to do &quot;t_reply&quot; and deal with the to_tag later.</span></p>

<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 12pt" 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 12pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">Uri</span></p>On Tue, Jul 17, 2012 at 8:18 PM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</span> wrote:<br>
</div>
<div class="gmail_quote">
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div bgcolor="#FFFFFF" text="#000000">Hello,<br><br>sending a &gt;=300 reply is for an not-established dialog, which eventually can be forked by proxy, meaning many 1xx replies can get to caller, then many &gt;=300 replies can get to the proxy which will chose which one to use for sending back to the caller.<br>
<br>Doing a t_reply(...) with a different code than the received one is like having two branch, one locally and one from where the reply is received, but you decide to reply from the local one. So if the caller device has problems with this case, the it will have problems with serial/parallel forking.<br>
<br>For accounting you can save incoming to-tag in an avp and store it in a separate column in acc table. But setting the to-tag for t_reply() is not possible at this time.<br><br>Btw, have you tried instead the change_reply_status() function?<br>
<br><a href="http://kamailio.org/docs/modules/stable/modules/textopsx.html#textopsx.change_reply_status" target="_blank">http://kamailio.org/docs/modules/stable/modules/textopsx.html#textopsx.change_reply_status</a><br><br>
Cheers,<br>Daniel 
<div>
<div class="h5"><br><br>
<div>On 7/17/12 2:23 PM, Uri Shacked wrote:<br></div>
<blockquote type="cite">
<div dir="ltr">
<div>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span>Hi,</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span>Here is the problem with the solution to sending different reply then the once I receive:</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span>I check if the reply is 603. If so, i did t_drop_replies and then t_reply with the reply i wanted to send back. 500 with append_to_reply something....</span></p>

<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span>The problem is that on the 500 that i send back, the to_tag is not the same to_tag that i received with the 603.</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span>That makes some problems on the sip and lots of problems on the CDR creation (it is based on to_tag as well).</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span>Any ideas?</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span>How do i make it the same to_tag? Removing a header and recreating it seems very dirty for it.....</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span>BR,</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span>Uri</span></p></div>
<div class="gmail_quote">On Mon, Jun 25, 2012 at 10:25 AM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div bgcolor="#FFFFFF" text="#000000">Hello,<br><br>this 503 to 500 is a requirement from RFC, to prevent propagation of blacklisting/disabling destination hosts. I don&#39;t remember right now any configuration option for it, but you can try to enforce it from the failure route, like:<br>
<br>t_reply(&quot;503&quot;, &quot;...&quot;);<br><br>Cheers,<br>Daniel 
<div>
<div><br><br>
<div>On 6/24/12 4:30 PM, Uri Shacked wrote:<br></div></div></div>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">
<div>I just read the topic - &quot;<u><font color="#0066cc">Copy reason field from 503 to 500. </font></u><a name="13895f31f598432a_1382287a1c908f03_73018"> </a>&quot;</div>
<div>Is there a way to change it if i want to send back the original leg 2 503 reply?<br><br></div>
<div class="gmail_quote">On Sun, Jun 24, 2012 at 4:17 PM, Uri Shacked <span dir="ltr">&lt;<a href="mailto:ushacked@gmail.com" target="_blank">ushacked@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div dir="ltr">
<div>Hi,</div>
<div> </div>
<div>Kamailio server is behind our company&#39;s softswitch and acts as a sip application server.</div>
<div>I notice that there are calls that the softswitch replied with 503 &quot;service unavailable&quot; and kamailio sent to the originator leg 500 &quot;service unavaileable&quot;.</div>
<div>When kamailio recieved 504 or 502 it sends them back as is. shouldn&#39;t it be the same with 503?</div>
<div> </div>
<div>It also does not have a &quot;to tag&quot; in the CDR. And the &quot;to tag&quot; in the 503 that was recieved is not equal to the 500 reply &quot;to tag&quot;  kamailio sent back.</div>
<div> </div>
<div>any ideas?</div>
<div> </div>
<div>BR,</div>
<div>Uri</div></div></blockquote></div><br></div><br>
<fieldset></fieldset> <br></div></div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span><font color="#888888">
</font></span></pre><span></span></blockquote><span><font color="#888888"><br><pre cols="72">-- 
Daniel-Constantin Mierla - <a href="http://www.asipto.com/" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - <a href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a>
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - <a href="http://asipto.com/u/kpw" target="_blank">http://asipto.com/u/kpw</a></pre></font></span></div></blockquote></div><br></div></blockquote><br><pre cols="72">
-- 
Daniel-Constantin Mierla - <a href="http://www.asipto.com/" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - <a href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a>
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - <a href="http://asipto.com/u/kpw" target="_blank">http://asipto.com/u/kpw</a></pre></div></div></div></blockquote></div><br></div>