简体   繁体   中英

Start conversation with mutiple users in MS Lync

I want to start a conversation with multiple users . I am using below project http://blog.thoughtstuff.co.uk/2015/04/ucwa-sample-project-online-chat-example/ I had assigned cpomma separated sips but it doesn't work. And it works properly for peer to peer.

destinationSIPAddress="user1@domain.com;user2@domain.com"

function StartNewConversation() {
        site.ucwa.Cache.read({
            id : "main"
        }).done(function (cacheData) {

            imData.sessionContext = site.ucwa.GeneralHelper.generateUUID();
            imData.operationId = site.ucwa.GeneralHelper.generateUUID();
            imData.to = destinationSIPAddress;
            site.ucwa.Transport.clientRequest({
                url : cacheData._embedded.communication._links.startMessaging.href,
                type : "post",
                data : imData,
                callback : function (data) {
                    if (data.status === 201) {
                        if (handlers.indexOf("conversation") === -1) {
                            handlers.push("conversation");
                            site.ucwa.Events.addEventHandlers({
                                rel : "conversation"
                            }, {
                                updated : handleConversation
                            });
                        }

                        if (handlers.indexOf("message") === -1) {
                            handlers.push("message");
                            site.ucwa.Events.addEventHandlers({
                                rel : 'message'
                            }, {
                                completed : handleMessage
                            });
                        }

                        if (handlers.indexOf("messaging") === -1) {
                            handlers.push("messaging");
                            site.ucwa.Events.addEventHandlers({
                                rel : "messaging"
                            }, {
                                updated : handleMessaging
                            });
                        }

                        site.ucwa.Events.startEvents();
                    } else {
                        cleanupMessaging();
                    }
                }
            });
        });
    }

I would suggest taking a look at startOnlineMeeting as that will allow multiparty communications from the start. The calls for startOnlineMeeting and startMessaging are similar. You should be able to pass an array as the as the to parameter containing the SIP addresses of the contacts.

If that does not work you could always stick with current code and call addParticipant providing the SIP addressed for the additional users. You would gain access to this Href in the updatedConversation callback when the it becomes Connected .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM