<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    just to conclude this thread, for archiving and future searches, the
    upcoming 3.2.0 (planned for tomorrow), exports via snmpstats the
    counter with all processed dialogs. Therefore, making the difference
    against failed dialogs counter will result in the total number of
    answered calls.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    On 3/22/11 5:54 PM, Daniel-Constantin Mierla wrote:
    <blockquote cite="mid:4D88D435.5030104@gmail.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Hello,<br>
      <br>
      On 3/15/11 1:22 PM, Stefan Tiedje wrote:
      <blockquote
cite="mid:78A68DD4B55ABD4CA9283A34B9AB6034104883D2E4@ESESSCMS0355.eemea.ericsson.se"
        type="cite">
        <meta http-equiv="Content-Type" content="text/html;
          charset=ISO-8859-1">
        <meta content="MSHTML 6.00.6001.18565" name="GENERATOR">
        <div dir="ltr" align="left"><span class="431511812-15032011"><font
              color="#0000ff" face="Arial" size="2">Have no chance at
              all to help with the patch.</font></span></div>
      </blockquote>
      ok :-) . late reply -- I was several days off.
      <blockquote
cite="mid:78A68DD4B55ABD4CA9283A34B9AB6034104883D2E4@ESESSCMS0355.eemea.ericsson.se"
        type="cite">
        <div dir="ltr" align="left"><span class="431511812-15032011"></span>&nbsp;</div>
        <div dir="ltr" align="left"><span class="431511812-15032011"><font
              color="#0000ff" face="Arial" size="2">Will the patch be
              added to release 3.1.1 release?</font></span></div>
      </blockquote>
      <br>
      . It is very unlikely to backport new features in stable branches,
      however, when the patch will be done for devel branch should work
      also on 3.1.x since there were no other changes in devel vs 3.1.<br>
      <br>
      Cheers,<br>
      Daniel<br>
      <br>
      <blockquote
cite="mid:78A68DD4B55ABD4CA9283A34B9AB6034104883D2E4@ESESSCMS0355.eemea.ericsson.se"
        type="cite">
        <div dir="ltr" align="left"><span class="431511812-15032011"><font
              color="#0000ff" face="Arial" size="2">/Stefan</font></span></div>
        <br>
        <div class="OutlookMessageHeader" dir="ltr" align="left"
          lang="en-us">
          <hr tabindex="-1"> <font face="Tahoma" size="2"><b>From:</b>
            Daniel-Constantin Mierla [<a moz-do-not-send="true"
              class="moz-txt-link-freetext"
              href="mailto:miconda@gmail.com">mailto:miconda@gmail.com</a>]
            <br>
            <b>Sent:</b> den 14 mars 2011 15:39<br>
            <b>To:</b> SIP Router - Kamailio (OpenSER) and SIP Express
            Router (SER) - Users Mailing List<br>
            <b>Cc:</b> Stefan Tiedje<br>
            <b>Subject:</b> Re: [SR-Users] OPENSER MIB<br>
          </font><br>
        </div>
        <br>
        <br>
        On 3/14/11 12:33 PM, Daniel-Constantin Mierla wrote:
        <blockquote cite="mid:4D7DFCF5.7060407@gmail.com" type="cite">Hello

          Stefan,<br>
          <br>
          <br>
          On 3/14/11 11:03 AM, Stefan Tiedje wrote:
          <blockquote
