<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi,<br>
      <br>
      Where do you have the switch + sl_send_reply ? in onreply route ?
      or in a failure route ?<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
</pre>
    <div class="moz-cite-prefix">On 09/15/2017 12:20 AM, mwb via Users
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:54216090.2284033.1505424053236@mail.yahoo.com">
      <div style="color:#000; background-color:#fff;
        font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande,
        sans-serif;font-size:10px">
        <div id="yui_3_16_0_ym19_1_1505421476365_14047"><span
            id="yui_3_16_0_ym19_1_1505421476365_14046">Sorry, I was not
            clear, Ben. Yes, the messages are properly being sent with
            the "chosen" response code. I was just looking to clean up
            or suppress the error messages since I have been seeing it
            in the logs. I was also concerned it might cause other
            issues or that I was going about it in the wrong way.</span></div>
        <div class="qtdSeparateBR"><br>
          <br>
        </div>
        <div class="yahoo_quoted" style="display: block;">
          <div style="font-family: Helvetica Neue, Helvetica, Arial,
            Lucida Grande, sans-serif; font-size: 10px;">
            <div style="font-family: HelveticaNeue, Helvetica Neue,
              Helvetica, Arial, Lucida Grande, sans-serif; font-size:
              16px;">
              <div dir="ltr"><font face="Arial" size="2"> On Thursday,
                  September 14, 2017 2:07 PM, Ben Newlin
                  <a class="moz-txt-link-rfc2396E" href="mailto:Ben.Newlin@genesys.com"><Ben.Newlin@genesys.com></a> wrote:<br>
                </font></div>
              <br>
              <br>
              <div class="y_msg_container">
                <div id="yiv8647560959">
                  <style>#yiv8647560959 #yiv8647560959 --
 
 _filtered #yiv8647560959 {panose-1:2 4 5 3 5 4 6 3 2 4;}
 _filtered #yiv8647560959 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
 _filtered #yiv8647560959 {panose-1:2 0 5 3 0 0 0 2 0 4;}
#yiv8647560959  
#yiv8647560959 p.yiv8647560959MsoNormal, #yiv8647560959 li.yiv8647560959MsoNormal, #yiv8647560959 div.yiv8647560959MsoNormal
        {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;}
