<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    <div class="moz-cite-prefix">On 26/01/16 12:54, Phil Lavin wrote:<br>
    </div>
    <blockquote
cite="mid:AM4PR03MB153798AAAAA89963652CBD08F6D80@AM4PR03MB1537.eurprd03.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Courier New \;color\:\#1F497D";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;
        mso-fareast-language:EN-US;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;
        mso-fareast-language:EN-US;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle25
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle26
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle27
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle28
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle29
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:344092813;
        mso-list-type:hybrid;
        mso-list-template-ids:1602156306 134807553 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D">Sorry,
            correction – desired expires is always 1 second LESS than
            expires.</span></p>
      </div>
    </blockquote>
    <br>
    Is this above happening when taking it from the dialog module value?<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <blockquote
cite="mid:AM4PR03MB153798AAAAA89963652CBD08F6D80@AM4PR03MB1537.eurprd03.prod.outlook.com"
      type="cite">
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-GB">Phil<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
                  style="color:windowtext;mso-fareast-language:EN-GB"
                  lang="EN-US">From:</span></b><span
                style="color:windowtext;mso-fareast-language:EN-GB"
                lang="EN-US"> Phil Lavin
                <br>
                <b>Sent:</b> 26 January 2016 11:54<br>
                <b>To:</b> '<a class="moz-txt-link-abbreviated" href="mailto:miconda@gmail.com">miconda@gmail.com</a>'
                <a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com"><miconda@gmail.com></a>; Kamailio (SER) - Users
                Mailing List <a class="moz-txt-link-rfc2396E" href="mailto:sr-users@lists.sip-router.org"><sr-users@lists.sip-router.org></a><br>
                <b>Cc:</b> Telco Team <a class="moz-txt-link-rfc2396E" href="mailto:telco-team@synety.com"><telco-team@synety.com></a><br>
                <b>Subject:</b> RE: [SR-Users] Strange PUA Behaviour<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span style="color:windowtext">Hi Daniel,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext">Not setting
            the lifetime does indeed take the expiry from the dialog but
            the mechanism that refreshes the expiry when the call is
            ongoing does not run unless max_expires time is less than
            the lifetime. This seems to be because of the below code in
            pua.c:<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:windowtext">if((p->desired_expires>
            p->expires + min_expires) ||<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:windowtext">      (p->desired_expires== 0
            ))<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext">The
            desired_expires value is always 1 second greater than the
            expires value unless you set max_expires to pull it down.
            This has the side effect that the presentity entries are
            cleaned up prematurely, however.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext">Setting
            lifetime to a high value negates the need for the refreshes
            to happen.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext">Cheers<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="color:windowtext;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="color:windowtext;mso-fareast-language:EN-GB">Phil<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
                  style="color:windowtext;mso-fareast-language:EN-GB"
                  lang="EN-US">From:</span></b><span
                style="color:windowtext;mso-fareast-language:EN-GB"
                lang="EN-US"> Daniel-Constantin Mierla [<a
                  moz-do-not-send="true" href="mailto:miconda@gmail.com"><a class="moz-txt-link-freetext" href="mailto:miconda@gmail.com">mailto:miconda@gmail.com</a></a>]
                <br>
                <b>Sent:</b> 26 January 2016 11:36<br>
                <b>To:</b> Phil Lavin <<a moz-do-not-send="true"
                  href="mailto:phil.lavin@synety.com">phil.lavin@synety.com</a>>;
                Kamailio (SER) - Users Mailing List <<a
                  moz-do-not-send="true"
                  href="mailto:sr-users@lists.sip-router.org"><a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a></a>><br>
                <b>Cc:</b> Telco Team <<a moz-do-not-send="true"
                  href="mailto:telco-team@synety.com">telco-team@synety.com</a>><br>
                <b>Subject:</b> Re: [SR-Users] Strange PUA Behaviour<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal" style="margin-bottom:12.0pt">Hello,<br>
          <br>
          thanks to tackling this further ... see my comments inline...<span
            style="font-size:12.0pt;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
        <div>
          <p class="MsoNormal">On 26/01/16 11:46, Phil Lavin wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span style="color:#1F497D">We now have
              something of a resolution to this. Config is below. The
              key differences are:</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoListParagraph"
            style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><!--[if !supportLists]--><span
              style="font-family:Symbol"><span style="mso-list:Ignore">·<span
                  style="font:7.0pt "Times New Roman"">        
                </span></span></span><!--[endif]--><span
              style="color:#1F497D">pua – db_mode set to 0. This stops
              multiple states for a single dialog (early, trying,
              confirmed and terminated) from showing in the presentity
              table. I suspect this is a bug?</span><o:p></o:p></p>
        </blockquote>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman",serif;mso-fareast-language:EN-GB"><br>
            OK -- still in my todo to pursue this case.<br>
            <br>
            <o:p></o:p></span></p>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoListParagraph"
            style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><!--[if !supportLists]--><span
              style="font-family:Symbol"><span style="mso-list:Ignore">·<span
                  style="font:7.0pt "Times New Roman"">        
                </span></span></span><!--[endif]--><span
              style="color:#1F497D">pua_dialoginfo – override_lifetime
              set to a value > 4 hours. 4 hours chosen because our
              platform terminates calls after 4 hours to stop incomplete
              calls from continuing forever. There does seem to be a
              mechanism to refresh the expiry time of presentity records
              but it is only called when the max_expires time is less
              than the override_lifetime. Doing that causes records to
              be prematurely cleaned up. I suspect a few different bugs
              here?</span><o:p></o:p></p>
        </blockquote>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman",serif;mso-fareast-language:EN-GB"><br>
            IIRC, if you don't set:<br>
            <br>
            modparam("pua_dialoginfo", "override_lifetime", 14420)<br>
            <br>
            The value is taken from max dialog duration. Can you try
            without this parameter? The parameter should be used only if
            you want to overwrite the dialog module value.<br>
            <br>
            Cheers,<br>
            Daniel<o:p></o:p></span></p>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif"># ----- presence params
              -----</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("presence",
              "db_url", DBURL)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("presence",
              "send_fast_notify", 0)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("presence",
              "db_update_period", 20)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("presence",
              "clean_period", 60)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("presence",
              "max_expires", 14430)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif"># ----- presence_xml
              params -----</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("presence_xml",
              "db_url", DBURL)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("presence_xml",
              "force_active", 1)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif"># -----
              presence_dialoginfo -----</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("presence_dialoginfo",
              "force_single_dialog", 0)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("presence_dialoginfo",
              "force_dummy_dialog", 1)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif"># ----- pua params -----</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("pua", "db_url",
              DBURL)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("pua", "db_mode",
              0)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("pua",
              "update_period", 20)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("pua",
              "dlginfo_increase_version", 0)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("pua",
              "reginfo_increase_version", 0)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif"># ----- pua_dialoginfo
              params -----</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("pua_dialoginfo",
              "send_publish_flag", FLT_DLGINFO)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("pua_dialoginfo",
              "override_lifetime", 14420)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("pua_dialoginfo",
              "include_callid", 1)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("pua_dialoginfo",
              "caller_confirmed", 0)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New ;color:#1F497D",serif">modparam("pua_dialoginfo",
              "include_tags", 1)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <div>
            <p class="MsoNormal" style="margin-bottom:12.0pt"><span
                style="mso-fareast-language:EN-GB">Phil</span><o:p></o:p></p>
          </div>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <div>
            <div style="border:none;border-top:solid #E1E1E1
              1.0pt;padding:3.0pt 0cm 0cm 0cm">
              <p class="MsoNormal"><b><span
                    style="color:windowtext;mso-fareast-language:EN-GB"
                    lang="EN-US">From:</span></b><span
                  style="color:windowtext;mso-fareast-language:EN-GB"
                  lang="EN-US"> Phil Lavin
                  <br>
                  <b>Sent:</b> 22 January 2016 13:19<br>
                  <b>To:</b> </span><a moz-do-not-send="true"
                  href="mailto:miconda@gmail.com"><span
                    style="mso-fareast-language:EN-GB" lang="EN-US">miconda@gmail.com</span></a><span
                  style="color:windowtext;mso-fareast-language:EN-GB"
                  lang="EN-US">; Kamailio (SER) - Users Mailing List
                </span><a moz-do-not-send="true"
                  href="mailto:sr-users@lists.sip-router.org"><span
                    style="mso-fareast-language:EN-GB" lang="EN-US"><sr-users@lists.sip-router.org></span></a><span
                  style="color:windowtext;mso-fareast-language:EN-GB"
                  lang="EN-US"><br>
                  <b>Cc:</b> Telco Team </span><a
                  moz-do-not-send="true"
                  href="mailto:telco-team@synety.com"><span
                    style="mso-fareast-language:EN-GB" lang="EN-US"><a class="moz-txt-link-rfc2396E" href="mailto:telco-team@synety.com"><telco-team@synety.com></a></span></a><span
                  style="color:windowtext;mso-fareast-language:EN-GB"
                  lang="EN-US"><br>
                  <b>Subject:</b> RE: [SR-Users] Strange PUA Behaviour</span><o:p></o:p></p>
            </div>
          </div>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">Hi Daniel,</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">Any thoughts
              on this?</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">Thanks</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <div>
            <p class="MsoNormal"
              style="line-height:13.2pt;background:white"><span
                style="mso-fareast-language:EN-GB">Phil Lavin</span><o:p></o:p></p>
            <p class="MsoNormal"><span
                style="mso-fareast-language:EN-GB">Telecoms Systems
                Manager</span><o:p></o:p></p>
            <p class="MsoNormal"><b><span
                  style="color:#86579E;mso-fareast-language:EN-GB">CloudCall
                  by SYNETY</span></b><span
                style="mso-fareast-language:EN-GB"><br>
              </span><a moz-do-not-send="true"
                href="http://www.cloudcall.com/"><span
                  style="mso-fareast-language:EN-GB">www.cloudcall.com</span></a><o:p></o:p></p>
            <p class="MsoNormal"><b><span
                  style="mso-fareast-language:EN-GB"><br>
                </span></b><span
                style="font-size:10.0pt;mso-fareast-language:EN-GB">T:
                +44 (0) 330 335 0000 / +1 617 982 1600</span><o:p></o:p></p>
            <p class="MsoNormal"><span
                style="font-size:10.0pt;mso-fareast-language:EN-GB">D:
                +44 (0) 116 424 4790 / +1 617 982 4790</span><o:p></o:p></p>
            <p class="MsoNormal" style="margin-bottom:12.0pt"><span
                style="font-size:10.0pt;mso-fareast-language:EN-GB">SM:
              </span><a moz-do-not-send="true"
                href="https://uk.linkedin.com/pub/phil-lavin/25/422/750"><span
                  style="font-size:10.0pt;mso-fareast-language:EN-GB">LinkedIn</span></a><span
                style="font-size:10.0pt;mso-fareast-language:EN-GB">
              </span><o:p></o:p></p>
            <p class="MsoNormal"><a moz-do-not-send="true"