cite="mid:78A68DD4B55ABD4CA9283A34B9AB60341048788F88@ESESSCMS0355.eemea.ericsson.se"
            type="cite">
            <meta content="MSHTML 6.00.6001.18565" name="GENERATOR">
            <div dir="ltr" align="left"><span class="131233009-14032011"><font
                  color="#0000ff" face="Arial" size="2">Thanks for the
                  answer.</font></span></div>
            <div dir="ltr" align="left"><span class="131233009-14032011"></span>&nbsp;</div>
            <div dir="ltr" align="left"><span class="131233009-14032011"><font
                  color="#0000ff" face="Arial" size="2">Maybe I have
                  some older versions of the OPENSER-MIB and the other
                  related MIB's since I could not find the counter you
                  pointed at. I'm using a MIB browser for reading the
                  MIB's.</font></span></div>
            <div dir="ltr" align="left"><span class="131233009-14032011"><font
                  color="#0000ff" face="Arial" size="2">Is the suggested
                  counter "expired dialogs" added in a specific release
                  of Kamailio? Which? We use Kamailio 3.0.2.</font></span></div>
          </blockquote>
          I used Kamailio and recommend using it sine it has the latest
          commits for stability.<br>
        </blockquote>
        &nbsp;... ^^^ ... obviously this was incomplete phrase, it meant to
        be: "I used Kamailio 3.1.2 and recommend using it since it has
        the latest commits for stability".<br>
        <br>
        I can add also that I got more familiar in configuring it with
        snmpstats on debian/ubuntu, so it would be easier for me to give
        hints as well as add new features since it is the same as devel
        version.<br>
        <br>
        Cheers,<br>
        Daniel<br>
        <br>
        <blockquote cite="mid:4D7DFCF5.7060407@gmail.com" type="cite"><br>
          However, what I wrote before is pretty much not related to the
          version. There is a counter that tracks the processed dialogs,
          but seems it is not exported by default through snmpstats
          module. The statistics counter is named "processed_dialogs",
          implemented by dialog module.<br>
          <br>
          You can dump all internal statistics through kamctl or via
          xmlrpc command, but probably to export it through snmpstats
          you may need to extend the mibs and the code of the module.<br>
          <br>
          I just grepped the sources of snmpstats module to see what
          dialog statistics it is exporting:<br>
          <br>
          $ grep -n _dialogs modules_k/snmpstats/* | grep get_statistic<br>
          modules_k/snmpstats/alarm_checks.c:83:&nbsp;&nbsp;&nbsp; num_dialogs =
          get_statistic("active_dialogs");<br>
          modules_k/snmpstats/snmpObjects.c:404:&nbsp;&nbsp;&nbsp; int result =
          get_statistic("active_dialogs");<br>
          modules_k/snmpstats/snmpObjects.c:424:&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
          get_statistic("active_dialogs") -<br>
          modules_k/snmpstats/snmpObjects.c:425:&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
          get_statistic("early_dialogs");<br>
          modules_k/snmpstats/snmpObjects.c:443:&nbsp;&nbsp;&nbsp; int result =
          get_statistic("early_dialogs");<br>
          modules_k/snmpstats/snmpObjects.c:459:&nbsp;&nbsp;&nbsp; int result =
          get_statistic("failed_dialogs");<br>
          modules_k/snmpstats/snmpObjects.c:508:&nbsp;&nbsp;&nbsp; int num_dialogs =
          get_statistic("active_dialogs");<br>
          <br>
          Perhaps when the snmpstats was developed the dialog module
          didn't export the statistics counter of "processed_dialogs"
          and then it was not updated.<br>
          <br>
          Now, what I tried to say is that if the "processed_dialogs"
          counter is not available through snmpstats (and it is not now
          after grepping the sources) you can get its value from another
          application through "kamctl get_statistics all" or XMLRPC
          command for all of the existing kamailio releases. Upcoming
          one we will look to implement the export through snmpstats as
          well. If you have time to do it and send us a patch, we will
          gladly commit it to source tree in our GIT repository.<br>
          <br>
          Cheers,<br>
          Daniel<br>
          <blockquote
cite="mid:78A68DD4B55ABD4CA9283A34B9AB60341048788F88@ESESSCMS0355.eemea.ericsson.se"
            type="cite">
            <div dir="ltr" align="left"><span class="131233009-14032011"></span>&nbsp;</div>
            <div dir="ltr" align="left"><span class="131233009-14032011"><font
                  color="#0000ff" face="Arial" size="2">Do you have the
                  MIB name for the "expired dialogs" counter. I will
                  look for that in my version of OPENSER MIBS.</font></span></div>
            <div dir="ltr" align="left"><span class="131233009-14032011"><font
                  color="#0000ff" face="Arial" size="2">Important, do
                  you have a link to where MIB files can be downloaded
                  for Kamailio 3.0.2?</font></span></div>
            <div dir="ltr" align="left"><span class="131233009-14032011"></span>&nbsp;</div>
            <div dir="ltr" align="left"><span class="131233009-14032011"><font
                  color="#0000ff" face="Arial" size="2">Below follows an
                  excerp from one of the MIB's. Is it old, I don't know?</font></span></div>
            <div dir="ltr" align="left"><span class="131233009-14032011"></span>&nbsp;</div>
            <div dir="ltr" align="left"><span class="131233009-14032011"><span
                  lang="SV">
                  <p>--
                    ***********************************************************************</p>
                  <p>-- OPENSER-MIB: OPENSER MIB</p>
                  <p>--</p>
                  <p>-- Date of Creation: Januay 2006</p>
                  <p>--</p>
                  <p>-- This MIB provides information related to the
                    OpenSER SIP Router.</p>
                  <p>-- </p>
                  <p>-- Copyright (c) The Internet Society (2006)</p>
                  <p>-- Ammendments (c) Soma Networks, Inc. (2006)</p>
                  <p>--</p>
                  <p>-- All rights reserved.</p>
                  <p>--
                    *****************************************************************</p>
                </span></span></div>
            <div dir="ltr" align="left"><span class="131233009-14032011"></span>&nbsp;</div>
            <div dir="ltr" align="left"><span class="131233009-14032011"><font
                  color="#0000ff" face="Arial" size="2">/Stefan</font></span></div>
            <div dir="ltr" align="left"><span class="131233009-14032011"></span>&nbsp;</div>
            <br>
            <div class="OutlookMessageHeader" dir="ltr" align="left"
              lang="en-us">
              <hr tabindex="-1"> <font face="Tahoma" size="2"><b>From:</b>
                Daniel-Constantin Mierla [<a
                  class="moz-txt-link-freetext"
                  href="mailto:miconda@gmail.com" moz-do-not-send="true">mailto:miconda@gmail.com</a>]
                <br>
                <b>Sent:</b> den 14 mars 2011 10:16<br>
                <b>To:</b> Stefan Tiedje<br>
                <b>Cc:</b> <a class="moz-txt-link-abbreviated"
                  href="mailto:sr-users@lists.sip-router.org"
                  moz-do-not-send="true">sr-users@lists.sip-router.org</a><br>
                <b>Subject:</b> Re: [SR-Users] OPENSER MIB<br>
              </font><br>
            </div>
            Hello,<br>
            <br>
            On 3/14/11 9:42 AM, Stefan Tiedje wrote:
            <blockquote
cite="mid:78A68DD4B55ABD4CA9283A34B9AB60341048788E56@ESESSCMS0355.eemea.ericsson.se"
              type="cite">
              <meta content="Microsoft Exchange Server" name="Generator">
              <!-- converted from rtf -->
              <style>.EmailQuote {
        PADDING-LEFT: 4pt; MARGIN-LEFT: 1pt; BORDER-LEFT: #800000 2px solid
}
</style>
              <div><font face="Arial, sans-serif" size="2">Hi,</font></div>
              <div>&nbsp;</div>
              <div><font face="Arial, sans-serif" size="2">In the
                  Kamailio OPENSER-MIB there is the counter
                  "openserTotalNumFailedDialogSetups". This is a
                  Counter32.</font></div>
              <div><font face="Arial, sans-serif" size="2">The
                  description is:</font></div>
              <div><font face="Arial, sans-serif" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "The
                  total number of calls that failed with an error. The
                  following codes define a failed call:" </font></div>
              <div>&nbsp;</div>
              <div><font face="Arial, sans-serif" size="2"><b>Question:</b></font></div>
              <ul style="margin-top: 0pt; margin-bottom: 0pt;
                margin-left: 19pt;">
                <font face="Arial, sans-serif" size="2">
                  <li>I'm looking for the corresponding counter to
                    "openserTotalNumFailedDialogSetups" who counts
                    successful Dialog setups of Counter32 type. Does it
                    exist? </li>
                  <li>If not, does it exist a work around? </li>
                  <li>Where in the code can the new suggested counter be
                    added? </li>
                  <li>Something else???? </li>
                </font>
              </ul>
            </blockquote>
            <br>
            the dialog module counts the number of processed dialogs,
            see:<br>
            <a class="moz-txt-link-freetext"
href="http://kamailio.org/docs/modules/stable/modules_k/dialog.html#id2966360"
              moz-do-not-send="true">http://kamailio.org/docs/modules/stable/modules_k/dialog.html#id2966360</a><br>
            <br>
            There is no counter currently inside dialog module exporting
            exactly the number of successfully setup dialogs, it should
            not be hard to do it, though. Using the above and the number
            of failed and expired dialogs, you can actually get the
            number of successful dialogs.<br>
            <br>
            Dialog module being the one that tracks SIP dialogs,
            therefore being able to count them, now I don't know if
            snmpstats module exports all the counters from dialog
            module. I setup snmpstats just few weeks ago and works
            perfect on Ubuntu/Debian servers, but I had no need to check
            dialog module counters.<br>
            <br>
            Note that you can get the list of all internal statistics
            via kamctl:<br>
            - kamctl fifo get_statistics all<br>
            <br>
            Or via XMLRPC if you need them remotely in another
            application.<br>
            <br>
            Another option is to define your statistics with statistics
            module. Knowing that in SIP a successful call dialog means
            200ok reply to an INVITE transaction, you can count it in
            the onreply_route[abc] that you arm for relayed transactions
            with t_on_reply("abc").<br>
            <br>
            Hope these help you,<br>
            Daniel<br>
            <br>
            <blockquote
cite="mid:78A68DD4B55ABD4CA9283A34B9AB60341048788E56@ESESSCMS0355.eemea.ericsson.se"
              type="cite"><font face="Arial, sans-serif" size="2">
                <div>&nbsp;</div>
                <div>Suggestion for the new counter is a name like:
                  "openserTotalNumSucceededDialogSetups". It has a
                  counter32. Description: "The total number of calls
                  that succeeded" </div>
                <div>&nbsp;</div>
                <div>I know that there are the counters
                  openserCurNumDialogs, openserCurNumDialogsInProgress
                  and openserCurNumDialogsInSetup but these are of Gauge
                  type who only reflects the current situation. These
                  Gauge counters can't be used together with a Counter32
                  counter. That don't mix. The calculation done for the
                  counter "openserCurNumDialogsInProgress" should be
                  used where every new dialog setup is added to the new
                  suggested counter. A counter of 32 should cover a
                  great deal of connections. These counters are usually
                  read, if used, every 15 minutes or 1 hour.</div>
                <div>&nbsp;</div>
                <div>&nbsp;</div>
                <div><b>Rationale:</b></div>
                <div>The reason for the new counter is that a
                  calculation between succeeded and failed dialog setups
                  can be done and be used for SLA agreements. Without
                  this, its hard to make any customer versus provider
                  agreements.</div>
                <div>&nbsp;</div>
                <div>&nbsp;</div>
                <div>/Stefan</div>
                <div>PS. Ask if anything is unclear and I need an answer
                  rapidly.</div>
                <div>&nbsp;</div>
              </font>
              <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" moz-do-not-send="true">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" moz-do-not-send="true">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
            </blockquote>
            <br>
            <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com" moz-do-not-send="true">http://www.asipto.com</a></pre>
          </blockquote>
          <br>
          <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com" moz-do-not-send="true">http://www.asipto.com</a></pre>
          <pre wrap=""><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>
        <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
        <pre wrap=""><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>
      <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
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>
    <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>
Kamailio Advanced Training, Dec 5-8, Berlin: <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
  </body>
</html>