This is my scenario:
I dial into a VoIP call using SIP (e.g., 11234567890#10.0.100.200)
As the first caller, I get placed on hold
Another user dials into that same conference
The conference call starts
Does SIP or RTP provide for a way for me to view the other participants (their name or number) on the call?
Yes, if your UAC and your conference provider supports RFC 4575: A Session Initiation Protocol (SIP) Event Package for Conference State
In that case you would be able to establish a subscription (SUBSCRIBE) with the conference event package and (subject to appropriate permissions, authorizations, etc. at the discretion of the conference provider) you will get NOTIFYed about conference events. What events to notify is at the discretion of the conference provider (note the language in the RFC, no MUSTs, some SHOULDs and MAYs):
3.6. Notifier Generation of NOTIFY Requests
Notifications SHOULD be generated for the conference state when a new
participant joins (i.e., gets "connected" to) or a participant leaves
(i.e., gets "disconnected" from) the conference.
Subject to a local focus policy, additional changes in participants'
status, changes in their media types, and other optional information
MAY be reported by the focus.
Changes in sidebar rosters SHOULD be reported by the focus to their
participants and MAY be reported to others, subject to local policy.
Changes in conference identifiers and service URIs SHOULD be reported
by the focus to the conference package subscribers.
Changes in other conference state information MAY be reported by the
focus to the conference package subscribers.
You can probably expect it from IMS CONF service according to 3GPP TS 24.605 and 3GPP TS 24.147
You can also use RestComm to simplify this, it provides a demo on conferencing out of the box. (Dial 3010 or 3011). RestComm use SIP and RTP for the initial conference setup but then you can query the conference via REST for managing participants (mute/unmute, add/remove from conference, ...)
Related
I'm working on this chat type scenario and the need is to track presence -
Note: every client in this scenario will subscribe with option withPresence set to true.
Pubnub cofig-
Max announce is set to 1, so i rely on interval event type.
phoneA will ask server for a channel name, Server will generate a unique channel name (lets say ch-chat) and return to PhoneA.
Now both phoneA and server will add the channel to their own channel groups (cg-phoneA and cg-server)and subscribe to their own channel groups.
PhoneA shares the channel name with phoneB and phoneC and they both add the channel to their own channel groups, cg-phoneB and cg-phoneC. Bkth B and C are also subscribed to their own channel group.
Now,
When phoneA removes channel (ch-chat) from its own channel group (cg-phoneA), server does not gets phobeA in leave uuids list of interval event. But after ~5mins server gets timeout event for phoneA.
What i want -
phoneA should present in the leave list of the interval event since phoneA removed the channel from its own channel group, theres no way it should be subscribed anymore to it.
Presence Modes: Announce vs Interval
One issue is that your Announce Max setting of 1 will mute all presence events except for state-change. In other words, you are in Interval mode all the time for every channel. Read more about Presence Event Modes here.
When channels are added to a channel group, you should receive the join event (if in Announce mode and not Interval), if you are subscribed to the channel group withPresence: true. Be sure you want to receive presence events for all channels in that channel group though. You can create a second channel group for channels you do not need to receive presence events.
Managing Channel Groups
As for managing Channels in your Channel Groups, be sure that only your Server is the one adding/removing channels for all channel groups. This has to do with security when you enable Access Manager (and everyone should be enabled/implementing Access Manager to protect your keys and your users).
Presence Webhooks
As for Presence Webhooks, this is the best way for your Server to monitor presence events. It is not recommended that you subscribe from your server. It will be difficult/complex to scale to multiple server instances. This is why the Presence Webhooks exist. And your clients and POST directly to the Server for any requests it needs, like your "generate new channel" request. And your server and reply to those posts and then publish all further updates to the channel the client is subscribed to.
Channel Naming Conventions
It is great that you are using "generated channel names" (like a UUID pattern) but prefix your channels to identity them to provide a means to group them with pattern match through regex. I would recommend using a "dot" so that you can also potentially take advantage of PubNub wildcarding features:
PubNub Functions channel binding
Presence ACLs (custom presence channel behavior configuration)
Access Manager wildcard granting
Wildcard Subscribe
For example:
chat.4849-ut83-83jd...
notify.tuy7-87er-27fn...
NOTE: Channel Groups do not allow "dots" in the name and do not have any wildcarding features.
I am building a web app that users can edit and share notes. Users should be connected to notes with roles (owner, read, read-write). This is an occasionally connected system so I chose to do the syncing using CQRS and event sourcing. Following Greg Young's presentation [36:20 - 38:40], the flow would be as follows:
Client does changes while offline.
Client connects to the Internet.
The "store and forward" sends the events that occurred while the client was offline.
Client compares the local events with the received events and does a merge, deciding what commands to keep. Then updates local view model.
Client sends the stored commands (created offline) to the server.
Server executes the commands and generates events that are stored in event store.
"store and forward" holds the events each user is interested in, until the users come back online.
The question is: How does the "store and foreword" decide what events should be sent to each user?
Obviously sending all events would compromise the security of other users.
Since your client knows which aggregates it displays, then it can just tell backend "hey, are there events for aggregateIds [...] since [timestamp]?".
This is how reSolve framework keeps UI reactive - client subscribes to events for particular aggregateId and receives them in real time via websockets.
So one answer to your question could be "let user ask for events (aggregateIds) he is interested in"
We have an enterprise installation of QuickBlox (which implements XMPP), and would like to create mirrored accounts for all of our users on our QuickBlox server install. We also want to sync the networks our system's users have created using relationships (eg, "client and provider") that have been built on our system.
In a nutshell, we want to export whitelists that limit chat "opponents" to only those users with whom each of our users already have relationships. If User1 has an existing relationship in our system with User2 and User3 but not User4 through User40, we want to be able to use the QuickBlox API to enforce that within chat by creating a whitelist through the QuickBlox API.
EDIT: We can't use an "honor system" whitelist. That is, the enforcement must be server-side using a method the client cannot circumvent. There must be a hard, unavoidable block between users for privacy concerns.
Use case:
A QuickBlox (or XMPP) server has User1 through User40, inclusive.
User1's whitelist is comprised of [User2, User3] only.
If User1 attempts to contact User15, we want QuickBlox/XMPP to note that User15 is not on User1's whitelist and block that communication as if User1 had bidirectionally blocked that user.
Privacy lists, aka blacklists
I have found places in QB's docs that refer to the XMPP specification docs, and have found the concept of privacy lists, which seem to operate as blacklists:
https://quickblox.com/developers/Web_XMPP_Chat_Sample#Privacy_lists
https://xmpp.org/extensions/xep-0016.html#protocol-syntax
These only provide two styles of blacklist privacy:
You can choose a type of blocked logic (Privacy List). There are 2
types:
Block in one way. You are blocked, but you can write to
blocked user.
Block in two ways. You are blocked and you also can't
write to blocked user.
Server Whitelist (dialog-level, not user)
I've also found documentation on whitelists for servers, which appear to operate at a dialog/jid, not user, level:
https://xmpp.org/extensions/xep-0133.html#edit-whitelist
An entity added to a whitelist MAY be a JID of any form as specified in RFC 6120... a whitelist may prevent inbound communications, outbound communications, or both...
Rosters -- "presence" detail only?
There are also rosters, which are close to whitelists, but they do not seem in my testing to restrict communication between any two users that might not be on each other's roster.
https://quickblox.com/developers/Web_XMPP_Chat_Sample#Get_the_roster
That is to say, I haven't set up a roster in my testing application, and users are able to create group and 1-on-1 chat dialogs in spite of not having explicitly accepted any roster requests. In the Android docs, I found the following on rosters: "[A roster] is the collection of users a person receives presence updates for." That's not blocking in any way outside of presence alerts, I don't believe.
Question
Is there a suggested way to create a pessimistic whitelist for each user, which only contain those users with whom communication is allowed? Or are we forced to create and maintain "inverse blacklists", where we automate the creation of privacy lists for every new user blocking every other user and then use the API to remove those with which each user should be able to communicate?
If we do have to use "inverse blacklists", is there a way to have a default blacklist apply to every new user that initially blocks communication with every other user already in our QuickBlox system?
(Again, we can't use "honor system" lists. If the client must request a whitelist to be active before it can be used, can freely discover and then change active whitelists, or if the client can decline to use a list, that's not secure enough.)
XMPP Clients
XMPP clients will need a way to ask another clients if they support receiving pushes via a relay. Since pushes can be sent from anywhere, clients will also be able to send pushes directly to other clients through the relay as long as they have their friend’s whitelist token. They will also need to respond to XMPP server inquiries for whitelist tokens to allow pushes to be sent by the server if a message is sent by a client not supporting direct push.
XMPP Servers
XMPP servers can ask their connected clients if they support push relays and, if so, forward messages they receive to the push relay server when the client is offline. This will require the XMPP server to obtain a whitelist token from the user as well.
Help:see this link
If we are talking about XMPP protocol - there is an ability to block any communications from/to (see example 48)
So, by default, you can set it for each user for example.
Then, if we need to allow to communicate with someone specific,
then you can add this user to your privacy list with action=allow and order greater than 'full block'. Here is actually a good example of whitelist implementation via Privacy Lists, see example 8:
and (3) 'special', which allows communications only with three
specific entities.
a customer wants enable a chat/instant messenger for his application webside. He is using Lync Server internally to Chat in-house. Now, he requires the following:
A external user (which will not be an AD user) logs into the webside is able to chat with a person inside the company. The internal user will receive those messages via his lync client.
What's the best way to achieve this?
i thought about bot that delegates messages from the webside to the lync server that does the rest. But how can i send a message as an external user?
The usual way to approach this is with the following components:
A bot that connects to the internal Lync infrastructure as an ApplicationEndpoint, and manages conversations with external/internal users
A Web or WCF service that exposes methods over http to external users - this could be built into the bot, or could be a separate service that communicates with the bot in some way
The web UI for presenting a users presence, allowing click-to-call, initiating and displaying a conversation etc
As an example, the WCF service could expose a few methods:
GetPresence(targetSipUri) - returns a presence value for the given uri
SendIM(targetSipUri, message) - sends an IM to the given uri
GetReplies() - polls for any responses
When you get into the detail you might need more methods - e.g. it may be an idea to generate a conversation token and pass this around
The web UI could present a list of contacts with a presence status (GetPresence), then allow the user to click a presence contact to initiate a new conversation window and send the inital message (SendIM), then poll the service for any replies from the contact (GetReplies) - note, the bot will have to queue replies internally until GetReplies is called.
There are commercial products that might meet your needs - a quick search for Lync webchat should turn up a few. Also, it may be worth looking into the Lync Web App, to see if this works for your customer
Edit: In answer to the comment below - yes, your internal users will see a conversation from "Our Lync Bot". If you don't know who your users are (e.g. random potential customers browsing a shopping site), you can grab some info from them (name, product to discuss etc) and have the bot display this to the internal user, either as part of the IM conversation, or as conversation context displayed in a Conversation Window Extension.
If your external users are known in advance (e.g. registered customers), and the internal user MUST see the conversation as being from them, then you will need to create a UserEndpoint for each conversation - but this would rely on having the user in AD.
is it possible to notify a SIP client when there is an incoming call on another phone?
I know that there are the SUBSCRIBE and NOTIFY commands but I have found no event package for signaling incoming calls.
Background: for a SIP-capable telephony system, I would like to provide an application that displays information about the caller (e.g. name, address, contracts, etc.) when the phone rings. The phones are external to the PC; they are not soft-phones.
-Frank
The dialog event package (RFC4235) is what you're after. The key realisation is that dialog's get established when the first non-100 response is received on an INVITE transaction.
A dialog is in the early state until the INVITE is answered with a final response but that doesn't matter as the dialog event package is designed to send notifications for early dialogs just the same as for answered dialogs.
Finding servers or providers that supprt the dialog event package is another matter. The best softphone that I have come across for SIP events is the Bria, as far as servers go sip2sip and my own sipsorcery have some level of support for the dialog event package although I must admit I have left out early dialog notifications.