Retrieve twilio voice logs via webhook - twilio

I've checked the documentation and it explains how to retrieve call logs via API calls, but there does not seem to be a webhook available whenever a log is created :')
Is there an easy way to get notified whenever twilio creates a log for any number?

Twilio doesn't have webhooks that are fired on the creation of call logs.
You could however utilise the incoming call & status callback webhooks on phone numbers within the account to determine when specific actions are fired and begin any actions needed.

Related

How to unsubscribe messaging/voice webhook to stop receiving events occurred in a number?

In Twilio, after we register a webhook URL in an active number, we'll be able to get event notifications whenever events occour in the registered number depending on the type of webhook we registered (Voice/SMS).
The registration of the webhook can be achieved via REST API. Similarly is there any API to stop the webhook notification? Else how should we handle this?
The same API, incomingPhoneResource, would be used do the same. You should be able to create, read, update and delete the configured webhooks for voice and SMS phone number configurations this way.

Use Firebase Cloud Messages with SQL?

What I am trying to do is basically to automatize the FCM service, so I don't need to create the messages and schedule its action from the firebase messaging panel, but instead use SQL database will create that instance or schedule that notification automatically to be send at a certain hour. (Example: a delivery man ends its shift and a Store procedure register the hour so the supervisor knows the status of the route via the notification, something like the amazon delivery tracking works to notify the status of your delivery). What I want to know is if there is any way to integrate SQL to create those messages so firebase can send them. And if there is a way, how it works.
I would write a trigger in my backend service so that when certain a database table/column changed or some query is executed, it will trigger an HTTP request to send a FCM message.
https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages/send

Twilio in-progress status callback for an incoming call

I'm using twilio-ruby (5.15.1)
My users call a Twilio phone number. Using the Incoming Call webhook my server picks up the call.
The Call Status Changes webhook is setup however that endpoint only receives completed statuses.
I'm interested in reacting to in-progress status but that never gets sent to my call status change endpoint.
I cannot execute the code I need to execute after the call starts, inside the incoming call webhook since the call status there is still ringing.
What am I missing here?

How to get the status of a Twilio Notification using the sid?

I am using the Notifications APIs (Twilio Java SDK version 7.24.2). I've successfully sent the SMSes using the Notification API like:
private String sendMessageThroughNotificationService(String message, PhoneNumber receiverPhoneNumber){
Notification notification = Notification.creator(twilioNotificationSID)
.setBody(message)
.setToBinding(Promoter.listOfOne("{\"binding_type\":\"sms\", \"address\":\""+receiverPhoneNumber.toString()+"\"}"))
.create();
return notification.getSid();
}
Now, what should I do if I want to get the Notification's status through the SID of the notification that I am returning from the above method?
Does Twilio's Java Notification's API provide any way to find the Notification's status through its SID (if I don't want to use the register callback URL approach)?
Twilio developer evangelist here.
If you are only sending one notification at a time via SMS, then I recommend you just use the Messages API. That way the API will return the Message SID, which you can then use to look up the Message with the API and check its status.
There is no way to look up all the messages sent via Notify in order to check their statuses. The recommended method there is to register a StatusCallbackUrl to get updates on each status.
Let me know if that helps at all.

Receiving notifications from Slack Direct messages

I'm building a simple slack bot and can currently send private messages as well as checking for the last 10 messages received within this one-to-one channel.
Is there a way of getting a POST notification to my webservice whenever the user replies, instead of having to poll and continuously check messages on that one-to-one channel?
Now you can make use of Slack events to receive notifications.
In the give use-case, 'Message' event can be used to capture message received and process accordingly.
https://api.slack.com/events/message
Bots generally work by connecting to the real-time messaging API, a WebSocket-based API that sends you events as they happen. Specifically, you should see a message event sent to you every time a message visible to your bot is sent.
To answer your question, there's no way to get an HTTP POST sent to you instead; you'll need to connect to the RTM API and listen for events that way.

Resources