<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
According to
<a class="moz-txt-link-rfc2396E" href="http://www.asipto.com/pub/kamailio-devel-guide/#c02message_processing">"http://www.asipto.com/pub/kamailio-devel-guide/#c02message_processing"</a>
all replies comes to on_reply and if it is negative reply it will be
processed in failure_route after onreply_route.<br>
But that is not the point i tried failure_route too. <br>
<br>
append_hf works great for forwarded replies. But as i understand
when kamailio receives final 503 reply it sends 500 reply generated
by "build_res_buf_from_sip_req" (it is part of tm code, not dialplan
function).<br>
<br>
Thanks for your tries to help.<br>
<br>
<blockquote cite="mid:1767890311357728756@unknownmsgid" type="cite">
<div><code></code>Well 5xx error codes are processed in
failure_route and not onreply_route. Not sure though if you can
append_hf there.. Give it a try.</div>
<div><br>
</div>
<div>FYI, for using a function in event_route (seems not possible
for append_hf):</div>
<div><br>
</div>
<div>event_route[tm:local-request] {</div>
<div> ...</div>
<div> append_hf(...);</div>
<div> ...</div>
<div>}</div>
<div><br>
<div><br>
</div>
Reda</div>
<div><br>
On 26 avr. 2012, at 18:10, Vitaliy Aleksandrov <<a
moz-do-not-send="true" href="mailto:vitalik.voip@gmail.com">vitalik.voip@gmail.com</a>>
wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
I have tried to use "append_hf" in onreply_route.<br>
How can i use it in local-request ? According to documentation
it can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
FAILURE_ROUTE, BRANCH_ROUTE.<br>
<br>
Sorry forgot to mention that kamailio version is 3.0.2, but i
have looked at t_repy.c (tm module from 3.2) and didn't find
any changes which can help me.<br>
<br>
<blockquote
cite="mid:CAA30pc4BcFFmBpOWj7vaCh3F-R_DsyQB4opbe2t2sP-SjhTncw@mail.gmail.com"
type="cite">
<div dir="ltr"><font color="#3366ff"><font><font
face="tahoma,sans-serif">Hi,<br>
<br>
In which route did you try append_hf ?<br>
"event_route[tm:local-request]" is the route
executed for locally generated requests, I think you
should be trying to modify it there.<br clear="all">
</font></font></font>
<div dir="ltr"><font color="#3366ff" face="tahoma,
sans-serif"><br>
</font>
<div><font color="#3366ff" face="tahoma, sans-serif">Reda</font></div>
</div>
<br>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Apr 26, 2012 at 16:10,
Vitaliy Aleksandrov <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:vitalik.voip@gmail.com"
target="_blank">vitalik.voip@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt
0pt 0.8ex; border-left: 1px solid rgb(204, 204,
204); padding-left: 1ex;">Hi all,<br>
<br>
I have Kamailio connected to PSTN gateway.<br>
<br>
Sometimes gateway replies with "503 temporary
unavailable". PSTN gateway adds a "reason" header
with ISUP code.<br>
But according to RFC <a moz-do-not-send="true"
href="tel:3261" value="+333261" target="_blank">3261</a>
kamailio doesn't forward 503 replies transparently.
When 503 reply is received Kamailio replaces 503
with a 500 which is created from original request
(build_res_buf_from_sip_req).<br>
I have tried append_hf from textops module, but it's
not working with a locally generated replies.<br>
<br>
How can i copy Reason header from 503 to 500 ?<br>
<br>
<br>
I will appreciate your help with this situation.<br>
<br>
Best regards,<br>
Vitaliy Aleksandrov.<br>
<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) -
sr-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:sr-users@lists.sip-router.org"
target="_blank">sr-users@lists.sip-router.org</a><br>
<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><br>
</blockquote>
</div>
<br>
</div>
</div>
<pre><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>SIP Express Router (SER) and Kamailio (OpenSER) -
sr-users mailing list</span><br>
<span><a moz-do-not-send="true"
href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a></span><br>
<span><a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a></span><br>
</div>
</blockquote>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
</body>
</html>