<div dir="ltr"><div>Hi, <br></div><div>the BLF lights comes online during call. Problem is when the watchers phone is rebooted and the lights after reboot are off, but before restart they were green/red.</div><div><br></div><div>I looked to the source code of presence module and I think that I found the problematic part in function <b>update_subscrition()</b> in file <b>modules/presence/subscribe.c</b>:</div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">        if(subs->expires!= 0 && subs->event->wipeer)<br>        {<br>            LM_DBG("send Notify with winfo\n");<br>            if(query_db_notify(&subs->pres_uri, subs->event->wipeer, subs)< 0)<br>            {<br>                LM_ERR("Could not send notify winfo\n");<br>                goto error;<br>            }<br>            if(subs->send_on_cback== 0)<br>            {<br>                if(notify(subs, NULL, NULL, 0, 0)< 0)<br>                {<br>                    LM_ERR("Could not send notify\n");<br>                    goto error;<br>                }<br>            }<br>        }<br>        else<br>        {<br>            if(send_fast_notify && (notify(subs, NULL, NULL, 0, 0)< 0))<br>            {<br>                LM_ERR("Could not send notify\n");<br>                goto error;<br>            }<br>        }</span><br></div><div>The presence module is always going to this line> <span style="font-family:monospace,monospace">if(send_fast_notify && (notify(subs, NULL, NULL, 0, 0)< 0))</span></div><div>and it sends just empty notify, it should send the last notify (which was from the last call).</div><div>What is <span style="font-family:monospace,monospace">subs->event->wipeer</span> and why do we need to check it?</div><div><br></div><div>Any help is appreciated. <br></div></div><br><div class="gmail_quote"><div dir="ltr">po 16. 7. 2018 o 9:37 Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> napísal(a):<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>Hello,<br>
    </p>
    <br>
    <div class="m_-7594848765074083886moz-cite-prefix">On 12.07.18 16:41, Michal Škuta wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>Hello,</div>
        <div><br>
        </div>
        <div>I am trying make presence module work with Kamailio. Right
          now I am testing these modules: presence, presence_xml,
          presence_dialoginfo, pua and pua_dialoginfo.</div>
        <div><br>
        </div>
        <div>I had some success, the BLF is working only when the
          monitored extension is calling. When the monitored extension
          is calling, then the BLF changes its color (red). After end of
          the call the BLF changes color to green.</div>
        <div>
          <pre><span style="font-family:arial,helvetica,sans-serif">My problem is when a User comes on-line then it sends SUBSCRIBE with *Event: dialog* and
don't get notified of its subscribers state and BLF is not changed.
</span></pre>
        </div>
      </div>
    </blockquote>
    <br>
    does it come online during a call?<br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <pre><span style="font-family:arial,helvetica,sans-serif">I found similar problem in this mail list :
<a href="https://lists.kamailio.org/pipermail/sr-users/2017-March/096314.html" target="_blank">https://lists.kamailio.org/pipermail/sr-users/2017-March/096314.html</a> But is not working for me.


</span></pre>
          <pre><span style="font-family:arial,helvetica,sans-serif">Second question is about BLF and offline state. I can not found anything in RFC, there is no offline state, no way to turn off the BLF lamp from green to OFF.
</span></pre>
          <pre><span style="font-family:arial,helvetica,sans-serif">I found only this pdf from grandstream: <a href="http://www.grandstream.com/sites/default/files/Resources/GXP21x0_Eventlist_BLF_Guide.pdf" target="_blank">http://www.grandstream.com/sites/default/files/Resources/GXP21x0_Eventlist_BLF_Guide.pdf</a>  mentioning offline state on page 8.
</span></pre>
          <pre><span style="font-family:arial,helvetica,sans-serif">Does anyone have experience with it?
</span></pre>
        </div>
      </div>
    </blockquote>
    <br>
    BLF is about dialog states, not user (device) states, so it is about
    being in a call (busy) or or not. Not to get notifications about it,
    you should unsubscribe for dialog event.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <pre class="m_-7594848765074083886moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="m_-7594848765074083886moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a class="m_-7594848765074083886moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_-7594848765074083886moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio World Conference -- <a class="m_-7594848765074083886moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a></pre>
  </div>

</blockquote></div>