摘要
我有一个UCWA应用程序,我希望它能够接受传入的onlineMeetingInvitation事件,然后监视所有消息。虽然我已经成功地接受了邀请,但我没有收到任何消息的事件。我相信这可能是因为在默认情况下消息传递模式没有连接,所以我尝试使用addMessaging。不幸的是,这个请求总是返回一个409错误和消息,
发生了一场冲突,使行动无法开始。请稍后再试。
有人知道,如果试图addMessaging是正确的吗?为什么我会收到上面的错误?
详细信息
我在谈话中设置了两个普通的Lync客户。然后,我邀请我的UCWA应用程序的用户参加对话。这将在我的事件通道上产生以下响应(包括预期的accept链接)
{
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/102547331865/events?ack=28"
},
"next": {
"href": "/ucwa/oauth/v1/applications/102547331865/events?ack=29"
}
},
"sender": [
{
"rel": "me",
"href": "/ucwa/oauth/v1/applications/102547331865/me",
"events": [
{
"link": {
"rel": "presence",
"href": "/ucwa/oauth/v1/applications/102547331865/me/presence"
},
"type": "updated"
}
]
},
{
"rel": "communication",
"href": "/ucwa/oauth/v1/applications/102547331865/communication",
"events": [
{
"link": {
"rel": "onlineMeetingInvitation",
"href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f"
},
"_embedded": {
"onlineMeetingInvitation": {
"direction": "Incoming",
"importance": "Normal",
"threadId": "AdIw2sMaOjuEJHfcRJiiK5Czug+5Ug==",
"state": "Connecting",
"subject": "",
"onlineMeetingUri": "sip:test.user2@xxx.xxx.xx;gruu;opaque=app:conf:focus:id:KS77KG4B",
"availableModalities": [
"Messaging"
],
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f"
},
"to": {
"href": "/ucwa/oauth/v1/applications/102547331865/people/test.user1@xxx.xxx.xx"
},
"conversation": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
},
"accept": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f/accept"
},
"decline": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f/decline"
}
},
"_embedded": {
"from": { ....
我在“接受”href上执行一个帖子,它成功地响应,没有任何内容。然后我收到两个事件响应,其中第二个包括以下内容
...
{
"rel": "communication",
"href": "/ucwa/oauth/v1/applications/102547331865/communication",
"events": [
{
"link": {
"rel": "conversation",
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
},
"_embedded": {
"conversation": {
"state": "Conferenced",
"threadId": "AdIw2sMaOjuEJHfcRJiiK5Czug+5Ug==",
"subject": "",
"activeModalities": [
"Messaging"
],
"importance": "Normal",
"participantCount": 3,
"audienceMute": "Disabled",
"audienceMessaging": "Enabled",
"recording": false,
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
},
"applicationSharing": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/applicationSharing"
},
"audioVideo": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/audioVideo"
},
"dataCollaboration": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/dataCollaboration"
},
"messaging": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/messaging"
},
"phoneAudio": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/phoneAudio"
},
"localParticipant": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants/test.user1@xxx.xxx.xx",
"title": "Test User1"
},
"addParticipant": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/participantInvitations?conversation=3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
},
"leaders": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants?filter=leaders"
},
"attendees": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants?filter=attendees"
},
"lobby": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants?filter=lobby"
},
"onlineMeeting": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/onlineMeeting"
},
"enableAudienceMuteLock": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/enableAudienceMuteLock"
},
"disableAudienceMessaging": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/disableAudienceMessaging"
}
},
"rel": "conversation"
}
},
"type": "updated"
}
]
},
...
{
"link": {
"rel": "messaging",
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/messaging"
},
"_embedded": {
"messaging": {
"state": "Disconnected",
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/messaging"
},
"conversation": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
},
"addMessaging": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/messagingInvitations?conversation=3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
}
},
"rel": "messaging"
}
},
"type": "updated"
},
...
再次,我相信这是预期的,在这一点上,原来的Lync客户正在显示3名参与者的预期。
接下来,我尝试在上面的片段中对addMessaging href做一篇文章。这个职位没有身体。
URI : https://xxx.xxx.xx/ucwa/oauth/v1/applications/102547331865/communication/messagingInvitations?conversation=0ae942e4-9133-4888-a0fb-8a7b182fff00
Method : POST
Headers : {Accept=[text/plain, application/json, application/*+json, */*], Content-Length=[0]}
Request body:
结果是409的冲突,我从来没有收到事件的新消息添加到对话的两个Lync客户端。
Header {Cache-Control=[no-cache], Pragma=[no-cache], Via=[1.1 DEVLYNC2.xxx.xxx.xx RtcInt], Content-Length=[120], Content-Type=[application/json], Expires=[-1], Server=[Microsoft-IIS/7.5], X-MS-Server-Fqdn=[DEVLYNC2.xxx.xx.xx], X-AspNet-Version=[4.0.30319], Strict-Transport-Security=[max-age=31536000; includeSubDomains], X-Powered-By=[ASP.NET], Date=[Fri, 28 Oct 2016 07:31:51 GMT]}
Body {"code":"Conflict","message":"There was a conflict that prevented the operation from starting. Please try again later."}
发布于 2018-07-11 11:31:40
添加operationId似乎解决了您的问题,尽管UCWA文档中提到了它是可选的。根本原因可能是在显示有关UCWA的microsoft文档时存在一个可复制的错误:例如,https://ucwa.skype.com/documentation/resources-startmessaging,选择API版本的下拉列表是不可见的。这个错误只发生在上,我从您的日志中看到它是您使用的版本(nb :我用版本61进行了测试)。使用Chrome,它正确地显示,您可以看到operationID有时是强制性的(仅在某些版本的API上)。服务器使用的API版本可以从以下链接确定:https://learn.microsoft.com/en-us/skype-sdk/ucwa/versioning
我希望这可以帮助您解决进一步的问题与UCWA -不需要使用试错的方法。
https://stackoverflow.com/questions/40301322
复制相似问题