Firstly, ringout is working correctly, it dials two numbers and connects them together successfully.
When I send a POST request to the Ringout REST API endpoint, I get a ringout ID back. I then use this ringout ID and issue a GET request every few seconds to track when both parties have answered there calls. ( I am aware of webhooks, but webhooks don't give me the callee's status)
{
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/XXXX/extension/XXXXXX/ringout/XXx";,
"id": xxx,
"status": {
"callStatus": "Success",
"callerStatus": "Success",
"calleeStatus": "Success"
}
}
I use this same polling technique to work out when either party has disconnected from the call.
{
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/xxxx/extension/xxxx/ringout/xxxx";,
"id": xxx,
"status": {
"callStatus": "CannotReach",
"callerStatus": "Finished",
"calleeStatus": "Finished"
}
}
I noticed that the ringout ID only lives for about 30 seconds, after this time when I send a GET request I get this response even though the phone call is still taking place.
{
"errorCode": "CMN-102",
"message": "Resource for parameter [ringoutId] is not found",
"errors": [
{
"errorCode": "CMN-102",
"message": "Resource for parameter [ringoutId] is not found",
"parameterName": "ringoutId"
}
],
"parameterName": "ringoutId"
}
Is this the expected behaviour for a ringout call, does the ID disappear after 30 seconds, even though the call is still active?
This question was also asked in the RingCentral Developer Community, and answered by the Principal Architect for the Platform: https://devcommunity.ringcentral.com/ringcentraldev/topics/how-long-does-a-ringout-id-live-for
Adding a copy of Anton's answer here to save people a click...
Ringout ID lives until both call legs are established (or canceled).
You cannot use this ID to check the status of a call which is already
connected to both parties or to cancel already connected call.
In order to monitor status of an established call you should use our
presence notifications.
Related
I've been trying to make API calls to create snapshot of GCP disk through my code but it keeps giving me this error:
Failed to check snapshot status before creating GCPDisk swift-snapshot-gkeos-dkdwl-dynamic-pvc-1b13097f-7-1630579922. HTTP Error: GET request to the remote host failed [HTTP-Code: 404]: {
"error": {
"code": 404,
"message": "The resource 'projects/rw-migration-dev/global/snapshots/swift-snapshot-gkeos-dkdwl-dynamic-pvc-1b13097f-7-1630579922' was not found",
"errors": [
{
"message": "The resource 'projects/rw-migration-dev/global/snapshots/swift-snapshot-gkeos-dkdwl-dynamic-pvc-1b13097f-7-1630579922' was not found",
"domain": "global",
"reason": "notFound"
}
]
}
}
My program worked fine for a considerable amount of time, but now sometimes it gives errors.
I tried passing the same query through postman and it works fine. Some times it works fine through .
The main problem is with the snapshot creating API,
https://compute.googleapis.com/compute/v1/projects/{projectName}/zones/{diskLocation}/disks/{diskName}/createSnapshot
This URL works fine on postman, after creation you can see the snapshot when you list them, but through code once this API is called it returns an OK 200, but no snapshot is created
Can someone tell me why this is happening?
I think you are trying to use this operation:
https://cloud.google.com/compute/docs/reference/rest/v1/disks/createSnapshot
Which is a long running operation, a 200 response indicates that the snapshot operation started, but it does not indicate that it has finished.
The documentation points to:
https://cloud.google.com/compute/docs/api/how-tos/api-requests-responses#handling_api_responses
You may need to poll the operation until it completes before trying to use the snapshot.
I am working with Firebase Cloud Messaging in Django using django-push-notifications to deliver push notifications to our users via desktop notifications.
After a browser is fully closed (such as when the the computer is turned off), our users receive a backlog of all notifications previously sent next time they boot up.
While there are situations where a user would want to receive the entire backlog of messages, this is not one of them.
It seems the answer is to set TTL=0, as per this section of the FCM documentation, but my attempts are not resulting in the desired behavior.
Please help me better understand TTL in this context. If TTL is the right way to go, what is the proper way to format TTL in send_message() using django-push-notifications so that messages will not accumulate if not immediately delivered?
Here is what I have attempted:
devices.send_message(
body,
TTL=0,
time_to_live=0,
link='blah',
extra={'title': 'blah blah', 'icon': '/foo/bar.png'}
)
The format that you send seems different from the one in the documentation you linked. From the documentation:
{
"message":{
"token":"bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
"data":{
"Nick" : "Mario",
"body" : "great match!",
"Room" : "PortugalVSDenmark"
},
"apns":{
"headers":{
"apns-expiration":"1604750400"
}
},
"android":{
"ttl":"4500s"
},
"webpush":{
"headers":{
"TTL":"4500"
}
}
}
}
So key here is that the time-to-live for a webpush message is set under webpush/headers/TTL, while you're adding it to the top-level.
Based on Stackdriver, I want to send notifications to my Centreon monitoring (behind Nagios) for workflow reasons, do you have any idea on how to do so?
Thank you
Stackdriver alerting allows webhook notifications, so you can run a server to forward the notifications anywhere you need to (including Centreon), and point the Stackdriver alerting notification channel to that server.
There are two ways to send external information in the Centreon queue without a traditional passive agent mode.
First, you can use the Centreon DSM (Dynamic Services Management) addon.
It is interesting because you don't have to register a dedicated and already known service in your configuration to match the notification.
With Centreon DSM, Centreon can receive events such as SNMP traps resulting from the detection of a problem and assign the event dynamically to a slot defined in Centreon, like a tray event.
A resource has a set number of “slots” on which alerts will be assigned (stored). While this event has not been taken into account by human action, it will remain visible in the Centreon web frontend. When the event is acknowledged, the slot becomes available for new events.
The event must be transmitted to the server via an SNMP Trap.
All the configuration is made through Centreon web interface after the module installation.
Complete explanations, screenshots, and tips are described on the online documentation: https://documentation.centreon.com/docs/centreon-dsm/en/latest/user.html
Secondly, Centreon developers added a Centreon REST API you can use to submit information to the monitoring engine.
This feature is easier to use than the SNMP Trap way.
In that case, you have to create both host/service objects before any API utilization.
To send status, please use the following URL using POST method:
api.domain.tld/centreon/api/index.php?action=submit&object=centreon_submit_results
Header
key value
Content-Type application/json
centreon-auth-token the value of authToken you got on the authentication response
Example of service body submit: The body is a JSON with the parameters provided above formatted as below:
{
"results": [
{
"updatetime": "1528884076",
"host": "Centreon-Central"
"service": "Memory",
"status": "2"
"output": "The service is in CRITICAL state"
"perfdata": "perf=20"
},
{
"updatetime": "1528884076",
"host": "Centreon-Central"
"service": "fake-service",
"status": "1"
"output": "The service is in WARNING state"
"perfdata": "perf=10"
}
]
}
Example of body response: :: The response body is a JSON with the HTTP return code, and a message for each submit:
{
"results": [
{
"code": 202,
"message": "The status send to the engine"
},
{
"code": 404,
"message": "The service is not present."
}
]
}
More information is available in the online documentation: https://documentation.centreon.com/docs/centreon/en/19.04/api/api_rest/index.html
Centreon REST API also allows to get real-time status for hosts, services and do the object configuration.
I have set the value of session attribute in my lambda function response, which I am getting in amazon lex after invoking it from Lex. But, When I tried to access this value in Amazon connect using -
$.Lex.SessionAttributes.dateFlag
I am not able to access it.
I have already tried using Type as external and Lex Attributes.
I am putting the condition in amazon connect based on the values received from Above.
In logs I found that the condition where I am comparing this value comes to false.
Can anyone suggest some idea on how to get the custom value/sessionAttribute values from Lex/Lambda in Amazon Connect.
Below is my response JSON from Lex. I am trying to access the dateFlag.
{
"dialogState": "Fulfilled",
"intentName": "suitabletime",
"message": "Thanks for the confirmation",
"messageFormat": "PlainText",
"responseCard": null,
"sessionAttributes": {
"dateFlag": "1",
"previousIntent": "suitabletime"
},
"slotToElicit": null,
"slots": {
"date": "2018-09-14",
"time": "13:00"
}
}
Finally I found the solution. This is simpler than what I was writing. We can directly access the session attribute in our connect by taking the attribute type as Lex attribute and Attribute as Attribute Key/Name.
Below is the screenshot for the same.
I've made a request using "me/inbox" to get the threads that are in my inbox. I can then request some of the thread objects using their ID directly, as well as being able to access the comments within some of the thread objects using "/comments" as the GraphAPI URL. However, some of the thread objects for some friends will not be returned. Instead, I get the following error:
{
"error": {
"message": "Unsupported get request.",
"type": "GraphMethodException",
"code": 100
}
}
I was wondering if anyone had any idea where I might be going wrong in requesting particular threads, or if this is a Facebook issue?
Instead of making a request to "me/inbox", I needed to be making a request to "me/threads".
From the "data" value that is returned, you can get a list of Thread objects which contain an "id" value. This "id" value can be used to request a specific thread. Using this method of retrieving Threads seemed to solve the issue.
Would welcome further solutions to retrieving Threads from Facebook!
i had the same problem with fetching
https://graph.facebook.com/246252455409826
but this can be solved with putting your access_token like this
https://graph.facebook.com/246252455409826?access_token= *****
I think it only takes the age authentication.