<html><head></head><body bgcolor="#FFFFFF"><div>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 &lt;<a href="mailto:vitalik.voip@gmail.com">vitalik.voip@gmail.com</a>&gt; wrote:<br>
<br></div><div></div><blockquote type="cite"><div>

  
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
  
  
    I have tried to use &quot;append_hf&quot; 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&#39;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>
              &quot;event_route[tm:local-request]&quot; 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">&lt;<a href="mailto:vitalik.voip@gmail.com" target="_blank">vitalik.voip@gmail.com</a>&gt;</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 &quot;503 temporary
              unavailable&quot;. PSTN gateway adds a &quot;reason&quot; header with
              ISUP code.<br>
              But according to RFC <a href="tel:3261" value="+333261" target="_blank">3261</a>
              kamailio doesn&#39;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&#39;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 href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
              <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><br>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
      <pre><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>
  

</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 href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a></span><br>
<span><a 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></body></html>