You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sip.ua | unable to add a listener to a nonexistent event notify sip-0.5.0.js:168
TypeError: Invalid or uninitialized event: notify
at Object.EventEmitter.on (http://localhost:8080/js/sip-0.5.0.js:321:13)
at new homeController (http://localhost:8080/app/controllers/homeController.js:6:19)
//Subscribes to the presence information of [email protected]varsubscription=myUA.subscribe('[email protected]','presence');// Once subscribed, receive notifications and print out the presence informationsubscription.on('notify',function(notification){console.log(notification.body);});
Thanks for the fast reply! That new example makes more sense and it works just fine:
//Subscribes to the presence information of [email protected]varsubscription=userAgent.subscribe('[email protected]','presence');// Once subscribed, receive notifications and print out the presence informationsubscription.on('notify',function(notification){console.log(notification.request.body);});
Activity
josephfrazier commentedon Apr 28, 2014
Hi Djcd,
I think the example code block shown at http://sipjs.com/api/0.5.0/subscription/#examples was incorrect. Please try this instead:
Let us know how it goes!
Joseph
API - Subscription: Update example code. See onsip/SIP.js#2
API - Subscription: Update example code. See onsip/SIP.js#2
Djcd commentedon Apr 29, 2014
Hi Joseph,
Thanks for the fast reply! That new example makes more sense and it works just fine:
Thx again,
Djcd
josephfrazier commentedon Apr 29, 2014
I'm glad to hear you got it working! I'll update the example code accordingly. Please feel free to ask about any other issues you run into.
Joseph
API - Subscription: Update example code again. See onsip/SIP.js#2 (co…
API - Subscription: Update example code again. See onsip/SIP.js#2 (co…
Djcd commentedon Apr 29, 2014
That should be the correct example for everyone
umasgn commentedon Dec 8, 2016
What if i want to subscribe for multiple uri

?
Merge pull request onsip#2 from prlanzarin/ftcpi
New API - small fix to demo onsip#2