Welcome

List calls

This endpoint receives a roomId parameter and return a list of calls from room. The calls are listed starting by the most recent call.

URL Requires Auth HTTP Method
/api/v1/voice.call.history yes GET

Parameters

Argument Example Required Description
roomId tpxGjMs3taDcJzaCf Required The ID of room (direct, channel or group) to get the calls that was maded on.
onlyLostCalls false Optional If true (or any value different of ‘0’ and ‘false’) only the lost calls will be returned
searchField ‘gabriel’ Optional Filter results by caller or receiver. This field accepts Germany (23.03.2019) and US (2019-03-23) date formats to search by date
offset 0 Optional The number of records starts to return. The default is 0.
count 10 Optional The number of results to get. The default is 10

About searchField

The searchField parameter can be a text or a date.

  • If it have a date format (dd.mm.yyyy or yyyy-mm-dd), the system will search calls by date (date field of call object)
  • If it have any other format, any text, the system will search calls where the name of the user contains this text. The system will search on userName field (that is the name of the caller) and on toNames fields that is the field that contains the names of all recipients of call.

Example Call

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     -H "Content-type:application/json" \
     http://localhost:3000/api/v1/voice.call.list?roomId=tpxGjMs3taDcJzaCf&onlyLostCalls=true&page=2

Example Result