href="http://t.sidekickopen03.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XX43M2cMvVRrZGW2zq9tRVd0tpR56dKNHf2gJW-W02?t=http%3a%2f%2fwww.synety.com%2fblog&si=4668581662425088&pi=98b5dc7b-6a3f-4319-9221-c422f106ebf9"><b><span
                    style="mso-fareast-language:EN-GB">READ OUR BLOG FOR
                    SMARTER COMMUNICATIONS</span></b></a><span
                style="mso-fareast-language:EN-GB"> </span><o:p></o:p></p>
            <p class="MsoNormal" style="margin-bottom:12.0pt"><span
                style="font-size:10.0pt;mso-fareast-language:EN-GB"><br>
              </span><b><span
                  style="font-size:7.5pt;mso-fareast-language:EN-GB">Confidentiality:
                  This e-mail transmission, including any attachments,
                  is intended only for the named recipient(s) and may
                  contain information that is privileged, confidential
                  and/or exempt from disclosure under applicable law. If
                  you have received this transmission in error, or are
                  not the named recipient(s), please notify the sender
                  immediately by return e-mail and permanently delete
                  this transmission, including any attachments.<br>
                  Security: This e-mail and any attachments are believed
                  to be free from any virus but it is the responsibility
                  of the recipient to ensure this is so. E-mail is not a
                  100% secure communication</span></b><span
                style="font-size:7.5pt;mso-fareast-language:EN-GB">.</span><o:p></o:p></p>
          </div>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <div>
            <div style="border:none;border-top:solid #E1E1E1
              1.0pt;padding:3.0pt 0cm 0cm 0cm">
              <p class="MsoNormal"><b><span
                    style="color:windowtext;mso-fareast-language:EN-GB"
                    lang="EN-US">From:</span></b><span
                  style="color:windowtext;mso-fareast-language:EN-GB"
                  lang="EN-US"> Phil Lavin
                  <br>
                  <b>Sent:</b> 20 January 2016 19:52<br>
                  <b>To:</b> </span><a moz-do-not-send="true"
                  href="mailto:miconda@gmail.com"><span
                    style="mso-fareast-language:EN-GB" lang="EN-US">miconda@gmail.com</span></a><span
                  style="color:windowtext;mso-fareast-language:EN-GB"
                  lang="EN-US">; Kamailio (SER) - Users Mailing List
                  <</span><a moz-do-not-send="true"
                  href="mailto:sr-users@lists.sip-router.org"><span
                    style="mso-fareast-language:EN-GB" lang="EN-US">sr-users@lists.sip-router.org</span></a><span
                  style="color:windowtext;mso-fareast-language:EN-GB"
                  lang="EN-US">><br>
                  <b>Cc:</b> Telco Team <</span><a
                  moz-do-not-send="true"
                  href="mailto:telco-team@synety.com"><span
                    style="mso-fareast-language:EN-GB" lang="EN-US"><a class="moz-txt-link-abbreviated" href="mailto:telco-team@synety.com">telco-team@synety.com</a></span></a><span
                  style="color:windowtext;mso-fareast-language:EN-GB"
                  lang="EN-US">><br>
                  <b>Subject:</b> RE: [SR-Users] Strange PUA Behaviour</span><o:p></o:p></p>
            </div>
          </div>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">Hi Daniel,</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">Sorry for the
              delay in replying. I’ve attached blf.cap which shows the
              “light stays on” scenario. You’ll see that the final
              NOTIFY (packet 43) is a “confirmed” rather than a
              “terminated” as per the PUBLISH  (packet 41) that
              triggered it.</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">I’ve also
              attached presentity.txt which is the contents of the DB
              before the pcap was taken.</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">With regards
              to your question about the light going out after the
              entries in the table have expired, this does happen
              automatically. As soon as the table drops down to being
              empty (it takes a couple of minutes to fully clear), the
              light goes off. Subsequent calls will work correctly with
              BLF until it eventually stops working and the whole cycle
              repeats.</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">I have
              repeated the test with subs_db_mode 0 and the same results
              occur. This is, in fact, the state it was in when the
              attached pcap was taken.</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">Do you think
              the problem is in the cleanup of the data or in the way
              the active dialog is matched against the set of data in
              the table? Happy to prod through the code with gdb if you
              can point me in the direction of where to start looking.</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">Cheers</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <div>
            <p class="MsoNormal" style="margin-bottom:12.0pt"><span
                style="mso-fareast-language:EN-GB">Phil</span><o:p></o:p></p>
          </div>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <div>
            <div style="border:none;border-top:solid #E1E1E1
              1.0pt;padding:3.0pt 0cm 0cm 0cm">
              <p class="MsoNormal"><b><span
                    style="color:windowtext;mso-fareast-language:EN-GB"
                    lang="EN-US">From:</span></b><span
                  style="color:windowtext;mso-fareast-language:EN-GB"
                  lang="EN-US"> Daniel-Constantin Mierla [</span><a
                  moz-do-not-send="true" href="mailto:miconda@gmail.com"><span
                    style="mso-fareast-language:EN-GB" lang="EN-US"><a class="moz-txt-link-freetext" href="mailto:miconda@gmail.com">mailto:miconda@gmail.com</a></span></a><span
                  style="color:windowtext;mso-fareast-language:EN-GB"
                  lang="EN-US">]
                  <br>
                  <b>Sent:</b> 19 January 2016 23:26<br>
                  <b>To:</b> Phil Lavin <</span><a
                  moz-do-not-send="true"
                  href="mailto:phil.lavin@synety.com"><span
                    style="mso-fareast-language:EN-GB" lang="EN-US"><a class="moz-txt-link-abbreviated" href="mailto:phil.lavin@synety.com">phil.lavin@synety.com</a></span></a><span
                  style="color:windowtext;mso-fareast-language:EN-GB"
                  lang="EN-US">>; Kamailio (SER) - Users Mailing List
                  <</span><a moz-do-not-send="true"
                  href="mailto:sr-users@lists.sip-router.org"><span
                    style="mso-fareast-language:EN-GB" lang="EN-US">sr-users@lists.sip-router.org</span></a><span
                  style="color:windowtext;mso-fareast-language:EN-GB"
                  lang="EN-US">><br>
                  <b>Subject:</b> Re: [SR-Users] Strange PUA Behaviour</span><o:p></o:p></p>
            </div>
          </div>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal" style="margin-bottom:12.0pt">Can you get
            a pcap for a case with the new config? Being traveling, but
            maybe I get a chance to look at it soon.<br>
            <br>
            Reading quickly on some docs, I noticed that subs_db_mode=3
            and notifier_proceses=0 rise a conflict:<br>
            <br>
            <a moz-do-not-send="true"
