概要
私は UCWA アプリケーションを持っており、受信した onlineMeetingInvitation イベントを受け入れ、すべてのメッセージを監視したいと考えています。招待を正常に受け入れることができましたが、メッセージのイベントを受信しません。これは、メッセージング モダリティがデフォルトで接続されていないことが原因であると思われるため、addMessagingを試みています。残念ながら、このリクエストは常に 409 エラーとメッセージを返します。
操作の開始を妨げる競合がありました。後でもう一度やり直してください。
誰か知っていますか?addMessaging が正しい場合は? b. 上記のエラーが発生するのはなぜですか?
詳細
私は会話で 2 つの通常の Lync クライアントをセットアップしました。次に、UCWA アプリケーションのユーザーを会話に招待します。これにより、イベント チャネルで次の応答が返されます (期待どおりに受け入れリンクを含む)。
{
"_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": { ....
コンテンツなしで正常に応答する「accept」href で POST を実行します。次に、2 つのイベント応答を受け取ります。2 つ目は次の内容を含みます。
...
{
"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 に POST を実行しようとします。POST には本文がありません。
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 競合が発生し、2 つの 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."}