#yiv8647560959 a:link, #yiv8647560959 span.yiv8647560959MsoHyperlink
        {color:#0563C1;text-decoration:underline;}
#yiv8647560959 a:visited, #yiv8647560959 span.yiv8647560959MsoHyperlinkFollowed
        {color:#954F72;text-decoration:underline;}
#yiv8647560959 span.yiv8647560959EmailStyle17
        {color:windowtext;}
#yiv8647560959 span.yiv8647560959msoIns
        {text-decoration:underline;color:teal;}
#yiv8647560959 .yiv8647560959MsoChpDefault
        {font-size:10.0pt;}
 _filtered #yiv8647560959 {margin:1.0in 1.0in 1.0in 1.0in;}
#yiv8647560959 div.yiv8647560959WordSection1
        {}
#yiv8647560959 </style>
                  <div>
                    <div class="yiv8647560959WordSection1">
                      <div class="yiv8647560959MsoNormal">One thing that
                        was unclear is whether this is currently working
                        and you are just concerned about the error or
                        whether it doesn’t work at all.</div>
                      <div class="yiv8647560959MsoNormal">  </div>
                      <div class="yiv8647560959MsoNormal">I believe it
                        should work and the key to why you are getting
                        errors is in the error message itself:</div>
                      <div class="yiv8647560959MsoNormal">  </div>
                      <div class="yiv8647560959MsoNormal">“provisional
                        or positive final replies”</div>
                      <div class="yiv8647560959MsoNormal">  </div>
                      <div class="yiv8647560959MsoNormal">Are you
                        validating prior to attempting to change the
                        reply status that it is a 302 reply? Most
                        servers will send at least a 100 Trying response
                        and sometimes other responses. When you arm the
                        reply route, all replies will be delivered to
                        it, not just the final reply. Although I’m not
                        sure if that is the case for 100 Trying
                        responses.</div>
                      <div class="yiv8647560959MsoNormal">  </div>
                      <div class="yiv8647560959MsoNormal">At any rate, I
                        would do a trace to see if the server is only
                        returning a 302, or if it is also returning some
                        other provisional or final reply when the errors
                        occur. If so, you should add code to only
                        attempt to change the reply status when it is
                        the expected reply (302).</div>
                      <div class="yiv8647560959MsoNormal">  </div>
                      <div class="yiv8647560959MsoNormal">Ben Newlin</div>
                      <div class="yiv8647560959MsoNormal">  </div>
                      <div class="yiv8647560959MsoNormal">  </div>
                      <div class="yiv8647560959yqt7449305769"
                        id="yiv8647560959yqt50031">
                        <div style="border:none;border-top:solid #B5C4DF
                          1.0pt;padding:3.0pt 0in 0in 0in;">
                          <div class="yiv8647560959MsoNormal"><b><span
                                style="font-size:12.0pt;color:black;">From:
                              </span></b><span
                              style="font-size:12.0pt;color:black;">Users
                              <a class="moz-txt-link-rfc2396E" href="mailto:users-bounces@lists.opensips.org"><users-bounces@lists.opensips.org></a>
                              on behalf of mwb via Users
                              <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br
                                clear="none">
                              <b>Reply-To: </b>mwb
                              <a class="moz-txt-link-rfc2396E" href="mailto:mwbazdarich@yahoo.com"><mwbazdarich@yahoo.com></a>, OpenSIPS
                              users mailling list
                              <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br
                                clear="none">
                              <b>Date: </b>Thursday, September 14, 2017
                              at 3:02 PM<br clear="none">
                              <b>To: </b><a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org">"users@lists.opensips.org"</a>
                              <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br
                                clear="none">
                              <b>Subject: </b>[OpenSIPS-Users] Changing
                              Reply Response Code</span></div>
                        </div>
                        <div>
                          <div class="yiv8647560959MsoNormal">  </div>
                        </div>
                        <div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47730">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">Hello and
                                thanks in advance for the help.</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47730">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:7.5pt;">  </span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47730">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">I have an
                                OpenSIPS process that is set up to send
                                routing responses back to a few SBCs we
                                have. When the SBC sends an INVITE w/o
                                RN or NPDI in the RURI, OpenSIPS passes
                                the INVITE along to another server which
                                returns a 302 response with the RN and
                                NPDI information in a contact header.
                                The RN/NPDI info is then incorporated
                                into the response sent back to the SBC.
                                We have a few different SBCs that expect
                                different response codes, some 300 and
                                some 302. (we are adding steering digits
                                into the contact header).</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47730">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:7.5pt;">  </span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47730">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">If the SBC
                                expects a 300 and the call comes through
                                without RN/NPDI we use the below code in
                                the "reply" route for the INVITE that
                                OpenSIPS sends to the other server in
                                order to accomodate the 300 (the $avp is
                                filled when the SBC initiating the call
                                is recognized).</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47730">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:7.5pt;">  </span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47961">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">switch($avp(sip_response_code)){</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47964">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">case "300":</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47967">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">change_reply_status("300","Multiple
                                Choices");</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47970">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">break;</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47973">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">case "302":</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47976">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">change_reply_status("302","Moved
                                Temporarily");</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47979">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">break;</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47982">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">default:</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47985">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">change_reply_status("302","Moved
                                Temporarily");</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47988">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">}</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47991">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:7.5pt;">  </span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47730">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">We am
                                receiving the following error message
                                from OpenSIPS when the above is
                                executed:</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47736">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">"ERROR:sipmsgops:change_reply_status_f:
                                the class of provisional or positive
                                final replies cannot be changed"</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47736">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:7.5pt;">  </span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_47736">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">If the INVITE
                                we receive from the SBC has the RN/NPDI
                                information in it then we DO NOT need to
                                send the call on to another server and
                                thus, after building our response we can
                                use the following code:</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48261">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">switch($avp(sip_response_code)){</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48264">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">case "300":</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48267">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">sl_send_reply("300","Multiple
                                Choices");</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48270">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">break;</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48273">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">case "302":</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48276">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">sl_send_reply("302","Moved
                                Temporarily");</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48279">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">break;</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48282">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">default:</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48285">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">sl_send_reply("302","Moved
                                Temporarily");</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48288">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">}</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48291">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:7.5pt;">  </span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48291">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">This works
                                without issue, I assume because we are
                                generating a fresh reply rather than
                                proxying the reply from the RN/NPDI
                                server.</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48291">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:7.5pt;">  </span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48291">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">Is there a way
                                to avoid the "the class of provisional
                                or positive final replies cannot be
                                changed" error? </span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48291">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:7.5pt;">  </span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48291">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">Are we going
                                about this in the wrong way when we need
                                to send an INVITE to the other server in
                                order to get the RN/NPDI information?</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48291">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:7.5pt;">  </span></div>
                          </div>
                          <div
                            id="yiv8647560959yui_3_16_0_ym19_1_1505337780799_48291">
                            <div class="yiv8647560959MsoNormal"
                              style="background:white;"><span
                                style="font-size:10.0pt;">thanks!</span><span
                                style="font-size:7.5pt;"></span></div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
                <br>
                <br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>