Voicemail: How can an agent setup a pre-recorded voice message to redirect their call to someone else during their absence or PTO? - twilio

consider that an agent wants to go on pto and wants to leave a pre-recorded message for incoming caller. They want to leave a message stating dates of their absence and the possible next number to call back.
I couldn't find any possible document or information around this.

Related

Apple messages auto-call

have an interesting problem I need to solve, I was hoping if anyone could give me some sort of an idea.
For example, if I get a text from someone saying (string) “URGENT” on my iPhone, I want to call them immediately.
So say I get a message, it could be any message but if their message says “urgent”, I need to call them ASAP, even when my phone is turned off.
Is there a way to do this, using API or anything?? I have no idea!!
Example say I get a messages saying:
Number 042XXXXX sends me a text:
"Hi Name, I have some urgent work for you"
Number 1300 XXX XXX sends me a text:
"Urgent help needed"
Both of these messages would be read by iPhone and their respective numbers would be dialled urgently.
Is there such a way to do this/automate this??
Any advice would be appreciated!!
I have no idea what to do, I am blank!!
I think the problem you have needs an indirect solution because, as Paulw11 points out, Apple don't allow you to inspect the message directly.
It would be possible to make use of Twilio's Programmable SMS API to setup a special phone number that customers could send text messages to. Then you use the APIs of Twilio to read the messages and then send an Apple Push Notification message for those the had "urgent" in the message.
You could then write an iOS app which receives push notification messages and takes the actions you desire. For example, it could present a screen which could automatically dial the number in question.

Twitter message reply with direct message link not carrying over conversation context

I have a Dialogflow and Twitter integration and all seems to be working fine, except for one scenario.
I have an intent that is looking for negative statements from tweets that mention the Twitter user linked to the Dialogflow integration (lets call it #Target). The purpose of this is to then reply back with a Twitter direct message (DM) link, inviting the person to engage in conversation to further explore their problem.
The scenario steps that do not work are:
Send Tweet to #Target saying for example "Your service is really bad". At this point, the output context is "negative-sentiment" if DF recognises it.
If that is the case, DF then sends back a response with a link that will allow the user to open up a DM session to further explain their issue. In this example they may have a gas supply issue.
The user opens the link in the tweet reply to start the DM.
At this point, I am looking for an explanation of the issue, for example "My gas supply has been cut off". However, if I do that, it does not recognise the intent. I have to at this point re-enter the phrase "Your service is really bad" to get it to register the "negative-sentiment" context, then I can move on.
What does work, is if I start with a DM stating "Your service is really bad", followed by "My gas supply has been cut off". It's almost as if clicking on the reply to tweet either forgets the context or its actually a different DF session that is created once we fall into the DM.
So, has anyone seen this behaviour before? Thank you in advance for your replies.
When you attempt to switch from #mentions to DMs on Twitter keep in mind the sessions don't carry over (they are separate sessions) so what you'll need to do going forward is keep track of usernames on the backend in order to connect the two distinct sessions.

Twilio Messaging - Correlating SID

We use twilio for sending message.
We are not sure how to correlate the response with the message we send. We might send multiple messages to the same Mobile. But, not sure how to correlate response with the messages we sent as the SID's are different.
Is there anyway to relate the response with the message.
Thanks
No, SMS doesn't work like that.
I you send me 5 text messages from your cellphone and then I reply to one you have no way of telling which one I'm replying to.
It's not a Twilio limitation, the SMS standard has no provision to track replies to individual messages
As an afterthought I came up with a hacky solution to this. It's a bit involved so I guess it depends how much you want the functionality.
This works for me using Chrome beta on Android 7.0, YMMV.
Create a php script with the following code and put it on your webserver:
<?php
// increase last digit as necessary to suit string length of your variable
$smsid = substr($_SERVER["QUERY_STRING"],0,1);
// Query database for SMS id, record timestamp of request, optionally return text to be included at the beginning of the SMS reply
$msg= urlencode($databaseResult);
// Remove <?body=$msg> if you just want the link to create a blank reply. Change the phone number to your incoming Twilio number.
header( "Location: sms:+1555444333?body=$msg" )
Now sign up for a URL shortening service which passes URL parameters and create a shortened URL which points to your php script. I used tr.im.
Depending upon your volume of SMS you will have to adjust the length of your variable, but unless you spam people to death I'm going to assume a single character will be enough to identify a unique text.
Using the example tr.im/SMS as your shortened url, you append a variable to the end like so tr.im/SMS?A and put the link in your outgoing SMS. When the user clicks the link your server redirect will open the SMS app on their phone and create a text to your number. If you have included the "?body=$msg" in your php above the new message will have your text at the start.
Personally I probably wouldn't bother adding text, they might delete it before they send it anyway and it's just likely to confuse people. If you log the request variables and timestamps to your database you should be able to tie them together with the phone number as most people will send you their reply within a couple of minutes of the server request. You can also increase the length of your custom URL variable if you struggle to correlate messages. Recycle variables once you have linked a reply etc...
Finally change your Twilio configuration so your outgoing SMS present the company name instead of your Twilio number as the sender. Users cannot directly reply to messages if the sender isn't a number, so they will have to use your link.
Generate a sequential identifier for each message and append it to your link. Save the identifier to your database along with the corresponding message Sid from Twilio and the number you sent it to so you can match them up later.
Append "Click tr.im/SMS?$ to reply" to outgoing SMS, where $ is your variable.
Profit.

Is it possible to send an SMS message from an iOS app to the current caller when a call is in progress?

I have searched and have not been able to find a definitive answer. I know that it is not possible to get the phone number of the current caller using Objective-C, but I don't need the number.
I want to send a text message to the current caller. Does iOS have a method to allow you to send a text message from an app to the current caller.
The scenario is this:
End user calls another user
They put the person they called on speaker phone and navigate to my app
The app has a button that allows them to share information via SMS to the person they are talking to while they are talking to them without having to do anything more than click a button (the user doesn't have to type the other person's phone number manually to send the SMS).
Sukhdeep is correct.iOS will never allow you to perform Messaging without user involvement.
The answer is No.
Apple will never allow you this.

Having a user click a link in a Slack Incoming Webhook Message and getting their response

I'm looking to have a user type something like
/makemeeting today # 4:00pm
this fires a outgoing webhook, which stores the info, then it fires a incoming webhook which would display a message in a channel saying meeting scheduled, and have two links
yes | no
Here's where I'm stuck. I can do everything up till this point. I'd love for any user to be able to click on one of those links and have it perform another outgoing webhook with the proper response.
I know I can just make those links point to a website, but I'd love to keep it all within slack without having to open a browser.
Is this possible? I swear I've seen yes|no, true|false replies before in other commands and bots, but I might be imagining that.
Any help would be appreciated...
thanks
This isn't supported yet but is on Slack's roadmap for the "near term".
https://trello.com/c/DVrJLbxX/12-interactive-messages
A work around is to add reactions to your message. When the user clicks the reaction (to bump up its count), an RTM event will be dispatched for you to handle: https://api.slack.com/events/reaction_added
An live example can be seen with the Meekan calendar app: https://meekan.com/slack/
So you could have two reactions: thumbs up and a thumbs down. And handle which reaction the user clicked.

Resources