<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    thanks to tackling this further ... see my comments inline...<br>
    <br>
    <div class="moz-cite-prefix">On 26/01/16 11:46, Phil Lavin wrote:<br>
    </div>
    <blockquote
cite="mid:AM4PR03MB153783B1F0DD929427EA5353F6D80@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-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;}
@list l1
        {mso-list-id:1689943631;
        mso-list-type:hybrid;
        mso-list-template-ids:-65004172 134807553 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l1: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 l1: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 l1: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 l1: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 l1: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 l1: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 l1: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 l1: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 l1: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">We now have
            something of a resolution to this. Config is below. The key
            differences are:<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoListParagraph"
          style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><!--[if !supportLists]--><span
            style="font-family:Symbol;color:#1F497D"><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></p>
      </div>
    </blockquote>
    <br>
    OK -- still in my todo to pursue this case.<br>
    <br>
    <blockquote
cite="mid:AM4PR03MB153783B1F0DD929427EA5353F6D80@AM4PR03MB1537.eurprd03.prod.outlook.com"
      type="cite">
      <div class="WordSection1">
        <p class="MsoListParagraph"
          style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><span
            style="color:#1F497D"><o:p></o:p></span></p>
        <p class="MsoListParagraph"
          style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><!--[if !supportLists]--><span
            style="font-family:Symbol;color:#1F497D"><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></p>
      </div>
    </blockquote>
    <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<br>
    <blockquote
cite="mid:AM4PR03MB153783B1F0DD929427EA5353F6D80@AM4PR03MB1537.eurprd03.prod.outlook.com"
      type="cite">
      <div class="WordSection1">
        <p class="MsoListParagraph"
          style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><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="font-family:"Courier
            New";color:#1F497D"># ----- presence params -----<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("presence", "db_url",
            DBURL)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("presence",
            "send_fast_notify", 0)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("presence",
            "db_update_period", 20)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("presence",
            "clean_period", 60)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("presence", "max_expires",
            14430)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D"># ----- presence_xml params -----<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("presence_xml", "db_url",
            DBURL)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("presence_xml",
            "force_active", 1)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D"># ----- presence_dialoginfo -----<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("presence_dialoginfo",
            "force_single_dialog", 0)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("presence_dialoginfo",
            "force_dummy_dialog", 1)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D"># ----- pua params -----<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("pua", "db_url", DBURL)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("pua", "db_mode", 0)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("pua", "update_period",
            20)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("pua",
            "dlginfo_increase_version", 0)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("pua",
            "reginfo_increase_version", 0)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D"># ----- pua_dialoginfo params -----<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("pua_dialoginfo",
            "send_publish_flag", FLT_DLGINFO)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("pua_dialoginfo",
            "override_lifetime", 14420)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("pua_dialoginfo",
            "include_callid", 1)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("pua_dialoginfo",
            "caller_confirmed", 0)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New";color:#1F497D">modparam("pua_dialoginfo",
            "include_tags", 1)<o:p></o:p></span></p>
        <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>
        <div>
          <p class="MsoNormal" style="margin-bottom:12.0pt"><span
              style="mso-fareast-language:EN-GB">Phil</span><span
              style="font-size:7.5pt;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
        </div>
        <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> 22 January 2016 13:19<br>
                <b>To:</b> <a class="moz-txt-link-abbreviated" 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:#1F497D">Hi Daniel,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">Any thoughts on
            this?<o:p></o:p></span></p>
        <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="color:#1F497D">Thanks<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <div>
          <p class="MsoNormal"
            style="line-height:13.2pt;background:white"><span
              style="mso-fareast-language:EN-GB">Phil Lavin<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="mso-fareast-language:EN-GB">Telecoms
              Systems Manager<o:p></o:p></span></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>
              <a moz-do-not-send="true" href="http://www.cloudcall.com/">www.cloudcall.com</a><b><o:p></o:p></b></span></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<o:p></o:p></span></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<o:p></o:p></span></p>
          <p class="MsoNormal" style="margin-bottom:12.0pt"><span
              style="font-size:10.0pt;mso-fareast-language:EN-GB">SM:
              <a moz-do-not-send="true"
                href="https://uk.linkedin.com/pub/phil-lavin/25/422/750">LinkedIn</a>
            </span><span style="mso-fareast-language:EN-GB"><o:p></o:p></span></p>
          <p class="MsoNormal"><b><u><span
                  style="color:#0563C1;mso-fareast-language:EN-GB"><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">READ

                    OUR BLOG FOR SMARTER COMMUNICATIONS</a></span></u></b><span
              style="mso-fareast-language:EN-GB"> <o:p></o:p></span></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">.<o:p></o:p></span></p>
        </div>
        <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> 20 January 2016 19:52<br>
                <b>To:</b> <a moz-do-not-send="true"
                  href="mailto:miconda@gmail.com">miconda@gmail.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"><span style="color:#1F497D">Hi Daniel,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></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.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></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.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></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.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></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.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></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.<o:p></o:p></span></p>
        <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="color:#1F497D">Cheers<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <div>
          <p class="MsoNormal" style="margin-bottom:12.0pt"><span
              style="mso-fareast-language:EN-GB">Phil</span><span
              style="font-size:7.5pt;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
        </div>
        <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> 19 January 2016 23:26<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>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">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<span
            style="font-size:12.0pt;mso-fareast-language:EN-GB"><o:p></o:p></span></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"">modparam("presence",
              "subs_db_mode", 3)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New \;color\:\#1F497D"">modparam("presence",
              "notifier_processes", 0)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New \;color\:\#1F497D"">modparam("presence",
              "db_url", DBURL)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New \;color\:\#1F497D"">modparam("presence",
              "send_fast_notify", 0)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New \;color\:\#1F497D"">modparam("presence",
              "db_update_period", 20)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New \;color\:\#1F497D"">modparam("presence_xml",
              "db_url", DBURL)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New \;color\:\#1F497D"">modparam("presence_xml",
              "force_active", 1)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New \;color\:\#1F497D"">modparam("presence_dialoginfo",
              "force_single_dialog", 1)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New \;color\:\#1F497D"">modparam("presence_dialoginfo",
              "force_dummy_dialog", 1)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New \;color\:\#1F497D"">modparam("pua", "db_url",
              DBURL)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New \;color\:\#1F497D"">modparam("pua", "db_mode", 2)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New \;color\:\#1F497D"">modparam("pua",
              "update_period", 20)</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New \;color\:\#1F497D"">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"">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 [<a moz-do-not-send="true"
                    href="mailto:sr-users-bounces@lists.sip-router.org">mailto:sr-users-bounces@lists.sip-router.org</a>]
                  <b>On Behalf Of </b>Phil Lavin<br>
                  <b>Sent:</b> 19 January 2016 18:11<br>
                  <b>To:</b> <a moz-do-not-send="true"
                    href="mailto:miconda@gmail.com">miconda@gmail.com</a>;
                  Kamailio (SER) - Users Mailing List
                  <a moz-do-not-send="true"
                    href="mailto:sr-users@lists.sip-router.org"><sr-users@lists.sip-router.org></a><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;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>