<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
you have to use append_hf() in the onreply route.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 7/18/12 7:20 AM, Uri Shacked wrote:<br>
</div>
<blockquote
cite="mid:CAMMbDhTUZVS_quLqQVD3dVk0nb0bS4xuMKyCUs97LDPeXPiRSQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt"
class="MsoNormal"><span style="FONT-FAMILY:'Times New
Roman','serif';FONT-SIZE:12pt">Hi</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt"
class="MsoNormal"><span style="FONT-FAMILY:'Times New
Roman','serif';FONT-SIZE:12pt"> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt"
class="MsoNormal"><span style="FONT-FAMILY:'Times New
Roman','serif';FONT-SIZE:12pt">I tried the
"change_reply_status".</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 12pt"
class="MsoNormal"><span style="FONT-FAMILY:'Times New
Roman','serif';FONT-SIZE:12pt">The problem with it is that
i need to do "append_to_reply" as well. The first one can
be called only on the "on reply" route, and the second on
the "on failure" route. </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 12pt"
class="MsoNormal"><span style="FONT-FAMILY:'Times New
Roman','serif';FONT-SIZE:12pt">And as i notice, doing
"append_to_reply" with no "t_reply" does not really append
anything... so it looks like I will have to do "t_reply"
and deal with the to_tag later.</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 12pt"
class="MsoNormal"><span style="FONT-FAMILY:'Times New
Roman','serif';FONT-SIZE:12pt">Thanks,</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 12pt"
class="MsoNormal"><span style="FONT-FAMILY:'Times New
Roman','serif';FONT-SIZE:12pt">Uri</span></p>
On Tue, Jul 17, 2012 at 8:18 PM, Daniel-Constantin Mierla <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></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 >=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 >=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 moz-do-not-send="true"
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"><<a moz-do-not-send="true"
href="mailto:miconda@gmail.com"
target="_blank">miconda@gmail.com</a>></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'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("503", "...");<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 - "<u><font
color="#0066cc">Copy reason
field from 503 to 500. </font></u><a
moz-do-not-send="true"
name="13895f31f598432a_1382287a1c908f03_73018"> </a>"</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"><<a
moz-do-not-send="true"
href="mailto:ushacked@gmail.com"
target="_blank">ushacked@gmail.com</a>></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's softswitch and
acts as a sip application
server.</div>
<div>I notice that there are
calls that the softswitch
replied with 503 "service
unavailable" and kamailio
sent to the originator leg
500 "service unavaileable".</div>
<div>When kamailio recieved
504 or 502 it sends them
back as is. shouldn't it be
the same with 503?</div>
<div> </div>
<div>It also does not have a
"to tag" in the CDR. And the
"to tag" in the 503 that was
recieved is not equal to the
500 reply "to tag" 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 moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" 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 moz-do-not-send="true" href="http://www.asipto.com/" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" 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 moz-do-not-send="true" href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a>
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - <a moz-do-not-send="true" 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 moz-do-not-send="true" href="http://www.asipto.com/" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" 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 moz-do-not-send="true" href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a>
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - <a moz-do-not-send="true" href="http://asipto.com/u/kpw" target="_blank">http://asipto.com/u/kpw</a></pre>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/katu">http://asipto.com/u/katu</a>
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/kpw">http://asipto.com/u/kpw</a></pre>
</body>
</html>