System Center Configuration manager Push Notification with read receipents - push-notification

We need to push Push Pop up notifications for ex: “urgent message to warn users” and also generate a report on the success rate as to how many users in the network received it and read it, how many users did not receive it or did not read it.
Microsoft has suggested to use SCCM Power Schell scripting to send Client notifications with close button to confirm receive.
Is there any other way of accomplishing it through SCCM without any customization?

Have you considered pushing a VBScript to all clients which displays the message? If the user clicks "OK" to say they've read and understood the message then it could exit with a return code of 0, otherwise it could return a 1. It's then trivial to report each computer's success result in SCCM.

Related

telegram use schedule message

I want to schedule a telegram bot message to be sent at a specific unixtime.
As from telegrams official api (https://core.telegram.org/api/scheduled-messages) that should be possible by setting the schedule_date flag.
To schedule a message, simply provide a future unixtime in the schedule_date flag of messages.sendMessage or messages.sendMedia.
However I was not able to set that flag. To be more precisely, I do not even know how to set a flag, or if I am using the correct api.
What I have tried is to use the api directly via the browser (could use curl as well) like so: https://api.telegram.org/botBOT:TOKEN/sendMessage?chat_id=ID&text=Test&schedule_date=1653503351
I also did not find any way to access this flag via https://pypi.org/project/pyTelegramBotAPI/#description https://telepot.readthedocs.io/en/latest/#send-a-message, nor https://github.com/nickoala/telepot.
I want to implement this feature in a python environment, but any working suggestion would be much appreciated.
EDIT:
I decided to save the intention to send a telegram bot message at a certain unixtime in a database. I then create an infinite loop that checks if there are any unsent messages before the current timestamp. If the loop detects such a message it sends the message and sets a flag, that that message has been sent.
And as promised, here is a fully dockerized example of that behaviour in action: https://github.com/Sokrates1989/nameTheCountDown-lightweight
It creates a bot that you can pass a name and the duration. Once the duration has passed it sends a message with the passed name. Basically a simple countdown that you can give several names, that run simltaniously. As it is a telegram chat, you can modify the way you are informed about the end of a countdown by modifying the notificaiton of that chat.
And here is the Bot in action: http://t.me/NameTheCountdownBot
We can't do this by bot API itself, and there's no schedule_date parameter in sendMessage method:
https://core.telegram.org/bots/api#sendmessage
And what you've read is for Telegram clients, not bot API consumers.
If you don't really need unixtime, you can simply create a table for scheduled messages with a text, chat_id and a publish_time column (like 22:15), and run a command every minute to look if there's a message for current time to send. Then send the message and delete the record.
Note that the python-telegram-bot library has a built-in solution for scheduling tasks: The JobQueue. This feature is based on the APScheduler library, which you can ofc also use without python-telegram-bot.
Disclaimer: I'm currently the maintainer of python-telegram-bot.
https://core.telegram.org/method/messages.sendScheduledMessages
Now you can send scheduled messages right away

How do you "restart" receiving Firebase Alerts on short code 44398

I often use Firebase phone auth in my applications. I have one user who religiously sends "STOP" to all text messages. Big oops. Now she can not login to any application using the system...
Short code phone # = 44398
If the user types "STOP" to that short code, the system responds with:
Firebase: You are opted out and will receive no further messages. For
HELP, reply HELP. Msg & Data rates may apply
Type "HELP", the response is:
Firebase: For more info: https://firebase.google.com/support/ -
Msg&Data rates may apply.
My question. How do you "RESTART" the service? The Firebase support page offers no help here.
I've tried "GO", "RESTART", "UNSTOP". All of those fail.
Here's a posting on how Twilio addresses the topic. Twilio uses START, YES and UNSTOP to restart a service (on long code source). Each of those fail here.
Twilio also provides a link to standards for short code expressions., but I'm not seeing anything on restarting a service.
Here is a screen shot (of my phone):

How to send a text from the user's cell phone number using Twilio?

I want to programatically send SMS / text messages from my Meteor app; many people recommend twilio for this, and there are several Meteor Twilio packages (findable via atmosphere and/or googling/binging). I don't know if one of these packages is decidedly better than the other, but for now, at least, I'm using the abhiaayer:meteor-twilio package.
My concern is that, when you create a Twilio account, they assign you a "from" phone number (you can't, apparently, just use your own). Maybe I'm misunderstanding how this works, but before I go too far down this path, I want to know if the sender of the SMS -- IOW the user of my app -- will be able to use their phone number as the "from"/sender phone number.
After all, the whole point of my app is to allow the user to send out multiple identical texts (such as "where are you?" or "are you okay?") to friends/family, and then get a response back from them (to his phone, not to a Twilio-supplied number).
If it's possible to use Twilio with your own phone number as the "from"/sending number, has anyone got suggestions on Meteor package preferences (abhiaayer, andreioprisan, DispatchMe) and how that can be accomplished from Meteor?
I imagine the basic code would be pretty much the same, regardless of package used; e.g., here's an example from the andreioprisan package
twilio = Twilio(ACCOUNT_SID, AUTH_TOKEN);
twilio.sendSms({
to:'+16515556677', // Any number Twilio can deliver to
from: '+14506667788', // A number you bought from Twilio and can use for outbound communication
body: 'word to your mother.' // body of the SMS message
}, function(err, responseData) { //this function is executed when a response is received from Twilio
if (!err) { // "err" is an error received during the request, if any
// "responseData" is a JavaScript object containing data received from Twilio.
// A sample response from sending an SMS message is here (click "JSON" to see how the data appears in JavaScript):
// http://www.twilio.com/docs/api/rest/sending-sms#example-1
console.log(responseData.from); // outputs "+14506667788"
console.log(responseData.body); // outputs "word to your mother."
}
});
I did create a Twilio account, and have the "from" number (not my actual cell phone number) they assigned my account, and the SID, but I don't kow what the AUTH_TOKEN should be.
If what I intend is not possible from Twilio, what I may do is just write the app so that all the selected "to" numbers can be copied to the clipboard, so that the user can paste them into his SMS screen's "recipients" textbox; but I was hoping to afford the user the luxury of simply tapping a button.
I don't think you can do this (send from the user's own cell number using Twilio). If your app is an actual mobile app as opposed to a web app you can use the Android or iOS APIs for sending SMS from the user's phone. I'm not sure of the details of this and certainly with iOS it looks like you can't do so fully automatically for obvious reasons (you could just spam all the user's contacts for instance, and this would incur a monetary cost to the user).
There's a Cordova plugin here which can do what you want: https://github.com/cordova-sms/cordova-sms-plugin (I haven't used it so can't vouch for it but it seems to be actively maintained).
If it is a web app, your suggesting of copying the numbers to clipboard is by far the most straightforward solution and I would recommend that in the first instance. For completeness I've included some details and considerations below of how you can do 2-way communication with Twilio (or alternatives such as Nexmo) in a couple of ways, in case someone finds it helpful. It's not exactly trivial though. 1-way communication is a lot easier!
Send via API
From your app the user types a message and selects who to send it to. You app then connects to your server which uses the Twilio API to send N messages to the N recipients. These messages will appear to come from the Twilio-provided number.
Send via SMS
The user manually sends an SMS to your Twilio number and then you receive a webhook to your server from Twilio with the message details. You have to do the processing to work out who to forward the message to and then use the Twilio API to do so. Again the recipients will see a message from the Twilio-provided number.
Replies
When a recipient replies to the message, Twilio sends you a webhook with the details and you can determine who sent the original message and forward the reply back to the original sender.
Number Pooling
One of the obvious flaws here is that if multiple users send a message to the same person then there's no way of telling which message they are replying to. There's no message IDs passed with SMS so you have to use multiple sending numbers (one per unique sender to a particular recipient). The amount of numbers required is basically the most number of different senders one user would have to reply to (this is not generally possible to work out beforehand, so you would have to call the API to provision a new number on the fly).
To give a more concrete example say you have 2 users (S1 & S2) and 3 recipients (R1, R2 & R3). You have 1 Twilio-provided number (N1).
S1 sends a message to R1 via your app, you use N1 to send the message via the Twilio API. R1 receives the message from N1. If they reply, you receive a message to N1 from R1 so you know you need to forward it to S1.
S1 sends a message to R2 via your app, R2 has not yet received any messages so you can reuse N1 to send the message. R2 replies to N1 and again you can forward it to S1. If this is delivered in-app, no further problems, if the reply is forwarded via SMS then we'd need to provision a new number (N2) to enable S1 to reply to R2's reply.
S2 sends a message to R3 via your app, as before you can reuse N1 and still route the reply correctly.
Now if S2 sends a message to R1, we realise that R1 has already received messages from S1 using number N1. In this case we can't use N1 because we cannot identify who the reply was intended for. If we haven't already, we need to provision a new number (N2) and now we can send the message so R1. When R1 replies to N2 we know the reply needs to be forwarded to S2.
The more users sending to one recipient, the bigger (and more expensive) your number pool gets. It's probably worth implementing some kind of timeout (say 72 hours) in which the recipient can reply. So in this case if the timeout had expired after S1 sent the message to R1 via N1, we could reuse N1 for the communication between S2 and R1. Obviously this isn't entirely foolproof but it could reduce costs.
Identity
The other issue with sending from a pooled number. I send a message to Dan via an app, and he receives that message from a random number:
Hi Dan, how are you?
How does Dan know who sent the message? You'd have to add some identifier to every message (or at least the first in each conversation thread).

