I have this example here and i'm trying to only query the empty mongodb array
var data = [{
"dynamic_env": null,
"mission_critical": null,
"chart-version": null,
"app-url": null,
"mongodb": {},
"nightly_shutdown": false,
"external_values": null,
"external_values_source": null,
"external_values_path": null,
"atlas_database": null,
"allow_db_restore": null,
"on-demand": false,
"helm_timeout": null,
"aws-account": null,
"post": [],
"pre": [],
"atlas_project": null,
"istio-enabled": false,
"env_subscription": null,
"istio-auth-policy": null,
"version": null,
"e2e-tests-script": [],
"morning_startup": true,
"project_dst": null,
"cred": null,
"dataset": null,
"project_src": null,
"Env": {
"identifier": "cm-infra-ci-core1#admin365-infra-stg-eks#admin365-cm-infra-ci-core1",
"title": "cm-infra-ci-core1"
},
"namespace": "admin365-cm-infra-ci-core1",
"cluster": {
"identifier": "admin365-infra-stg-eks#infra-stg",
"title": "admin365-infra-stg-eks"
},
"Service": {
"identifier": "user-data-management-gdpr-fetch",
"title": "user-data-management-gdpr-fetch"
},
"team": null,
"$identifier": "user-data-management-gdpr-fetch#cm-infra-ci-core1#admin365-cm-infra-ci-core1",
"$title": "user-data-management-gdpr-fetch#cm-infra-ci-core1"
},
{
"dynamic_env": null,
"mission_critical": null,
"chart-version": null,
"app-url": null,
"mongodb": {a: 123},
"nightly_shutdown": false,
"external_values": null,
"external_values_source": null,
"external_values_path": null,
"atlas_database": null,
"allow_db_restore": null,
"on-demand": false,
"helm_timeout": null,
"aws-account": null,
"post": [],
"pre": [],
"atlas_project": null,
"istio-enabled": false,
"env_subscription": null,
"istio-auth-policy": null,
"version": null,
"e2e-tests-script": [],
"morning_startup": true,
"project_dst": null,
"cred": null,
"dataset": null,
"project_src": null,
"Env": {
"identifier": "cm-infra-ci-core1#admin365-infra-stg-eks#admin365-cm-infra-ci-core1",
"title": "cm-infra-ci-core1"
},
"namespace": "admin365-cm-infra-ci-core1",
"cluster": {
"identifier": "admin365-infra-stg-eks#infra-stg",
"title": "admin365-infra-stg-eks"
},
"Service": {
"identifier": "user-data-management-gdpr-fetch",
"title": "user-data-management-gdpr-fetch"
},
"team": null,
"$identifier": "user-data-management-gdpr-fetch#cm-infra-ci-core1#admin365-cm-infra-ci-core1",
"$title": "user-data-management-gdpr-fetch#cm-infra-ci-core1"
}];
var res = alasql(`SELECT * FROM ? WHERE ('mongodb'->() = {})`,[data]);
console.log(res.length); // [{"a":1,"b":40},{"a":2,"b":20}]
Add a user-defined function that returns the number of keys in the object, then query it:
alasql.fn.keylen = function(x) { return Object.keys(x).length; }
var res = alasql(`SELECT * FROM ? WHERE keylen(mongodb) = 0`,[data]);
General Call Record Understanding
We're using the Microsoft Teams Graph API to analyse calls made through Microsoft Teams. We've setup a notification web hook that subscribes to the call records using the Graph API and then uses some more API calls to retrieve the call and user information for the received call. That's all working quite well (despite the time delay - but that's OK). What we struggle with ist the information retrieved from the Call Record API. We receive following data for example (UUIDs, names and phone numbers anonymised):
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#communications/callRecords(sessions())/$entity",
"id": "00000000-0000-0000-0000-000000000000",
"version": 1,
"type": "groupCall",
"modalities": [
"audio",
"screenSharing"
],
"lastModifiedDateTime": "2021-10-18T11:16:03.5458861Z",
"startDateTime": "2021-10-18T10:55:33.712657Z",
"endDateTime": "2021-10-18T10:57:23.1331192Z",
"joinWebUrl": null,
"organizer": {
"user": null,
"acsUser": null,
"spoolUser": null,
"phone": {
"id": "+49XXXXXXXX",
"displayName": null,
"tenantId": null
},
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null
},
"participants": [
{
"acsUser": null,
"spoolUser": null,
"phone": null,
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null,
"user": {
"id": "00000000-0000-0000-0000-000000000000",
"displayName": "Firstname Lastname",
"tenantId": "00000000-0000-0000-0000-000000000000"
}
},
{
"acsUser": null,
"spoolUser": null,
"phone": null,
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null,
"user": {
"id": "00000000-0000-0000-0000-000000000000",
"displayName": null,
"tenantId": null
}
},
{
"user": null,
"acsUser": null,
"spoolUser": null,
"phone": {
"id": "+49XXXXXXXX",
"displayName": null,
"tenantId": null
},
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null
},
{
"user": null,
"acsUser": null,
"spoolUser": null,
"phone": {
"id": "+49XXXXXXXX",
"displayName": null,
"tenantId": null
},
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null
},
{
"acsUser": null,
"spoolUser": null,
"phone": null,
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null,
"user": {
"id": "00000000-0000-0000-0000-000000000000",
"displayName": null,
"tenantId": "00000000-0000-0000-0000-000000000000"
}
},
{
"acsUser": null,
"spoolUser": null,
"phone": null,
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null,
"user": {
"id": "00000000-0000-0000-0000-000000000000",
"displayName": null,
"tenantId": "00000000-0000-0000-0000-000000000000"
}
}
],
"sessions#odata.context": "https://graph.microsoft.com/v1.0/$metadata#communications/callRecords('00000000-0000-0000-0000-000000000000')/sessions",
"sessions": [
{
"id": "403139dd-b5c1-457e-a5aa-b07e8c2bcc58",
"modalities": [
"audio"
],
"startDateTime": "2021-10-18T10:55:40.552989Z",
"endDateTime": "2021-10-18T10:57:23.1331192Z",
"failureInfo": null,
"caller": {
"#odata.type": "#microsoft.graph.callRecords.participantEndpoint",
"feedback": null,
"userAgent": {
"#odata.type": "#microsoft.graph.callRecords.clientUserAgent",
"headerValue": null,
"applicationVersion": null,
"platform": "unknown",
"productFamily": "unknown"
},
"identity": {
"acsUser": null,
"spoolUser": null,
"phone": null,
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null,
"user": {
"id": "00000000-0000-0000-0000-000000000000",
"displayName": null,
"tenantId": null
}
}
},
"callee": {
"#odata.type": "#microsoft.graph.callRecords.serviceEndpoint",
"userAgent": {
"#odata.type": "#microsoft.graph.callRecords.clientUserAgent",
"headerValue": null,
"applicationVersion": null,
"platform": "unknown",
"productFamily": "unknown"
}
}
},
{
"id": "b538ce68-cd12-4b22-b127-69b73a183e78",
"modalities": [
"audio"
],
"startDateTime": "2021-10-18T10:55:41.5686724Z",
"endDateTime": "2021-10-18T10:57:23.1331192Z",
"failureInfo": null,
"caller": {
"#odata.type": "#microsoft.graph.callRecords.participantEndpoint",
"feedback": null,
"userAgent": {
"#odata.type": "#microsoft.graph.callRecords.clientUserAgent",
"headerValue": null,
"applicationVersion": null,
"platform": "unknown",
"productFamily": "unknown"
},
"identity": {
"acsUser": null,
"spoolUser": null,
"phone": null,
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null,
"user": {
"id": "00000000-0000-0000-0000-000000000000",
"displayName": null,
"tenantId": null
}
}
},
"callee": {
"#odata.type": "#microsoft.graph.callRecords.serviceEndpoint",
"userAgent": {
"#odata.type": "#microsoft.graph.callRecords.clientUserAgent",
"headerValue": null,
"applicationVersion": null,
"platform": "unknown",
"productFamily": "unknown"
}
}
},
{
"id": "beb5c088-70f6-4b77-8a47-fbef0f3b6707",
"modalities": [
"audio"
],
"startDateTime": "2021-10-18T10:55:36.2402487Z",
"endDateTime": "2021-10-18T10:57:23.055049Z",
"failureInfo": null,
"caller": {
"#odata.type": "#microsoft.graph.callRecords.participantEndpoint",
"feedback": null,
"userAgent": {
"#odata.type": "#microsoft.graph.callRecords.clientUserAgent",
"headerValue": null,
"applicationVersion": null,
"platform": "unknown",
"productFamily": "unknown"
},
"identity": {
"user": null,
"acsUser": null,
"spoolUser": null,
"phone": {
"id": "+49XXXXXXXX",
"displayName": null,
"tenantId": null
},
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null
}
},
"callee": {
"#odata.type": "#microsoft.graph.callRecords.serviceEndpoint",
"userAgent": {
"#odata.type": "#microsoft.graph.callRecords.clientUserAgent",
"headerValue": null,
"applicationVersion": null,
"platform": "unknown",
"productFamily": "unknown"
}
}
},
{
"id": "c1fce6ee-8ac6-4680-a079-8384665aeba0",
"modalities": [
"audio"
],
"startDateTime": "2021-10-18T10:55:53.0392071Z",
"endDateTime": "2021-10-18T10:57:23.1331192Z",
"failureInfo": null,
"caller": {
"#odata.type": "#microsoft.graph.callRecords.participantEndpoint",
"feedback": null,
"userAgent": {
"#odata.type": "#microsoft.graph.callRecords.clientUserAgent",
"headerValue": null,
"applicationVersion": null,
"platform": "unknown",
"productFamily": "unknown"
},
"identity": {
"acsUser": null,
"spoolUser": null,
"phone": null,
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null,
"user": {
"id": "00000000-0000-0000-0000-000000000000",
"displayName": null,
"tenantId": null
}
}
},
"callee": {
"#odata.type": "#microsoft.graph.callRecords.serviceEndpoint",
"userAgent": {
"#odata.type": "#microsoft.graph.callRecords.clientUserAgent",
"headerValue": null,
"applicationVersion": null,
"platform": "unknown",
"productFamily": "unknown"
}
}
},
{
"id": "ce6e4e5d-77ff-421a-9b28-670dd691a119",
"modalities": [
"audio"
],
"startDateTime": "2021-10-18T10:55:36.2402487Z",
"endDateTime": "2021-10-18T10:55:52.4142559Z",
"failureInfo": null,
"caller": {
"#odata.type": "#microsoft.graph.callRecords.participantEndpoint",
"feedback": null,
"userAgent": {
"#odata.type": "#microsoft.graph.callRecords.clientUserAgent",
"headerValue": "MicrosoftTeamsCallQueueService (20211014.1)",
"applicationVersion": null,
"platform": "unknown",
"productFamily": "unknown"
},
"identity": {
"acsUser": null,
"spoolUser": null,
"phone": null,
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null,
"user": {
"id": "00000000-0000-0000-0000-000000000000",
"displayName": null,
"tenantId": "00000000-0000-0000-0000-000000000000"
}
}
},
"callee": {
"#odata.type": "#microsoft.graph.callRecords.serviceEndpoint",
"userAgent": {
"#odata.type": "#microsoft.graph.callRecords.clientUserAgent",
"headerValue": null,
"applicationVersion": null,
"platform": "unknown",
"productFamily": "unknown"
}
}
},
{
"id": "00000000-0000-0000-0000-000000000000",
"modalities": [
"audio"
],
"startDateTime": "2021-10-18T10:55:33.712657Z",
"endDateTime": "2021-10-18T10:57:23.0157168Z",
"failureInfo": null,
"caller": {
"#odata.type": "#microsoft.graph.callRecords.participantEndpoint",
"feedback": null,
"userAgent": {
"#odata.type": "#microsoft.graph.callRecords.clientUserAgent",
"headerValue": null,
"applicationVersion": null,
"platform": "unknown",
"productFamily": "unknown"
},
"identity": {
"user": null,
"acsUser": null,
"spoolUser": null,
"phone": {
"id": "+49XXXXXXXX",
"displayName": null,
"tenantId": null
},
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null
}
},
"callee": {
"#odata.type": "#microsoft.graph.callRecords.participantEndpoint",
"feedback": null,
"userAgent": {
"#odata.type": "#microsoft.graph.callRecords.clientUserAgent",
"headerValue": "MicrosoftTeamsCallQueueService (20211014.1)",
"applicationVersion": null,
"platform": "unknown",
"productFamily": "unknown"
},
"identity": {
"acsUser": null,
"spoolUser": null,
"phone": null,
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null,
"user": {
"id": "00000000-0000-0000-0000-000000000000",
"displayName": null,
"tenantId": "00000000-0000-0000-0000-000000000000"
}
}
}
},
{
"id": "e4f20c64-9343-4d67-b47b-9ba5e34ab373",
"modalities": [
"audio",
"screenSharing"
],
"startDateTime": "2021-10-18T10:55:51.8360806Z",
"endDateTime": "2021-10-18T10:57:23.1331192Z",
"failureInfo": null,
"caller": {
"#odata.type": "#microsoft.graph.callRecords.participantEndpoint",
"feedback": null,
"userAgent": {
"#odata.type": "#microsoft.graph.callRecords.clientUserAgent",
"headerValue": "CallSignalingAgent (27/1.4.00.26376//;release_ktolskiy2/hook_R22.2021.22.01.56;releases/CL2021.R22)",
"applicationVersion": null,
"platform": "windows",
"productFamily": "teams"
},
"identity": {
"acsUser": null,
"spoolUser": null,
"phone": null,
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null,
"user": {
"id": "00000000-0000-0000-0000-000000000000",
"displayName": "Firstname Lastname",
"tenantId": "00000000-0000-0000-0000-000000000000"
}
}
},
"callee": {
"#odata.type": "#microsoft.graph.callRecords.serviceEndpoint",
"userAgent": {
"#odata.type": "#microsoft.graph.callRecords.clientUserAgent",
"headerValue": null,
"applicationVersion": null,
"platform": "unknown",
"productFamily": "unknown"
}
}
}
]
}
To be able to get our heads around the data, we visualise the call sessions like this:
Our interpretation for this call is:
+49XXXXXXXX calls the Call Queue call queue at 12:55:33
at 12:55:51 Firstname Lastname picks up the call from the queue
the call ends at 12:57:23.
Is this correct?
Failure Info
Next thing we encountered is the failureInfo information on a call record session. For some calls that are listed as failed in the Teams Call Record CSV export (administration user interface) we receive no failure info (but the total call duration is 0 seconds), while for others that are listed as successful in the CSV export we receive a failure info such as
"failureInfo": {
"reason": "Other",
"stage": "callSetup"
}
These calls then have a sensible call duration.
Does anybody know of any issues with the failure information or what's the deal with this information?
We're analysing the calls rather extensively but currently we use our own interpretation of the call record sessions to determine what type of call it was, who picked up the call, who could have picked up the call, etc. But unfortunately there's not much information around (at least I could not find any) that describes the nature of these call record sessions: what they represent, what types of services we can encounter (bots, apps, etc.), which information you can extract from them and which not. Is just guessing at the moment for us.
I'd be really grateful for any hint, link, nudge in the right direction to get a better understanding of these call records.
The problwm what iam facing is ..when ever iam passing the values like array inside the dictionyy..it is showing me the error -1005 connection was lost..and when ever i dont pass the values the response is getting successfully created but inthe server side database the ofiice price details and office contact information and office document is not saving ..can any one help me how to handle thanks in advance
[
{
"OfficePrice": [
{
"office": 1,
"making_charge": 1,
"wastage": 1,
"weight_by": 1,
"credit_period": 1,
"cartage_price_type": null,
"cartage_price": null,
"diamond_price": 1,
"amethyst_price": 1,
"amber_price": 1,
"sapphire_price": 1,
"emerald_price": null,
"ruby_price": null,
"id": 1,
"createdAt": "2016-04-15T08:41:08.000Z",
"updatedAt": "2016-04-16T14:18:39.000Z"
}
],
"OfficeContactPerson": [
{
"office": 1,
"contact_name": null,
"designation": "ASDF",
"department": "234",
"mobile": "1231231231",
"email": null,
"incharge_status": null,
"created_by": null,
"modified_by": null,
"id": 1,
"createdAt": "2016-04-15T08:41:08.000Z",
"updatedAt": "2016-04-16T14:18:39.000Z"
},
{
"office": 1,
"contact_name": null,
"designation": "ASDF",
"department": "ASDF",
"mobile": "1231231231",
"email": null,
"incharge_status": null,
"created_by": null,
"modified_by": null,
"id": 2,
"createdAt": "2016-04-15T08:41:08.000Z",
"updatedAt": "2016-04-16T14:18:39.000Z"
}
],
"OfficeBank": [
{
"office": 1,
"bank": 2,
"branch": null,
"city": null,
"account_type": 1,
"ifsc_code": "12123",
"account_number": "12234",
"account_name": "asdfasd",
"id": 3,
"createdAt": "2016-04-16T14:18:39.000Z",
"updatedAt": "2016-04-16T14:18:39.000Z"
}
],
"OfficeDocument": [
{
"office": 1,
"document_original": null,
"document_stored_name": null,
"id": 1,
"createdAt": "2016-04-15T08:41:08.000Z",
"updatedAt": "2016-04-16T14:18:39.000Z"
}
],
"city": {
"name": "Bengalore",
"id": 1,
"createdAt": null,
"updatedAt": "2016-04-16T16:02:53.000Z"
},
"state": {
"name": "Karnataga",
"id": 1,
"createdAt": null,
"updatedAt": "2016-04-16T16:02:53.000Z"
},
"district": {
"name": "BGL",
"id": 1,
"createdAt": null,
"updatedAt": "2016-04-16T16:02:53.000Z"
},
"name": "kkk",
"short_name": "asdf",
"shop_no": "1",
"door_no": "11",
"floor": "1",
"building": "1",
"street": "1",
"area": "1",
"main": "1",
"pincode": "1",
"telephone": "1",
"hallmarking": null,
"payment_by": null,
"delivered_to": null,
"active_status": null,
"delete_status": null,
"created_by": null,
"modified_by": null,
"office_photo_original": null,
"office_photo_stored_name": null,
"cin_path": null,
"vat": null,
"pan": null,
"others": "123123",
"id": 1,
"createdAt": "2016-04-15T08:41:08.000Z",
"updatedAt": "2016-04-16T14:18:39.000Z"
}
the dictionary can't save null values.
The NSDictionay format doesn't support null vales. Thats why its returning error.
The only possible solution for this is to update server database ,change null values to 0 or "NULL"(in double quotes). it will solve your issue.