<!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">
    <tt>Hi Ronald,<br>
      <br>
      I never experienced such race (with multiple 200 oks on different
      branches)....But depending on what kind of accounting you do:<br>
      &nbsp;- transaction based = you will get 2 START records and 2 STOP
      records, but with different TO tags....<br>
      &nbsp;- cdr based = you will get the values of the last 200 OK (which
      will overwrite the values of the first one)..<br>
      <br>
      I guess the ACC module was never designed to deal with such
      scenarios.<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>
    <br>
    On 07/06/2013 02:25 AM, Ronald Cepres wrote:
    <blockquote
cite="mid:CAGCQ4Joye-1UxDnEZTj7gpYb-j-whwbkW4_-oZyO4zhL1W1qdg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Bogdan,
        <div><br>
        </div>
        <div>Understood, and thanks for the info.</div>
        <div><br>
        </div>
        <div>However, I have some concerns with regards to the resulting
          CDR using the acc and drouting modules. I think if both GWs
          sent 200 OK at the same time, it would result in a CDR with
          the values of AVPs specified by carrier_id_avp and&nbsp;gw_id_avp
          drouting parameters set only to GW2. Also, if GW1 is the last
          GW in the gwlist and this type of race condition happens, the
          value of the AVPs will be set to blank.</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div class="gmail_extra">
          <div class="gmail_quote">On Fri, Jul 5, 2013 at 2:15 AM,
            Bogdan-Andrei Iancu <span dir="ltr">&lt;<a
                moz-do-not-send="true" href="mailto:bogdan@opensips.org"
                target="_blank">bogdan@opensips.org</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;">
              <div text="#000000" bgcolor="#ffffff"> <tt>Hello Ronald,<br>
                  <br>
                  If the first GW sent any reply before the timeout,
                  than OpenSIPS will cancel it before hitting the
                  failure route. If no reply at all sent by GW1,
                  OpenSIPS will hit the failure route on timeout without
                  canceling. If after this point (call send to GW2)
                  first GW sends a reply :<br>
                  &nbsp;&nbsp;&nbsp; 1) if a provisional reply (&lt;200), it will be
                  canceled on the spot<br>
                  &nbsp;&nbsp;&nbsp; 2) if a 200 ok reply -&gt; it will be accepted and
                  fwd to calling device<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a) if the GW2 did not send a 200 OK, it will
                  be canceled<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; b) if GW2 also sent a 200 OK in the same time,
                  both 200 OK will be sent to calling device and it that
                  device will decide what call to keep<br>
                  <br>
                  Regards,<br>
                </tt>
                <div class="im">
                  <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                  <br>
                </div>
                <div>
                  <div class="h5"> On 07/04/2013 07:41 PM, Ronald Cepres
                    wrote:
                    <blockquote type="cite">
                      <p dir="ltr">Bogdan,</p>
                      <p dir="ltr">Thanks for the informative reply. </p>
                      <p dir="ltr">What I really want to solve is a
                        problem I encounter when the first GW doesnt
                        respond after a defined timeout then Opensips
                        does failover to next GW. A few seconds after
                        the call is routed to second&nbsp; GW, the first GW
                        responds with 200 OK, which may cause problems.
                        It seems that the first GW has a slow response
                        time.</p>
                      <p dir="ltr">The solution I am thinking of to
                        prevent this is to send a cancel to the first GW
                        before doing failover to next gateway. Does this
                        make sense or is there a better solution?</p>
                      <p dir="ltr">Thanks.</p>
                      <p dir="ltr">-Ronald</p>
                      <div class="gmail_quote">On Jul 4, 2013 11:58 PM,
                        "Bogdan-Andrei Iancu" &lt;<a
                          moz-do-not-send="true"
                          href="mailto:bogdan@opensips.org"
                          target="_blank">bogdan@opensips.org</a>&gt;
                        wrote:<br type="attribution">
                        <blockquote class="gmail_quote" style="margin:
                          0pt 0pt 0pt 0.8ex; border-left: 1px solid
                          rgb(204, 204, 204); padding-left: 1ex;">
                          <div text="#000000" bgcolor="#ffffff"> <tt>Hello
                              Ronald,<br>
                              <br>
                              When you hit the failure route, there is
                              no ongoing branch left (doesn't matter how
                              many you previously created) - so you
                              should not worry about this.<br>
                              <br>
                              By SIP definition, a transaction fails
                              (and OpenSIPS gets into failure route)
                              only when all branches failed.<br>
                              <br>
                              Regards,<br>
                            </tt>
                            <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                            <br>
                            On 07/03/2013 10:43 PM, Ronald Cepres wrote:
                            <blockquote type="cite">
                              <div dir="ltr">Hi all,
                                <div><br>
                                </div>
                                <div>Is there a way I can cancel a
                                  pending branch before doing a
                                  fail-over to next gateway (due to
                                  timeout from previous gateway)? This
                                  way I can make sure that the call to
                                  the previous gateway will not go
                                  through anymore after fail-over to the
                                  next gateway, thus preventing us
                                  "double-charged" situations if the
                                  previous gateway and the new gateway
                                  both answered the call.&nbsp;</div>
                                <div><br>
                                </div>
                                <div>Thanks in advance.</div>
                                <div>
                                  <div><br clear="all">
                                    <div><br>
                                    </div>
                                    -- <br>
                                    <div dir="ltr"><br>
                                      <div>Regards,</div>
                                      <div><br>
                                      </div>
                                      <div>Ronald</div>
                                      <div><br>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                              <pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                            </blockquote>
                          </div>
                        </blockquote>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <div dir="ltr"><br>
            <div>Regards,</div>
            <div><br>
            </div>
            <div>Ronald Cepres</div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>