Audio/video/whiteboard Duration message Delivery
Update time: 2021/12/03 10:05:51
Audio/video/whiteboard duration message delivery
5. "eventType"="5" or "21".
Message delivery scenarios
message delivery scenarios:
http1. Connection between the calling and called parties established and ended normally (call duration is greater than 0);
2. The calling and called parties were connected, but they hung up immediately after connection (both parties successfully joined the channel), message delivery for the call duration and accounts of both parties. Note: The duration may not be 0, even if they hang up immediately after connection;
3. Due to an exception occurred after connection of both parties (for example, there is a problem with the network of one party), only one party successfully joined the channel (single entry, message delivery for time is 0, and the status is SINGLE_PARTICIPATE), then only message delivery for the duration information about the party who successfully joined the channel;
4. In particular, for long-duration calls (longer than 12 hours), the duration information will be copied to the client server at 12-hour intervals, without affecting audio/video sessions/interactive whiteboard sessions lasting less than 12 hours.
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"channelId":"6265489843204131361","createtime":"1458798033925","duration":"25","eventType":"5","live":"1","members":"[{\"accid\":\"lisi\",\"duration\":13},{\"accid\":\"zhangsan\",\"caller\":true,\"duration\":12}]","status":"SUCCESS","type":"AUDIO"}
Curl example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"channelId":"6265489843204131361","createtime":"1458798033925","duration":"25","eventType":"5","live":"0","members":"[{\"accid\":\"lisi\",\"duration\":13},{\"accid\":\"zhangsan\",\"caller\":true,\"duration\":12}]","status":"SUCCESS","type":"AUDIO"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
channelName | String | Name of audio/video room. This field is not available for peer-to-peer calls. |
channelId | String | Channel number |
createtime | String | Event of audio & video call /whiteboard start, can be converted to 13-digit timestamp |
duration | String | Duration of current call/whiteboard session, accurate to the second, can be converted to Integer type |
eventType | String | 5, which indicates it is a real-time audio/video/whiteboard duration event |
live | String | Is this audio/video live-streaming an interactive session, 0: No, 1: Yes |
members | String | Parameter "members" is a list of participants in audio & video call s or whiteboard sessions, and accid field of each participant represents his/her account. For peer-to-peer audio & video call s: the caller field of the participant is true for the caller; this field is absent for the called. For multi-person audio & video call s: the caller field of the room owner is true (if the owner does not join the voice and video room to participate in the call, there will be no participant with true caller in the message delivery). Duration field indicates single party call duration of the participant, and it is not yet available for whiteboard sessions. userType field indicates the user type, 1-nrtc user 2-webrtc user 3-webrtc H5 user 4-applet user. |
status | String | Call/whiteboard status: SUCCESS:indicates the call ended normally; TIMEOUT: indicates timeout; SINGLE_PARTICIPATE: indicates that there is only one participant; RUNNING: Indicates the message delivery for occurred when the audio & video call has not ended; in particular, the cascade scenario has no SUCCESS status, and is alwasys in RUNNING status. To determine whether the session has ended, see message delivery for for ending audio/video room with eventType=26/27; UNKNOWN: status unknown |
type | String | Type: AUDIO: audio call; VEDIO: video call; DataTunnel: whiteboard event |
ext | String | Custom fields upon audio/video initiation, optional, to be specified by the user |
running | Boolean | If set to true, it indicates message delivery for in the process of long-duration calls, default or false indicates message delivery for in normal-duration calls or the last message delivery for for long-duration calls |
Detailed example of Message delivery
Real-time audio call duration message
Cc example:
{"channelId":"6265489843204131361","createtime":"1458798033925","duration":"25","eventType":"5","live":"0","members":"[{\"accid\":\"lisi\",\"duration\":13},{\"accid\":\"zhangsan\",\"caller\":true,\"duration\":12}]","status":"SUCCESS","type":"AUDIO"}
Real-time video call duration message
Cc example:
{"channelId":"6265490045067594274","createtime":"1458798080073","duration":"22","eventType":"5","live":"1","members":"[{\"accid\":\"lisi\",\"duration\":11},{\"accid\":\"zhangsan\",\"caller\":true,\"duration\":11}]","status":"SUCCESS","type":"VEDIO"}
Whiteboard duration message
Cc example:
{"channelId":"6668145522152249926","createtime":"1473385450643","duration":"12","eventType":"5","members":"[{\"accid\":\"zhangsan\",\"duration\":6},{\"accid\":\"lisi\",\"caller\":true,\"duration\":6}]","status":"SUCCESS","type":"DataTunnel"}
Audio/video/whiteboard file download message delivery
6. "eventType"="6" or "22".
Description:
Starting from July 10, 2018 (v5.4.0 version), the recording schema of CommsEase audio/video recording services has been optimized. Since then, longer than 2 hour recording of audio & video call will be cut at 2 hour interval (if you want to change interval time, contact the business administrator). Developers need to bear in mind the above logic and be prepared accordingly when processing message delivery.
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"eventType":"6","fileinfo":"[{\"caller\":true,\"channelid\":\"6290737000999815988\",\"filename\":\"xxxxxx.type\",\"md5\":\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\"mix\":false,\"size\":\"2167\",\"type\":\"gz\",\"vid\":\"1062591\",\"url\":\"http://xxxxxxxxxxxxxxxxxxxx.type\",\"user\":\"zhangsan\"}]"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"eventType":"6","fileinfo":"[{\"caller\":true,\"channelid\":\"6290737000999815988\",\"filename\":\"xxxxxx.type\",\"md5\":\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\"mix\":false,\"size\":\"2167\",\"type\":\"gz\",\"vid\":\"1062591\",\"url\":\"http://xxxxxxxxxxxxxxxxxxxx.type\",\"user\":\"zhangsan\"}]"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Note: audio/video/whiteboard file download message delivery, where the fileinfo field is a JSON array that contains up to 10 array elements (i.e. 10 file messages /10 channelids). Developers must pay attention to parsing differences.
Name | Type | Description |
---|---|---|
eventType | String | Value is 6, which indicates message of downloading information about audio/video/whiteboard files |
fileinfo | String | Can be converted to JSONArray format, containing fields defined as follows: caller: call initiator or not, true indicates yes, if no then the field doesn't exsit and can be converted to Boolean type value channelid: channel number, can be converted to Long type value filename: file name, direct storage, if mixed recording then filename has "-mix" md5: the md5 value of the file size: file size, in characters, can be converted to Long type value type: file type (extension), including: real-time audio recording file (aac), whiteboard recording file (gz), real-time video recording file (mp4), video recording file of interactive streaming session (flv) url: download URL of the file user: user account, if mixed recording file then this field is "0" mix: mixed recording or not, true: mixed recording file; false: solo recording file vid: ID of the on-demand file. Note that a whiteboard recording file (gz) does not have this field. With this parameter, you can call the on-demand interface to query related information. pieceindex: The piece index of the recording file. If the recording duration of a-channel call exceeds the piece duration, the recording file will be divided into multiple files. timestamp: the system time when the file was generated |
13. "eventType"="13" or "23". It needs to be activated separately. If requiring this feature, please contact CommsEase business administrator.
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"eventType":"13","event":"1","user":"abcd","channelid":"193384021111101","timestamp":"1510812687298","roomtype":"2"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"eventType":"13","event":"1","user":"abcd","channelid":"193384021111101","timestamp":"1510812687298","roomtype":"2"}' ‘http://yunxinservice.com.cn/receiveMsg.action’
JSON fields in message body
Name | Type | Description |
---|---|---|
event | String | Enter or leave the audio/video/whiteboard room: 0: Leave the audio/video/whiteboard room; Note: For peer-to-peer calls, user leaving the call channel due to overtime caused by abnormal reasons such as network disconnection may not necessarily trigger message delivery for of the leaving behavior. 1: Enter the audio/video/whiteboard room. Can be converted to Integer type value |
user | String | User account |
channelid | String | Channel number, can be converted to Long type value |
timestamp | String | 13-digit timestamp of joining or leaving the audio/video/whiteboard room, can be converted to Long type value |
roomtype | String | Room type: 1: peer-to-peer double room; 2: Multi-person conference room; 3: Interactive live streaming room; 4: Whiteboard room. Can be converted to Integer type value |
19. "eventType"="26" or "27" or "28" or "29"
-
Example - upload task message delivery:
19.1. HTTP example
19.2. cURL example
19.3. JSON field in message body
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"channelId": "1234","createtime": "123", "timestamp": "233", eventType":"26"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"channelId": "1234","createtime": "123", "timestamp": "233", eventType":"26"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
eventType | String | Cc event type, 26 indicates message delivery for for closing audio/video room, 27 indicates message delivery for for closing G2 audio/video room, 28 indicates message delivery for for starting audio/video room, 29 indicates message delivery for for starting G2 audio/video room. Note: The above message delivery for types will only be generated when the room is a cascade room |
channelId | String | Channel number |
createtime | String | Audio/video room creation time |
timestamp | String | Event time |
RTMP message delivery
20. "eventType"="35"
-
Example - upload task message delivery:
20.1. HTTP example
20.2. cURL example
20.3. JSON field in message body
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"cid": "1234","code": "123", "msg": "aaa", "taskId": "abc", "streamUrl": "sassss","eventType":"35"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"cid": "1234","code": "123", "msg": "aaa", "taskId": "abc", "streamUrl": "sassss","eventType":"35"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
eventType | String | Cc event type, 35 indicates RTMP event Cc, which can only be activated by clients with support for audio & video call 1.0 |
cid | String | Channel number |
code | String | error code: 505 stream push succeeded 506 stream push failed 506 session forbidden in streaming 506 cdn forward failed during the process 510 no record permission 511 stop pushing stream |
msg | String | Description |
taskId | String | Task ID |
streamUrl | String | streamUrl |
Was this page helpful?