vladimir_manushko
New Member
Здравствуйте!
Возникла необходимость имплементировать дополнительную бизнес-логику основываясь на факте подключения или отключения входящего потока. Выполнил конфигурацию, как описано в документации, но перестали публиковаться входящие потоки. Мы используем chatApp, для организации видеочата между двумя собеседниками с последующим объединением двух потоков в один с помощью микшера.
Последовательность действий:
1. Переопределяем URL для roomApp
2. Пробуем выполнить подключение с помощью стандартного сценария
3. В журналах сервера видим следующую картину
4. Запросы, которые приходили на сервер и были им успешно обработаны.
Конфигурация параметра "restClientConfig" для запроса "connect" настроена аналогичным образом как и в стандартном roomApp.
Как мы видим не выполняются запросы publishStream и StreamStatusEvent. Обьясните пожалуйста, почему так происходит и как решить данную проблему?
Возникла необходимость имплементировать дополнительную бизнес-логику основываясь на факте подключения или отключения входящего потока. Выполнил конфигурацию, как описано в документации, но перестали публиковаться входящие потоки. Мы используем chatApp, для организации видеочата между двумя собеседниками с последующим объединением двух потоков в один с помощью микшера.
Последовательность действий:
1. Переопределяем URL для roomApp
Code:
% update app --url https://our-web-server/api/v1/webhook roomApp
App chatRoomApp has been updated successfully with key roomApp
% show apps
name appKey URL
----------------------------------------------------------------------------------------
chatRoomApp chatRoomApp http://localhost:8081/apps/ChatRoomApp
callApp callApp http://localhost:8081/apps/CallApp
chatRoomApp flashRoomApp http://localhost:8081/apps/RoomApp
clickToCallApp clickToCallApp http://localhost:8081/apps/ClickToCallApp
qaApp qaApp http://localhost:8081/apps/QAApp
defaultApp defaultApp http://localhost:8081/apps/EchoApp
wcs3App wcs3App http://localhost:8081/apps/EchoApp
websocketChatApp websocketChatApp http://localhost:8081/apps/ChatApp
flashStreamingApp flashStreamingApp http://localhost:8081/apps/EchoApp
chatRoomApp roomApp https://our-web-server/api/v1/webhook
conferenceApp conferenceApp http://localhost:8081/apps/ConferenceApp
flashChatApp flashChatApp http://localhost:8081/apps/ChatApp
3. В журналах сервера видим следующую картину
Code:
14:09:21,484 INFO RestClient - API-ASYNC-pool-13-thread-38 SEND REST OBJECT ==>
URL:https://our-web-server/api/v1/webhook/connect
OBJECT:
{
"nodeId" : "rpc46cqx5usYfyHiBaZ8Ga5UsXPGTmNe@54.171.220.129",
"appKey" : "roomApp",
"sessionId" : "/172.20.43.221:42946/172.20.0.251:8080-fffca9d3-74c2-4f17-8024-677a2b074a0a", "useWsTunnel" : false,
"useWsTunnelPacketization2" : false,
"msePacketizationVersion" : 2,
"useBase64BinaryEncoding" : false,
"mediaProviders" : [ "WebRTC", "MSE", "WSPlayer" ],
"clientVersion" : "0.5.28",
"clientOSVersion" : "5.0 (Macintosh)",
"clientBrowserVersion" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0",
"keepAlive" : false,
"custom" : {
"login" : "1"
},
"origin" : "https://demo.flashphoner.com"
}
14:09:21,727 INFO RestClient - API-ASYNC-pool-13-thread-38 RECEIVED REST OBJECT <==
URL:https://our-web-server/api/v1/webhook/connect
OBJECT:
{
"nodeId" : "rpc46cqx5usYfyHiBaZ8Ga5UsXPGTmNe@54.171.220.129",
"appKey" : "roomApp",
"sessionId" : "/172.20.43.221:42946/172.20.0.251:8080-fffca9d3-74c2-4f17-8024-677a2b074a0a",
"useWsTunnel" : false,
"useWsTunnelPacketization2" : false,
"msePacketizationVersion" : 2,
"useBase64BinaryEncoding" : false,
"mediaProviders" : [ "WebRTC", "MSE", "WSPlayer" ],
"restClientConfig" : {
"subscribe" : {
"restExclude" : "sipMessageRaw,sdp",
"clientExclude" : "sipMessageRaw,sdp",
"restOverwrite" : "",
"restOnError" : "FAIL",
"restPolicy" : "OVERWRITE"
},
"publishStream" : {
"restExclude" : "sipMessageRaw,sdp",
"clientExclude" : "sipMessageRaw,sdp",
"restOverwrite" : "",
"restOnError" : "FAIL",
"restPolicy" : "OVERWRITE"
},
"OnDataEvent" : {
"restExclude" : "sipMessageRaw,sdp",
"clientExclude" : "sipMessageRaw,sdp",
"restOverwrite" : "",
"restOnError" : "FAIL",
"restPolicy" : "OVERWRITE"
}
},
"clientVersion" : "0.5.28",
"clientOSVersion" : "5.0 (Macintosh)",
"clientBrowserVersion" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0",
"keepAlive" : false,
"custom" : {
"login" : "1"
},
"origin" : "https://demo.flashphoner.com"
}
14:09:21,729 INFO WCS4Handler - API-ASYNC-pool-13-thread-39 RestClientConfig for client /172.20.43.221:42946/172.20.0.251:8080-fffca9d3-74c2-4f17-8024-677a2b074a0a:
{
"subscribe" : {
"restExclude" : "sipMessageRaw,sdp",
"clientExclude" : "sipMessageRaw,sdp",
"restOverwrite" : "",
"restOnError" : "FAIL",
"restPolicy" : "OVERWRITE"
},
"publishStream" : {
"restExclude" : "sipMessageRaw,sdp",
"clientExclude" : "sipMessageRaw,sdp",
"restOverwrite" : "",
"restOnError" : "FAIL",
"restPolicy" : "OVERWRITE"
},
"OnDataEvent" : {
"restExclude" : "sipMessageRaw,sdp",
"clientExclude" : "sipMessageRaw,sdp",
"restOverwrite" : "",
"restOnError" : "FAIL",
"restPolicy" : "OVERWRITE"
}
}
14:09:21,729 INFO RestClient - API-ASYNC-pool-13-thread-39 SEND REST OBJECT ==>
URL:https://our-web-server/api/v1/webhook/ConnectionStatusEvent
OBJECT:
{
"nodeId" : "rpc46cqx5usYfyHiBaZ8Ga5UsXPGTmNe@54.171.220.129",
"appKey" : "roomApp",
"sessionId" : "/172.20.43.221:42946/172.20.0.251:8080-fffca9d3-74c2-4f17-8024-677a2b074a0a",
"useWsTunnel" : false,
"useWsTunnelPacketization2" : false,
"msePacketizationVersion" : 2,
"useBase64BinaryEncoding" : false,
"mediaProviders" : [ "WebRTC", "MSE", "WSPlayer" ],
"authToken" : "/172.20.43.221:42946/172.20.0.251:8080-fffca9d3-74c2-4f17-8024-677a2b074a0a",
"status" : "ESTABLISHED",
"clientVersion" : "0.5.28",
"clientOSVersion" : "5.0 (Macintosh)",
"clientBrowserVersion" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0",
"keepAlive" : false,
"custom" : {
"login" : "1"
},
"origin" : "https://demo.flashphoner.com"
}
14:09:21,960 INFO RestClient - API-ASYNC-pool-13-thread-39 content -> {"nodeId":"rpc46cqx5usYfyHiBaZ8Ga5UsXPGTmNe@54.171.220.129","appKey":"roomApp","sessionId":"/172.20.43.221:42946/172.20.0.251:8
080-fffca9d3-74c2-4f17-8024-677a2b074a0a","useWsTunnel":false,"useWsTunnelPacketization2":false,"msePacketizationVersion":2,"useBase64BinaryEncoding":false,"mediaProviders":["WebRTC","MSE","WSPlayer"],"authTo
ken":"/172.20.43.221:42946/172.20.0.251:8080-fffca9d3-74c2-4f17-8024-677a2b074a0a","status":"ESTABLISHED","clientVersion":"0.5.28","clientOSVersion":"5.0 (Macintosh)","clientBrowserVersion":"Mozilla/5.0 (Maci
ntosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0","keepAlive":false,"custom":{"login":"1"},"origin":"https://demo.flashphoner.com"}
14:09:21,961 INFO RestClient - API-ASYNC-pool-13-thread-39 RECEIVED REST OBJECT <==
URL:https://our-web-server/api/v1/webhook/ConnectionStatusEvent
OBJECT:
{
"nodeId" : "rpc46cqx5usYfyHiBaZ8Ga5UsXPGTmNe@54.171.220.129",
"appKey" : "roomApp",
"sessionId" : "/172.20.43.221:42946/172.20.0.251:8080-fffca9d3-74c2-4f17-8024-677a2b074a0a",
"useWsTunnel" : false,
"useWsTunnelPacketization2" : false,
"msePacketizationVersion" : 2,
"useBase64BinaryEncoding" : false,
"mediaProviders" : [ "WebRTC", "MSE", "WSPlayer" ],
"authToken" : "/172.20.43.221:42946/172.20.0.251:8080-fffca9d3-74c2-4f17-8024-677a2b074a0a",
"status" : "ESTABLISHED",
"clientVersion" : "0.5.28",
"clientOSVersion" : "5.0 (Macintosh)",
"clientBrowserVersion" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0",
"keepAlive" : false,
"custom" : {
"login" : "1"
},
"origin" : "https://demo.flashphoner.com"
}
14:09:22,026 INFO RestClient - API-ASYNC-pool-13-thread-38 SEND REST OBJECT ==>
URL:https://our-web-server/api/v1/webhook/OnDataEvent
OBJECT:
{
"nodeId" : "rpc46cqx5usYfyHiBaZ8Ga5UsXPGTmNe@54.171.220.129",
"appKey" : "roomApp",
"sessionId" : "/172.20.43.221:42946/172.20.0.251:8080-fffca9d3-74c2-4f17-8024-677a2b074a0a",
"operationId" : "40db8580-60a9-11eb-8793-d1008ae909c8",
"payload" : {
"command" : "join",
"options" : {
"name" : "room-c86139"
}
},
"origin" : "https://demo.flashphoner.com"
}
14:09:22,256 INFO RestClient - API-ASYNC-pool-13-thread-38 RECEIVED REST OBJECT <==
URL:https://our-web-server/api/v1/webhook/OnDataEvent
OBJECT:
{
"nodeId" : "rpc46cqx5usYfyHiBaZ8Ga5UsXPGTmNe@54.171.220.129",
"appKey" : "roomApp",
"sessionId" : "/172.20.43.221:42946/172.20.0.251:8080-fffca9d3-74c2-4f17-8024-677a2b074a0a",
"operationId" : "40db8580-60a9-11eb-8793-d1008ae909c8",
"payload" : {
"command" : "join",
"options" : {
"name" : "room-c86139"
}
},
"origin" : "https://demo.flashphoner.com"
}
Code:
HTTP Requests
-------------
POST /api/v1/webhook/OnDataEvent 200 OK
POST /api/v1/webhook/ConnectionStatusEvent 200 OK
POST /api/v1/webhook/connect 200 OK
Как мы видим не выполняются запросы publishStream и StreamStatusEvent. Обьясните пожалуйста, почему так происходит и как решить данную проблему?