You can send your own custom notes in xml. That is what I do to make presence a little bit reliable.<br><br>Best regards, Robert.<br><br><div class="gmail_quote">2010/1/27 Jerry Richards <span dir="ltr">&lt;<a href="mailto:jerry.richards@teotech.com">jerry.richards@teotech.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">There are two places in the XML body that are 
diffierent:</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"><font face="Courier New"><font face="Arial">FS Rcvd 
</font>PUBLISH</font> has:<font face="Courier New">  
</font></font></span><span><font color="#0000ff" size="2"><span><font color="#0000ff" face="Courier New" size="2">&lt;rpid:away/&gt; and 
&lt;dm:note&gt;Away&lt;/dm:note&gt;</font></span></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2"><span><font color="#0000ff" face="Arial" size="2">FS Sent <font face="Courier New">NOTIFY</font>   has:<font face="Courier New">  </font></font></span><font face="Courier New">&lt;rpid:busy/&gt; and 
&lt;dm:note&gt;Busy&lt;/dm:note&gt;</font></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">This behavior (above) is why I&#39;m not seeing the 
published presence at the subscribing softphone.  FS should be sending the 
new <font face="Courier New">Away</font> status in the <font face="Courier New">NOTIFY</font> message.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">I did notice there is an &quot;<font face="Courier New">[ERR] 
sofia_presnece.c:674</font>&quot; FS log between the <font face="Courier New">PUBLISH</font> and the <font face="Courier New">NOTIFY<font face="Arial"> (please see Line 89 of</font> <a href="http://pastebin.freeswitch.org/11953" target="_blank">http://pastebin.freeswitch.org/11953</a>)</font>.  
Line 674 is in the <font face="Courier New">sofia_presence_event_thread_run()</font> function where it 
calls <font face="Courier New">switch_mutex_unlock(mod_sofia_globals.mutex)</font>.  Do 
you think this <font face="Courier New">[ERR]</font> is related to why FS 
sends the previous status and not updated status?</font></span></div><div class="im">
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Thanks And Best Regards,</font></span></div>
<div><font color="#0000ff"><font face="Arial" size="2"><span>Jerry</span></font></font></div>
<div><font color="#0000ff" size="2"></font> </div>
</div><blockquote style="margin-right: 0px;">
  <div dir="ltr" align="left" lang="en-us">
  <hr>
  <font face="Tahoma" size="2"><div class="im"><b>From:</b> Anthony Minessale 
  [mailto:<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>] <br></div><b>Sent:</b> Tuesday, January 26, 
  2010 1:22 PM<div><div></div><div class="h5"><br><b>To:</b> 
  <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br><b>Subject:</b> Re: 
  [Freeswitch-users] Presence Change Distribution<br></div></div></font><br></div><div><div></div><div class="h5">
  <div></div>its sending a notify to them right away (line 174 of your 
  PB)<br>the xml in the notify we send looks the same as what they sent except 
  one thing <br><br>They send: &lt;rpid:away/&gt;<br>We send: 
  &lt;rpid:busy/&gt;<br><br>everybody who implements this seems to have their 
  own idea of what to say here.<br><br>This crazy xml presence crap is pure 
  garbage so maybe that&#39;s it.<br><br> <br><br>
  <div class="gmail_quote">On Tue, Jan 26, 2010 at 3:02 PM, Jerry Richards <span dir="ltr">&lt;<a href="mailto:jerry.richards@teotech.com" target="_blank">jerry.richards@teotech.com</a>&gt;</span> 
  wrote:<br>
  <blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
    <div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Okay, I 
    setup my FS to force SUBSCRIBE Expires to 3600 seconds.  Then I 
    captured a FS console trace of a Bria softphone changing it&#39;s presence state 
    from &#39;Busy&#39; to &#39;Away&#39; (see <a href="http://pastebin.freeswitch.org/11953" target="_blank">http://pastebin.freeswitch.org/11953</a>) and observed that 
    the subscribing Bria softphone did not update to &#39;Away&#39;.  At the same 
    time, I executed the sqlite3 app and pasted each of the 3 SQL select 
    statements I saw in the FS console log, and pasted them below.  I&#39;m new 
    to sqlite3.  Do you see what my issue is?</font></span></div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">sqlite&gt;<br>sqlite&gt; select 
    sip_subscriptions.proto,sip_subscriptions.sip_user,sip_subscriptions.sip_host,sip_subscriptions.sub_to_user,sip_subscriptions.sub_to_host,sip_subscriptions.event,sip_subscriptions.contact,sip_subscriptions.call_id,sip_subscriptions.full_from,sip_subscriptions.full_via,sip_subscriptions.expires,sip_subscriptions.user_agent,sip_subscriptions.accept,sip_subscriptions.profile_name,&#39;Away&#39;,&#39;away&#39;,&#39;192.168.72.79&#39;,sip_presence.status,sip_presence.rpid 
    from sip_subscriptions left join sip_presence on 
    (sip_subscriptions.sub_to_user=sip_presence.sip_user and 
    sip_subscriptions.sub_to_host=sip_presence.sip_host and 
    sip_subscriptions.profile_name=sip_presence.profile_name) where 
    sip_subscriptions.expires &gt; -1 and (event=&#39;presence&#39; or event=&#39;presence&#39;) 
    and sub_to_user=&#39;5401&#39; and (sub_to_host=&#39;192.168.72.79&#39; or presence_hosts 
    like &#39;%192.168.72.79%&#39;) and (sip_subscriptions.profile_name = &#39;internal&#39; or 
    sip_subscriptions.presence_hosts != 
    sip_subscriptions.sub_to_host);<br>sip|5382|192.168.72.79|5401|192.168.72.79|presence|&quot;5382 
    on 79&quot; &lt;<a href="http://sip:5382@192.168.72.150:34672" target="_blank">sip:5382@192.168.72.150:34672</a>&gt;|ZTQ2ZWQwZGRlZjRiNTdkYTJjNGM5NTgzOWIyNmIwZmU.|&quot;5382 
    on 79&quot; &lt;<a href="mailto:sip%3A5382@192.168.72.79" target="_blank">sip:5382@192.168.72.79</a>&gt;;tag=68bb4eb6|SIP/2.0/UDP 
    192.168.72.150:34672;branch=z9hG4bK-d8754z-eafc60166305eaef-1---d8754z-;rport=34672|1264546204|Teo 
    Softphone release 2.5.4 stamp 
    55958||internal|Away|away|192.168.72.79|Away|away<br>sqlite&gt;<br>sqlite&gt;<br>sqlite&gt;<br>sqlite&gt;<br>sqlite&gt;<br>sqlite&gt;<br>sqlite&gt;<br>sqlite&gt;<br>sqlite&gt; 
    select 
    sip_subscriptions.proto,sip_subscriptions.sip_user,sip_subscriptions.sip_host,sip_subscriptions.sub_to_user,sip_subscriptions.sub_to_host,sip_subscriptions.event,sip_subscriptions.contact,sip_subscriptions.call_id,sip_subscriptions.full_from,sip_subscriptions.full_via,sip_subscriptions.expires,sip_subscriptions.user_agent,sip_subscriptions.accept,sip_subscriptions.profile_name,&#39;Away&#39;,&#39;away&#39;,&#39;192.168.72.79&#39;,sip_presence.status,sip_presence.rpid 
    from sip_subscriptions left join sip_presence on 
    (sip_subscriptions.sub_to_user=sip_presence.sip_user and 
    sip_subscriptions.sub_to_host=sip_presence.sip_host and 
    sip_subscriptions.profile_name=sip_presence.profile_name) where 
    sip_subscriptions.expires &gt; -1 and (event=&#39;presence&#39; or event=&#39;presence&#39;) 
    and sub_to_user=&#39;5401&#39; and (sub_to_host=&#39;192.168.72.79&#39; or presence_hosts 
    like &#39;%192.168.72.79%&#39;) and (sip_subscriptions.profile_name = 
    &#39;internal-ipv6&#39; or sip_subscriptions.presence_hosts != 
    sip_subscriptions.sub_to_host);<br>sqlite&gt;<br>sqlite&gt;<br>sqlite&gt;<br>sqlite&gt;<br>sqlite&gt;<br>sqlite&gt;<br>sqlite&gt;<br>sqlite&gt; 
    select 
    sip_subscriptions.proto,sip_subscriptions.sip_user,sip_subscriptions.sip_host,sip_subscriptions.sub_to_user,sip_subscriptions.sub_to_host,sip_subscriptions.event,sip_subscriptions.contact,sip_subscriptions.call_id,sip_subscriptions.full_from,sip_subscriptions.full_via,sip_subscriptions.expires,sip_subscriptions.user_agent,sip_subscriptions.accept,sip_subscriptions.profile_name,&#39;Away&#39;,&#39;away&#39;,&#39;192.168.72.79&#39;,sip_presence.status,sip_presence.rpid 
    from sip_subscriptions left join sip_presence on 
    (sip_subscriptions.sub_to_user=sip_presence.sip_user and 
    sip_subscriptions.sub_to_host=sip_presence.sip_host and 
    sip_subscriptions.profile_name=sip_presence.profile_name) where 
    sip_subscriptions.expires &gt; -1 and (event=&#39;presence&#39; or event=&#39;presence&#39;) 
    and sub_to_user=&#39;5401&#39; and (sub_to_host=&#39;192.168.72.79&#39; or presence_hosts 
    like &#39;%192.168.72.79%&#39;) and (sip_subscriptions.profile_name = &#39;external&#39; or 
    sip_subscriptions.presence_hosts != 
    sip_subscriptions.sub_to_host);<br>sqlite&gt;<br></font></span></div>
    <div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Thanks 
    and Best Regards,</font></span></div>
    <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Jerry</font></span></div><br></div>
    <blockquote style="margin-right: 0px;">
      <div dir="ltr" align="left" lang="en-us">
      <hr>
      <font face="Tahoma" size="2"><b>From:</b> Anthony Minessale [mailto:<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>] <br><b>Sent:</b> Monday, 
      January 25, 2010 11:05 AM
      <div>
      <div></div>
      <div><br><b>To:</b> <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br><b>Subject:</b> 
      Re: [Freeswitch-users] Presence Change 
      Distribution<br></div></div></font><br></div>
      <div>
      <div></div>
      <div>
      <div></div>the notify will be instant after the publish<br>the notify you 
      see are not triggered by the publish or they would be instant.<br><br>Same 
      drill, turn on presence debugging in sofia.conf.xml <br>and look at the 
      sql stmts and see why<br><br><br>
      <div class="gmail_quote">On Mon, Jan 25, 2010 at 12:30 PM, Jerry Richards 
      <span dir="ltr">&lt;<a href="mailto:jerry.richards@teotech.com" target="_blank">jerry.richards@teotech.com</a>&gt;</span> wrote:<br>
      <blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
        <div>
        <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Okay, I notice that if I reduce the Presence SUBSCRIBE 
        Expires duration (from 3600 seconds to 60 seconds), then the delay 
        between PUBLISH&#39;s and NOTIFY&#39;s is reduced, but FS still 
        waits nearly 45 seconds to send the NOTIFY&#39;s after it receives a 
        PUBLISH.</font></span></div>
        <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
        <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Can 
        a change be made in FS so that NOTIFYs are sent as a direct result of 
        receipt of the PUBLISH message?  And not tied to the SUBSCRIBE 
        expiration?  I really don&#39;t want to configure all my phones to 
        re-subscribe every 30 or 15 seconds.</font></span></div>
        <div>
        <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
        <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Thanks and Best Regards,</font></span></div>
        <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Jerry</font></span></div>
        <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div><br></div>
        <blockquote style="margin-right: 0px;">
          <div dir="ltr" align="left" lang="en-us">
          <hr>
          <font face="Tahoma" size="2"><b>From:</b> RobertT [mailto:<a href="mailto:siniypin@gmail.com" target="_blank">siniypin@gmail.com</a>] 
          <br><b>Sent:</b> Tuesday, December 29, 2009 12:02 AM<br><b>To:</b> <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br><b>Subject:</b> 
          Re: [Freeswitch-users] Presence Change 
          Distribution<br></font><br></div>
          <div>
          <div></div>
          <div>
          <div></div>You can try to reduce your registration time. <br>I for one 
          made my client apps send PUBLISH message every minute in addition to 
          reduced registration time.<br><br>Regards, Robert.<br><br>
          <div class="gmail_quote">2009/12/28 Jerry Richards <span dir="ltr">&lt;<a href="mailto:jerry.richards@teotech.com" target="_blank">jerry.richards@teotech.com</a>&gt;</span><br>
          <blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Is there a setting to control how fast FS 
            distributes presence changes to<br>subscribers?  Currently, it 
            appears to take several minutes before I see<br>presence changes. 
             I would like to see them almost instantaneously, 
            if<br>possible.<br><br>Thanks and Best 
            Regards,<br>Jerry<br><br><br>_______________________________________________<br>FreeSWITCH-users 
            mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div></div></blockquote></div><br>_______________________________________________<br>FreeSWITCH-users 
        mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: 
      anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> 
      #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:+19193869900<br></div></div></blockquote></div><br>_______________________________________________<br>
FreeSWITCH-users 
    mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: 
  anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: 
  <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> 
  #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:+19193869900<br></div></div></blockquote></div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>