subscription to presence is not working.

699 views
Skip to first unread message

vorr...@gmail.com

unread,
May 22, 2015, 4:17:30 AM5/22/15
to sip...@googlegroups.com
I've configure freeswitch to handle presence subscription and using the sample from http://sipjs.com/api/0.7.0/subscription/. When I login to freeswitch by using Ekiga, there's no notification triggered.

However, on the other way, when I connect to freeswitch via SIP.js, it seems the presence message has been sent to Ekiga correctly.


This is my presence configuration in freeswitch
/usr/local/freeswitch/conf/sip_profiles/internal.xml
I 've referred to this web for the configuration http://www.microweb10.com/index.php/en/tutorials/enable-presence-fs

<param name="manage-presence" value="true"/>
<param name="send-presence-on-register" value="true"/>
<param name="presence-probe-on-register" value="true"/>
<param name="presence-proto-lookup" value="true"/>
<param name="manage-shared-appearance" value="true"/>
<param name="dbname" value="share_presence"/>
<param name="presence-hosts" value="$${domain}"/>
<param name="force-register-domain" value="$${domain}"/>
<param name="force-register-db-domain" value="$${domain}"/>


This is my code for subscription. I've tried URI in both 'sip:10...@192.168.1.106' and '10...@192.168.1.106'. My user is 10...@192.168.1.106.

var subscription = userAgent.subscribe('sip:10...@192.168.1.106', 'presence', { expires: 3600 });

subscription.on('notify', function(notification) {
console.log('Notification ' + notification.request.body);
});

James Criscuolo

unread,
May 22, 2015, 9:34:25 AM5/22/15
to sip...@googlegroups.com, vorr...@gmail.com, vorr...@gmail.com
Hi,
I'm not really sure of your setup, but it sounds like SIP.js is behaving as you expect it to.

In terms of FreeSWITCH, I haven't really worked with any of their presence code, so I can't really help with the individual problem. Before moving on, you should try to figure out what version of FreeSWITCH that guide is referencing. It is likely an old version, considering they still link to the wiki, and FreeSWITCH has moved to a new system (confluence).  It wouldn't surprise me if FreeSWITCH has added or removed variables since the version they are referencing. Beyond that, this sounds like a problem directly with FreeSWITCH, so you may find more knowledgable help on their mailing lists: http://lists.freeswitch.org/mailman/listinfo.

Thanks,
James


On Friday, May 22, 2015 at 4:17:30 AM UTC-4, vorr...@gmail.com wrote:
I've configure freeswitch to handle presence subscription and using the sample from http://sipjs.com/api/0.7.0/subscription/.  When I login to freeswitch by using Ekiga, there's no notification triggered.

However, on the other way, when I connect to freeswitch via SIP.js, it seems the presence message has been sent to Ekiga correctly.


This is my presence configuration in freeswitch
/usr/local/freeswitch/conf/sip_profiles/internal.xml
I 've referred to this web for the configuration http://www.microweb10.com/index.php/en/tutorials/enable-presence-fs

<param name="manage-presence" value="true"/>
<param name="send-presence-on-register" value="true"/>
<param name="presence-probe-on-register" value="true"/>
<param name="presence-proto-lookup" value="true"/>
<param name="manage-shared-appearance" value="true"/>
<param name="dbname" value="share_presence"/>
<param name="presence-hosts" value="$${domain}"/>
<param name="force-register-domain" value="$${domain}"/>
<param name="force-register-db-domain" value="$${domain}"/>


This is my code for subscription.  I've tried URI in both 'sip:10...@192.168.1.106' and '10...@192.168.1.106'.  My user is 10...@192.168.1.106.

var subscription = userAgent.subscribe('sip:1000@192.168.1.106', 'presence', { expires: 3600 });

shahee...@gmail.com

unread,
Nov 27, 2019, 12:21:26 PM11/27/19
to SIP.js
Hi everyone,

I'm trying to implement this feature now for a project since 2 days but I have some difficulties to understand the documentation (0.15.X) to use it... Someone can give me an easy solution (or a link) to make a request to a SIP server to get the presence of a contact ?

Regards
Reply all
Reply to author
Forward
0 new messages