{
    "success": true,
    "calls": [
        {
            "_id": "x5q2vGaLT9fYkTxZS",
            "userId": "5vopq6R99CXT2zY6B",
            "to": [
                "brLK2GKKH5S7RrgM8"
            ],
            "toNames": [
                "gabriel.oliveira2"
            ],
            "channel": "https://pimenta.live/pimentagroupxwuxNjkzT2fAy7JCBtpxGjMs3taDcJzaCf",
            "date": "2019-08-22T18:22:25.783Z",
            "isGroup": true,
            "waiting": false,
            "accepted": true,
            "missed": false,
            "callerCancel": false,
            "senderName": "Changed Name 4",
            "senderGroup": "teste-grupo-privado-2",
            "onlyAudio": false,
            "roomId": "tpxGjMs3taDcJzaCf",
            "log": {
                "5vopq6R99CXT2zY6B": {
                    "startDate": "2019-08-22T18:22:31.996Z",
                    "ping": "2019-08-22T18:22:47.018Z",
                    "endDate": "2019-08-22T18:23:11.930Z"
                }
            },
            "participants": 1,
            "rejectCount": 0,
            "rejectUsers": [],
            "rejectUserIds": [],
            "acceptedUsers": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "name": "gabriel.oliveira2",
                    "username": "gabriel.oliveira2",
                }
            ],
            "acceptedUserIds": [
                "brLK2GKKH5S7RrgM8"
            ],
            "busyUsers": [],
            "busyUserIds": [],
            "timeoutUsers": [],
            "timeoutUserIds": [],
            "msgId": "sqCJnTRCNc9uk5YP5",
            "started": "2019-08-22T18:22:31.759Z",
            "finished": "2019-08-22T18:23:11.990Z",
            "_updatedAt": "2019-08-22T18:23:11.991Z",
            "userData": {
                "_id": "5vopq6R99CXT2zY6B",
                "name": "Changed Name 4",
                "username": "gabriel.oliveira"
            },
            "toUsernames": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "username": "gabriel.oliveira2"
                }
            ]
        },
        {
            "_id": "cSrr485AHHsABHeAD",
            "userId": "5vopq6R99CXT2zY6B",
            "to": [
                "brLK2GKKH5S7RrgM8"
            ],
            "toNames": [
                "gabriel.oliveira2"
            ],
            "channel": "https://pimenta.live/pimentagroupxwuxNjkzT2fAy7JCBtpxGjMs3taDcJzaCf",
            "date": "2019-08-22T18:21:06.517Z",
            "isGroup": true,
            "waiting": false,
            "accepted": true,
            "missed": false,
            "callerCancel": false,
            "senderName": "Changed Name 4",
            "senderGroup": "teste-grupo-privado-2",
            "onlyAudio": false,
            "roomId": "tpxGjMs3taDcJzaCf",
            "log": {
                "5vopq6R99CXT2zY6B": {
                    "startDate": "2019-08-22T18:21:11.747Z",
                    "ping": "2019-08-22T18:21:31.821Z"
                }
            },
            "participants": 1,
            "rejectCount": 0,
            "rejectUsers": [],
            "rejectUserIds": [],
            "acceptedUsers": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "name": "gabriel.oliveira2",
                    "username": "gabriel.oliveira2"
                }
            ],
            "acceptedUserIds": [
                "brLK2GKKH5S7RrgM8"
            ],
            "busyUsers": [],
            "busyUserIds": [],
            "timeoutUsers": [],
            "timeoutUserIds": [],
            "msgId": "Q4WXBXYdFmYvP8KAt",
            "started": "2019-08-22T18:21:11.484Z",
            "finished": "2019-08-22T18:21:52.663Z",
            "_updatedAt": "2019-08-22T18:21:52.664Z",
            "userData": {
                "_id": "5vopq6R99CXT2zY6B",
                "name": "Changed Name 4",
                "username": "gabriel.oliveira"
            },
            "toUsernames": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "username": "gabriel.oliveira2"
                }
            ]
        },
        {
            "_id": "AqGa6uffq4WZzs5Lh",
            "userId": "5vopq6R99CXT2zY6B",
            "to": [
                "brLK2GKKH5S7RrgM8"
            ],
            "toNames": [
                "gabriel.oliveira2"
            ],
            "channel": "https://pimenta.live/pimentagroupxwuxNjkzT2fAy7JCBtpxGjMs3taDcJzaCf",
            "date": "2019-08-22T18:20:04.835Z",
            "isGroup": true,
            "waiting": false,
            "accepted": true,
            "missed": false,
            "callerCancel": false,
            "senderName": "Changed Name 4",
            "senderGroup": "teste-grupo-privado-2",
            "onlyAudio": false,
            "roomId": "tpxGjMs3taDcJzaCf",
            "log": {},
            "participants": 0,
            "rejectCount": 0,
            "rejectUsers": [],
            "rejectUserIds": [],
            "acceptedUsers": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "name": "gabriel.oliveira2",
                    "username": "gabriel.oliveira2"
                }
            ],
            "acceptedUserIds": [
                "brLK2GKKH5S7RrgM8"
            ],
            "busyUsers": [],
            "busyUserIds": [],
            "timeoutUsers": [],
            "timeoutUserIds": [],
            "msgId": "YMWAQhph2HbQb6YqF",
            "started": "2019-08-22T18:20:15.478Z",
            "finished": "2019-08-22T18:20:41.313Z",
            "_updatedAt": "2019-08-22T18:20:41.314Z",
            "userData": {
                "_id": "5vopq6R99CXT2zY6B",
                "name": "Changed Name 4",
                "username": "gabriel.oliveira"
            },
            "toUsernames": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "username": "gabriel.oliveira2"
                }
            ]
        },
        {
            "_id": "AZE8n5WDBvRKxnXzE",
            "userId": "5vopq6R99CXT2zY6B",
            "to": [
                "brLK2GKKH5S7RrgM8",
                "txer9hbbdRtWieC36"
            ],
            "toNames": [
                "gabriel.oliveira2",
                "Gabriel Oliveira 3"
            ],
            "channel": "https://pimenta.live/pimentagroupxwuxNjkzT2fAy7JCBtpxGjMs3taDcJzaCf",
            "date": "2019-08-13T19:23:03.430Z",
            "isGroup": true,
            "waiting": false,
            "accepted": false,
            "missed": false,
            "callerCancel": false,
            "senderName": "Changed Name 4",
            "senderGroup": "teste-grupo-privado-2",
            "onlyAudio": false,
            "roomId": "tpxGjMs3taDcJzaCf",
            "log": {},
            "participants": 0,
            "rejectCount": 1,
            "rejectUsers": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "name": "gabriel.oliveira2",
                    "username": "gabriel.oliveira2"
                }
            ],
            "rejectUserIds": [
                "brLK2GKKH5S7RrgM8"
            ],
            "acceptedUsers": [],
            "acceptedUserIds": [],
            "busyUsers": [],
            "busyUserIds": [],
            "timeoutUsers": [],
            "timeoutUserIds": [],
            "msgId": "fnMG9ei6HnPBemHHj",
            "started": null,
            "finished": "2019-08-13T19:23:39.562Z",
            "_updatedAt": "2019-08-13T19:23:39.563Z",
            "userData": {
                "_id": "5vopq6R99CXT2zY6B",
                "name": "Changed Name 4",
                "username": "gabriel.oliveira"
            },
            "toUsernames": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "username": "gabriel.oliveira2"
                },
                {
                    "_id": "txer9hbbdRtWieC36",
                    "username": "gabriel.oliveira3"
                }
            ]
        },
        {
            "_id": "Rw4NE2yCMrE2yKSfB",
            "userId": "5vopq6R99CXT2zY6B",
            "to": [
                "brLK2GKKH5S7RrgM8",
                "txer9hbbdRtWieC36"
            ],
            "toNames": [
                "gabriel.oliveira2",
                "Gabriel Oliveira 3"
            ],
            "channel": "https://pimenta.live/pimentagroupxwuxNjkzT2fAy7JCBtpxGjMs3taDcJzaCf",
            "date": "2019-08-13T19:07:37.450Z",
            "isGroup": true,
            "waiting": false,
            "accepted": true,
            "missed": false,
            "callerCancel": false,
            "senderName": "Changed Name 4",
            "senderGroup": "teste-grupo-privado-2",
            "onlyAudio": false,
            "roomId": "tpxGjMs3taDcJzaCf",
            "log": {
                "5vopq6R99CXT2zY6B": {
                    "startDate": "2019-08-13T19:07:40.775Z",
                    "ping": "2019-08-13T19:07:55.896Z",
                    "endDate": "2019-08-13T19:08:18.570Z"
                }
            },
            "participants": 2,
            "rejectCount": 0,
            "rejectUsers": [],
            "rejectUserIds": [],
            "acceptedUsers": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "name": "gabriel.oliveira2",
                    "username": "gabriel.oliveira2"
                }
            ],
            "acceptedUserIds": [
                "brLK2GKKH5S7RrgM8"
            ],
            "busyUsers": [],
            "busyUserIds": [],
            "timeoutUsers": [],
            "timeoutUserIds": [],
            "msgId": "wS8Pj2oCaxxB2ufpg",
            "started": "2019-08-13T19:07:40.543Z",
            "finished": "2019-08-13T19:08:18.629Z",
            "_updatedAt": "2019-08-13T19:08:18.630Z",
            "userData": {
                "_id": "5vopq6R99CXT2zY6B",
                "name": "Changed Name 4",
                "username": "gabriel.oliveira"
            },
            "toUsernames": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "username": "gabriel.oliveira2"
                },
                {
                    "_id": "txer9hbbdRtWieC36",
                    "username": "gabriel.oliveira3"
                }
            ]
        },
        {
            "_id": "H9qLoPYSrcNjmo63E",
            "userId": "5vopq6R99CXT2zY6B",
            "to": [
                "brLK2GKKH5S7RrgM8",
                "txer9hbbdRtWieC36"
            ],
            "toNames": [
                "gabriel.oliveira2",
                "Gabriel Oliveira 3"
            ],
            "channel": "https://pimenta.live/pimentagroupxwuxNjkzT2fAy7JCBtpxGjMs3taDcJzaCf",
            "date": "2019-08-13T19:07:28.385Z",
            "isGroup": true,
            "waiting": false,
            "accepted": false,
            "missed": false,
            "callerCancel": true,
            "senderName": "Changed Name 4",
            "senderGroup": "teste-grupo-privado-2",
            "onlyAudio": false,
            "roomId": "tpxGjMs3taDcJzaCf",
            "log": {},
            "participants": 0,
            "rejectCount": 2,
            "rejectUsers": [
                {
                    "_id": "5vopq6R99CXT2zY6B",
                    "name": "Gabriel",
                    "username": "gabriel.oliveira"
                },
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "name": "gabriel.oliveira2",
                    "username": "gabriel.oliveira2"
                }
            ],
            "rejectUserIds": [
                "5vopq6R99CXT2zY6B",
                "brLK2GKKH5S7RrgM8"
            ],
            "acceptedUsers": [],
            "acceptedUserIds": [],
            "busyUsers": [],
            "busyUserIds": [],
            "timeoutUsers": [],
            "timeoutUserIds": [],
            "msgId": "RYSWJaSt7XMxj6piE",
            "started": null,
            "finished": "2019-08-13T19:07:33.001Z",
            "_updatedAt": "2019-08-13T19:07:33.002Z",
            "userData": {
                "_id": "5vopq6R99CXT2zY6B",
                "name": "Changed Name 4",
                "username": "gabriel.oliveira"
            },
            "toUsernames": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "username": "gabriel.oliveira2"
                },
                {
                    "_id": "txer9hbbdRtWieC36",
                    "username": "gabriel.oliveira3"
                }
            ]
        },
        {
            "_id": "DatCbGyYos9LB4wSv",
            "userId": "5vopq6R99CXT2zY6B",
            "to": [
                "brLK2GKKH5S7RrgM8"
            ],
            "toNames": [
                "gabriel.oliveira2"
            ],
            "channel": "https://pimenta.live/pimentagroupxwuxNjkzT2fAy7JCBtpxGjMs3taDcJzaCf",
            "date": "2019-08-13T13:44:22.095Z",
            "isGroup": true,
            "waiting": false,
            "accepted": true,
            "missed": false,
            "callerCancel": false,
            "senderName": "Changed Name 4",
            "senderGroup": "teste-grupo-privado-2",
            "onlyAudio": false,
            "roomId": "tpxGjMs3taDcJzaCf",
            "log": {
                "5vopq6R99CXT2zY6B": {
                    "startDate": "2019-08-13T13:44:28.704Z",
                    "ping": "2019-08-13T13:44:48.853Z",
                    "endDate": "2019-08-13T13:45:13.237Z"
                }
            },
            "participants": 1,
            "rejectCount": 0,
            "rejectUsers": [],
            "rejectUserIds": [],
            "acceptedUsers": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "name": "gabriel.oliveira2",
                    "username": "gabriel.oliveira2"
                }
            ],
            "acceptedUserIds": [
                "brLK2GKKH5S7RrgM8"
            ],
            "busyUsers": [],
            "busyUserIds": [],
            "timeoutUsers": [],
            "timeoutUserIds": [],
            "msgId": "WbYDKtc9Lqw8EnbgL",
            "started": "2019-08-13T13:44:28.457Z",
            "finished": "2019-08-13T13:45:13.285Z",
            "_updatedAt": "2019-08-13T13:45:13.287Z",
            "userData": {
                "_id": "5vopq6R99CXT2zY6B",
                "name": "Changed Name 4",
                "username": "gabriel.oliveira"
            },
            "toUsernames": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "username": "gabriel.oliveira2"
                }
            ]
        },
        {
            "_id": "CgCe9Ck94aXmji452",
            "userId": "5vopq6R99CXT2zY6B",
            "to": [
                "brLK2GKKH5S7RrgM8"
            ],
            "toNames": [
                "gabriel.oliveira2"
            ],
            "channel": "https://pimenta.live/pimentagroupxwuxNjkzT2fAy7JCBtpxGjMs3taDcJzaCf",
            "date": "2019-08-13T13:43:25.763Z",
            "isGroup": true,
            "waiting": false,
            "accepted": true,
            "missed": false,
            "callerCancel": false,
            "senderName": "Changed Name 4",
            "senderGroup": "teste-grupo-privado-2",
            "onlyAudio": false,
            "roomId": "tpxGjMs3taDcJzaCf",
            "log": {},
            "participants": 0,
            "rejectCount": 0,
            "rejectUsers": [],
            "rejectUserIds": [],
            "acceptedUsers": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "name": "gabriel.oliveira2",
                    "username": "gabriel.oliveira2"
                }
            ],
            "acceptedUserIds": [
                "brLK2GKKH5S7RrgM8"
            ],
            "busyUsers": [],
            "busyUserIds": [],
            "timeoutUsers": [],
            "timeoutUserIds": [],
            "msgId": "WSaomozfjJndQ44tB",
            "started": "2019-08-13T13:43:30.689Z",
            "finished": "2019-08-13T13:44:02.190Z",
            "_updatedAt": "2019-08-13T13:44:02.190Z",
            "userData": {
                "_id": "5vopq6R99CXT2zY6B",
                "name": "Changed Name 4",
                "username": "gabriel.oliveira"
            },
            "toUsernames": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "username": "gabriel.oliveira2"
                }
            ]
        },
        {
            "_id": "DwNNrzdQX72sbtd6B",
            "userId": "5vopq6R99CXT2zY6B",
            "to": [
                "brLK2GKKH5S7RrgM8"
            ],
            "toNames": [
                "gabriel.oliveira2"
            ],
            "channel": "https://pimenta.live/pimentagroupxwuxNjkzT2fAy7JCBtpxGjMs3taDcJzaCf",
            "date": "2019-08-13T13:36:19.333Z",
            "isGroup": true,
            "waiting": false,
            "accepted": false,
            "missed": false,
            "callerCancel": false,
            "senderName": "Changed Name 4",
            "senderGroup": "teste-grupo-privado-2",
            "onlyAudio": false,
            "roomId": "tpxGjMs3taDcJzaCf",
            "log": {},
            "participants": 0,
            "rejectCount": 1,
            "rejectUsers": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "name": "gabriel.oliveira2",
                    "username": "gabriel.oliveira2"
                }
            ],
            "rejectUserIds": [
                "brLK2GKKH5S7RrgM8"
            ],
            "acceptedUsers": [],
            "acceptedUserIds": [],
            "busyUsers": [],
            "busyUserIds": [],
            "timeoutUsers": [],
            "timeoutUserIds": [],
            "msgId": "BdbgXEGhhm5b4DfRa",
            "started": null,
            "finished": "2019-08-13T13:36:29.399Z",
            "_updatedAt": "2019-08-13T13:36:29.400Z",
            "userData": {
                "_id": "5vopq6R99CXT2zY6B",
                "name": "Changed Name 4",
                "username": "gabriel.oliveira"
            },
            "toUsernames": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "username": "gabriel.oliveira2"
                }
            ]
        },
        {
            "_id": "2nK5gASQhT6HymMxg",
            "userId": "5vopq6R99CXT2zY6B",
            "to": [
                "brLK2GKKH5S7RrgM8"
            ],
            "toNames": [
                "gabriel.oliveira2"
            ],
            "channel": "https://pimenta.live/pimentagroupxwuxNjkzT2fAy7JCBtpxGjMs3taDcJzaCf",
            "date": "2019-08-13T13:31:49.618Z",
            "isGroup": true,
            "waiting": false,
            "accepted": true,
            "missed": false,
            "callerCancel": false,
            "senderName": "Changed Name 4",
            "senderGroup": "teste-grupo-privado-2",
            "onlyAudio": false,
            "roomId": "tpxGjMs3taDcJzaCf",
            "log": {
                "5vopq6R99CXT2zY6B": {
                    "startDate": "2019-08-13T13:31:58.000Z",
                    "ping": "2019-08-13T13:32:17.891Z",
                    "endDate": "2019-08-13T13:32:41.415Z"
                }
            },
            "participants": 1,
            "rejectCount": 0,
            "rejectUsers": [],
            "rejectUserIds": [],
            "acceptedUsers": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "name": "gabriel.oliveira2",
                    "username": "gabriel.oliveira2"
                }
            ],
            "acceptedUserIds": [
                "brLK2GKKH5S7RrgM8"
            ],
            "busyUsers": [],
            "busyUserIds": [],
            "timeoutUsers": [],
            "timeoutUserIds": [],
            "msgId": "7iFQWSDZyfZpjbiPx",
            "started": "2019-08-13T13:31:54.681Z",
            "finished": "2019-08-13T13:32:41.464Z",
            "_updatedAt": "2019-08-13T13:32:41.465Z",
            "userData": {
                "_id": "5vopq6R99CXT2zY6B",
                "name": "Changed Name 4",
                "username": "gabriel.oliveira"
            },
            "toUsernames": [
                {
                    "_id": "brLK2GKKH5S7RrgM8",
                    "username": "gabriel.oliveira2"
                }
            ]
        }
    ],
    "total": 194,
    "page": 1,
    "count": 10,
    "offset": 0
}