href="http://www.kamailio.org/docs/modules/devel/modules/presence.html#presence.p.notifier_processes">http://www.kamailio.org/docs/modules/devel/modules/presence.html#presence.p.notifier_processes</a><br>
            <br>
            Can you try with subs_db_mode=0 and see if works different?<br>
            <br>
            Cheers,<br>
            Daniel<o:p></o:p></p>
          <div>
            <p class="MsoNormal">On 19/01/16 20:35, Phil Lavin wrote:<o:p></o:p></p>
          </div>
          <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
            <p class="MsoNormal"><span style="color:#1F497D">Just to
                follow this up with more recent results. I’ve simplified
                things and have been testing calling from a Kamailio
                registered UA to a phone on the PSTN. There’s only 1
                dialog in Kamailio for this and the results are just as
                strange. BLF works for a while and then breaks. In this
                particular case, the light does not go off after the
                call.</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">I have set
                subs_db_mode to 3 (new config below) and I can
                consistently reproduce the BLF light not turning off
                after the call has ended (the phone does not get sent a
                terminate). As soon as I truncate pua and presentity
                tables in the DB, the next call works fine.</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-family:"Courier
                New ;color:#1F497D",serif">modparam("presence",
                "subs_db_mode", 3)</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-family:"Courier
                New ;color:#1F497D",serif">modparam("presence",
                "notifier_processes", 0)</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-family:"Courier
                New ;color:#1F497D",serif">modparam("presence",
                "db_url", DBURL)</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-family:"Courier
                New ;color:#1F497D",serif">modparam("presence",
                "send_fast_notify", 0)</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-family:"Courier
                New ;color:#1F497D",serif">modparam("presence",
                "db_update_period", 20)</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-family:"Courier
                New ;color:#1F497D",serif">modparam("presence_xml",
                "db_url", DBURL)</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-family:"Courier
                New ;color:#1F497D",serif">modparam("presence_xml",
                "force_active", 1)</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-family:"Courier
                New ;color:#1F497D",serif">modparam("presence_dialoginfo",
                "force_single_dialog", 1)</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-family:"Courier
                New ;color:#1F497D",serif">modparam("presence_dialoginfo",
                "force_dummy_dialog", 1)</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-family:"Courier
                New ;color:#1F497D",serif">modparam("pua",
                "db_url", DBURL)</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-family:"Courier
                New ;color:#1F497D",serif">modparam("pua",
                "db_mode", 2)</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-family:"Courier
                New ;color:#1F497D",serif">modparam("pua",
                "update_period", 20)</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-family:"Courier
                New ;color:#1F497D",serif">modparam("pua_dialoginfo",
                "send_publish_flag", FLT_DLGINFO)</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-family:"Courier
                New ;color:#1F497D",serif">modparam("pua_dialoginfo",
                "override_lifetime", 124)</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Before I
                truncate, the tables both a good number of rows in each
                (70ish).</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Is it that
                they’re not being correctly cleaned up here?</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Thanks</span><o:p></o:p></p>
            <p class="MsoNormal"><span
                style="mso-fareast-language:EN-GB"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
                style="mso-fareast-language:EN-GB">Phil</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <div>
              <div style="border:none;border-top:solid #E1E1E1
                1.0pt;padding:3.0pt 0cm 0cm 0cm">
                <p class="MsoNormal"><b><span
                      style="color:windowtext;mso-fareast-language:EN-GB"
                      lang="EN-US">From:</span></b><span
                    style="color:windowtext;mso-fareast-language:EN-GB"
                    lang="EN-US"> sr-users [</span><a
                    moz-do-not-send="true"
                    href="mailto:sr-users-bounces@lists.sip-router.org"><span
                      style="mso-fareast-language:EN-GB" lang="EN-US"><a class="moz-txt-link-freetext" href="mailto:sr-users-bounces@lists.sip-router.org">mailto:sr-users-bounces@lists.sip-router.org</a></span></a><span
                    style="color:windowtext;mso-fareast-language:EN-GB"
                    lang="EN-US">]
                    <b>On Behalf Of </b>Phil Lavin<br>
                    <b>Sent:</b> 19 January 2016 18:11<br>
                    <b>To:</b> </span><a moz-do-not-send="true"
                    href="mailto:miconda@gmail.com"><span
                      style="mso-fareast-language:EN-GB" lang="EN-US">miconda@gmail.com</span></a><span
                    style="color:windowtext;mso-fareast-language:EN-GB"
                    lang="EN-US">; Kamailio (SER) - Users Mailing List
                  </span><a moz-do-not-send="true"
                    href="mailto:sr-users@lists.sip-router.org"><span
                      style="mso-fareast-language:EN-GB" lang="EN-US"><sr-users@lists.sip-router.org></span></a><span
                    style="color:windowtext;mso-fareast-language:EN-GB"
                    lang="EN-US"><br>
                    <b>Subject:</b> Re: [SR-Users] Strange PUA Behaviour</span><o:p></o:p></p>
              </div>
            </div>
            <p class="MsoNormal"> <o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Below is
                the relevant presence/pua stuff. Let me know if I should
                be examining other tables.</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">When the
                call ends, there are no dialogs remaining in the dialog
                table. A few things do hang around in the presentity and
                pua tables for a short period of time.</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Regarding
                CLI changing, it does seem to do so. When the call is
                routed onto the billing platform, the CLI is changed to
                the local “extension” (e.g. 9989) on the leg that comes
                back to Kamailio, destined for the callee.</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Regarding
                only advertising the leg going to the callee, not all
                calls will terminate on a UA registered against Kamailio
                (e.g. calls from a Kamailio registered UA to the PSTN).
                The more I think about it, determining the correct leg
                in all scenarios will be difficult.</span><o:p></o:p></p>
          </blockquote>
          <p class="MsoNormal" style="margin-bottom:12.0pt"><span
              style="font-size:12.0pt"> </span><o:p></o:p></p>
          <pre>-- <o:p></o:p></pre>
          <pre>Daniel-Constantin Mierla<o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a><o:p></o:p></pre>
          <pre>Book: SIP Routing With Kamailio - <a moz-do-not-send="true" href="http://www.asipto.com">http://www.asipto.com</a><o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="http://miconda.eu">http://miconda.eu</a><o:p></o:p></pre>
        </blockquote>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman",serif;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
        <pre>-- <o:p></o:p></pre>
        <pre>Daniel-Constantin Mierla<o:p></o:p></pre>
        <pre><a moz-do-not-send="true" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a><o:p></o:p></pre>
        <pre>Book: SIP Routing With Kamailio - <a moz-do-not-send="true" href="http://www.asipto.com">http://www.asipto.com</a><o:p></o:p></pre>
        <pre><a moz-do-not-send="true" href="http://miconda.eu">http://miconda.eu</a><o:p></o:p></pre>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://miconda.eu">http://miconda.eu</a></pre>
  </body>
</html>