Twilio in-progress status callback for an incoming call - twilio

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?

Related

Retrieve twilio voice logs via webhook

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.

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.

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.

Add delay in Twilio statuscallback

Is there any method through which I could add a time delay to get SMS StatusCallBack URL response from Twilio?
OR
Is there any other way through which I can let Twilio know that my service to process you callBack response is unavailable now?
Example: if I sent an SMS through Twilio with a StatusCallBack, I would be able to get after 1 minute of time delay in response.
Twilio developer evangelist here.
There is no way to delay the SMS statusCallBack. If you are unable to deal with a statusCallBack when it is sent, you could poll the API to check the current status of an SMS message.
Can I ask why you wouldn't make your service available to receive callbacks at any time?

Resources