Unable to Receive Pushes in client application after Registration in BB10 Webworks

My question is similar to BlackBerry push client application subscription but still i have doubts in that ..plz clarify.My doubt is When i tried with sample Push Initiator which comes with Push SDK and Sample Push-enabled application[Push Capture] from github i can Receive Pushes in that sample application.But when i try the same logic in My own client application i am not receiving Pushes..
Steps I followed:
Registered with Push service and got Confirmation mail with AppID,Password and PPG url.
With those details i set to receive Pushes like:Called the create function and createChannel,success callback was called and it returned device token also.
But still i am not receiving Pushes in my application.Plz help where i am lagging.
Question:
How Pushes differentiate the client app and devices while sending Pushes.
NOTE:i used the same AppID which i used for sample app.
when i called create function and createChannel,success callback was called and it returned device token also. When i received Push,onInvoke event was called and action was bb.action.PUSH which denotes we received a Push..Since i didnot add Notifications to Hub i didnot recognize previously.
Also we cannot use same AppID for different applications.It will create problem

How to know if an user is offline already by the time I send him/her a message?

I am building a chat based on Comet technology and I am stuck with this problem. So, for comet, i am using ningx with it's push module. Everything works fine. I can send messages to another user via dedicated channels. However, the problem appeared when I started thinking what will happen to the message which was sent to a user who went offline before receiving that message.
I'd like before pushing the message into a channel to check if the receiver is still listening that channel. If so, I will just push the message otherwise I want just put the message into the database so that the user could read it when he/she is online.
QUESTION:
Can I check somehow if a specific channel currently has at least one subscriber (for nginx push module)? if it's impossible then how to know for sure that the user to who the message is sent is online? (last activity is not going to help, cuz it's impossible to be sure that the user did not go offline one second before he/she was supposed to receive the message)
Thanks!
I've answered on my own question. Here's the code I use to publish a message and how I get an useful information back after publishing it.
$channel_id = 'c'.$_POST['uid'];
$message['sender']=$_SESSION['user.ID'];
$message['firstname']=$_SESSION['user.firstname'];
$message['message']=$_POST['msg'];
$message['type']='chat';
$c = curl_init('http://192.168.56.101/publish?cid='.$channel_id);
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
curl_setopt($c, CURLOPT_POST, true);
curl_setopt($c, CURLOPT_POSTFIELDS, 'pre('.json_encode($message).')');
$r = curl_exec($c);
in this example var $r contains this: queued messages: 0 last requested: 4 sec. ago (-1=never) active subscribers: 1
as u can see, it also contains a number of subscribers

Resources