Sinch - use Rented Long Number for Outbound - sinch

I recently rented a Long number from Sinch. Is is possible to use it to send outbound SMS
Thanks

Yes it is, Set the from parameter in the request.
{
from:'number',
message:'my message'
}

Related

Perform action on seen/unseen messages with socket.io

What is the best practice to handle seen/unseen messages in a chat room application based on Nodejs/SocketIO/React.
Consider User1 sends a message to a room. If another user has seen that message, notify all users that the state of message has been seen.
In my opinion using message brokers can be the better solution instead socket. I actually think that socket should only handle chat messages that are synchronously. but for seen/unseen status I prefer message brokers that are asynchronous. Are there any solutions or best practice in large scale applications?
It's unclear what you have currently tried, meaning that I can only advise solutions in order to achieve your aim.
To firstly identify that a message was seen, IntersectionObserver is an inbuilt API that detects when an element has entered the viewport, meaning that it is visible, therefore; obviously seen. I have added comments in the code below where you should add a function to call to the server that the message was seen, however, that's up to you to implement.
const observer = new window.IntersectionObserver(([entry]) => {
if (entry.isIntersecting) {
// Send a message to the server that the user has viewed the message.
// Eg. socket.emit('read-message', message.id)
return
}
}, {
root: null,
threshold: 0.1,
})
observer.observe(document.getElementById(message.id));
Additionally, there's no need to use message broker, as socket.io can handle simple interactions such as this.
You then need to send a message to the server that denotes the specified message ID was seen, then broadcast to every other client that the state was changed, and update it to read - if that's needed.

Plivo Bulk SMS destination limits?

I'm testing Plivo for sending bulk SMS. I'm using the .NET REST API to send the messages.
Plivo's documentation for bulk SMS indicates that you can just concatenate numbers with a delimiter. This works fine. Does anyone know how many numbers can be included or can you tell me how many you have successfully sent in one API request?
var plivo = new RestAPI("xxxxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
var sendData = new Dictionary<string, string>
{
{ "src", "0000000000" },
{ "dst", "00000000000<00000000000<00000000000<00000000000<00000000000<HOW MANY MORE???" },
{ "text", "test sms from plivo" }
};
IRestResponse<MessageResponse> resp = plivo.send_message(sendData);
I couldn't find this information.
According to Plivo support:
"There is no limit to the number of destination numbers you can add in the "dst"parameter of the outbound message API.
However, the outgoing rate limit is 5 messages per second per account."
Regardless of this response, I'm sure there is still some theoretical limit. Based off the other information I've gathered, it's better to split the API calls up anyway using multiple Plivo number (sender id's). If you have a suitable number of long codes, you shouldn't have to worry about this limit.
Related information:
Long code SMS restrictions
How do I send 6000+ messages using a long code?
In other words, use multiple long codes and split up your destination numbers accordingly to send out in parallel.
Edit* Received another response that seems more accurate
"You can add upto 250 numbers per API request. That should be the ideal limit on the destination parameter."
For anyone wondering what the actual bulk-messaging limit is nowadays (2021), it is 1,000 numbers per API call.
Thankfully this is now clearly stated on Plivo's API Docs page in the Bulk Messaging section:
The Message API supports up to 1,000 unique destination numbers.

sendReliable message sometimes not received by opposite peer

I've created a real time game for Google Play Game Services. It's in the later alpha stages right now. I have a question about sendReliableMessage. I've noticed certain cases where the other peer doesn't receive the message. I am aware that there is a callback onRealTimeMessageSent and I have some code in my MainActivity:
#Override
public void onRealTimeMessageSent(int i, int i2, String s) {
if(i== GamesStatusCodes.STATUS_OK)
{
}
else
{
lastMessageStatus=i;
sendToast("lastMessageStatus:"+Integer.toString(lastMessageStatus));
}
}
My games render loop is checking every iteration the value of lastMessageStatus and if there was something other than STATUS_OK I'm painting a T-Rex right now.
My question is is checking the sent status really enough? I also could create source code where the sender has to wait for an Acknowledged message. Each message would be stamped with a UUID and if ack is not received within a timeout then the sender would send the message again? Is an ACK based system necessary to create a persistent connection?
I've noticed certain cases where there is some lag before the opposite peer received the reliable message and I was wondering is there a timeout on the sendReliable message? Google Play Services documentation doesn't seem to indicate in the documentation that there is a timeout at all.
Thank you
Reliable messages are just that, reliable. There are not a lot of use cases for the onRealTimeMessageSent callback for reliable messages because, as you said, it does not guarantee that the recipient has processed the message yet. Only that it was sent.
It may seem annoying, but an ACK-based system is the best way to know for sure that your user has received the message. A UUID is one good way to do this. I have done this myself and found it to work great (although now you have round-trip latency).
As far as timeout, that is not implemented in the RealTime Messaging API. I have personally found round trip latency (send message, receive ACK in callback) to be about 200ms, and I have never found a way to make a message fail to deliver eventually even when purposefully using bad network conditions.

+CMS ERROR 41 on Telit Modem

I am a developer, working on "Telit" GE865-Quad using AT commands.
I am planning an application, witch sends SMS when certain condition occurs. When the application does not send SMS the modem is shut-down (Therefore every time I want to send SMS I have to turn on the modem). This application sends 3 SMS to different numbers one after the other.
The application is working just fine. The problem apear after a while (after sending certain amount of SMS), when I give the command to send SMS I get "+CMS ERROR 41" ("Temporary failure"). Once this message appear, every time I try to send SMS I get the same ERROR - It is like the SIM card is stuck. The only way I have found to get rid of this error is to enter the SIM card to my privet phone and send SMS.
I have spoken to "Telit" representative and he could not give a satisfying answer other then adding more delay between messages.
This is some of the relevant code :
(Turning on sequence) // From "Telit" GE865-Quad DataSheet
> #QSS: 3 //Before I start working with the modem i wait for this response with means the SIM is ready to use and the registration is to cellular network is complete*/
AT+CMGF=1 // Text Mode
OK
AT+CMGS=+xxxxxxxxxxxx // My number.
"This is the message i want to send" //Preparing the desired message require some coding But I think this is irrelevant to the subject.
//Delay for 3 secs//
And again : AT+CMGS=+xxxxxxxxxxxx // My number.
"This is the message I want to send"
//Delay for 3 secs//
(The same thing one more time)
The questions are:
Why does it happen, what am I doing wrong??
How can I unblock the SIM? What does the phone do so I can keep sending SMS?
The purpose is the keep sending SMS automatically.
This is the first time I publish a message in this website so if something is unclear please let me know. :)
Thanks for all the helpers.
Itay.
today i encountered this +CMS ERROR: 41 error, many times.
There was about 40 unread messages in the receiving modem.
After i deleted all received messages error disappeared.
I think may be operator is protecting customers from spam.
Dmitri
It is due Either SMS service on your SIM is not available or your SMS subscription is expired.

EWS Pull Notification problem with unread mails arrived between polling intervals

EWS Pull notifications are great in fetching new mails arriving while polling for the notifications, however if I increase the intervals between polling requests, the mails arriving between each requests do not get picked up.
Am I doing something wrong, or missing something trivial?
String subscriptionID = null
do {
PullSubscription subscription = service.subscribeToPullNotifications (...subscriptionID ...)
subscriptionID = subscription.getWaterMark();
...
} while(true);
Retaining previous watermark solvEd it

Resources