I am trying to achieve 2 way messaging with a super sim. I have been able to successfully configure sms received on my virtual Twilio number to be delivered to my sim by Http post (with authentication).
I would like to find a way to send an SMS from the sim and receive the SMS at a specific phone number. I've tried several flows without any success. I was able to get this working on Make.com and retrieve the data structure of the webhook but I still cant get this working on Twilio.
Thank you for the reply.
The sim is in an iot device and I am able to achieve 2 way communication utilizing webhooks with make.com. What I would like to achieve is to utilize a virtual number with Twilio to be the associated number for the iot device.
I have successfully received incoming "SMS" messages (commands) to the iot device, using a studio flow. When an sms is received via my virtual number number on twilio, the studio flow fires an https Post with the appropriate payload, populated from the received webhook from the virtual number., in turn receiving the "SMS" on the iot device.
Now I would like to create a flow or something similar on Twilio, that would generate a Twilio webhook that would listen for SMS commands (replies) "sent from" my appropriate Super Sim.
On Make.com I am able to generate the webhook and analyze the data structure, successfully receiving the payload of the webhook, from my Sim Fleet. I would like to utilize only Twilio for the webhooks, if possible. Do you have any more suggestions? Thank you in advance.
The Twilio Super Sim is not intended for use in a phone and does not support voice or regular SMS.
The Super Sim does support sending and receiving command (machine to machine, M2M) messages over SMS which can be used to send instructions to the device or receive data from a device. In this case the sim card can send messages to the number 000 and those messages will be received by Twilio and turned into a webhook request.
There is some documentation for how to send command messages from the Super Sim from a Raspberry Pi 4 or Raspberry Pi Pico and an in depth article on AT Commands that you can use to control the Sim.
Related
I am working with the NB Alpha Kit from Signal 2018. The SIM is connected to the T-Mobile network (blue LED on):
AT+COPS?
+COPS: 0,0,"T-Mobile",9
OK
When I try to send a command from the SIM I get:
AT+CMGS="2936"
> HELLO
+CMGS: 7
OK
When I try to send from the API, the Command stays in a queued status and when I try to recieve it with the SIM, I get:
AT+CMGL
+CMGL: 0,"REC UNREAD","2936",,"19/09/10,00:14:10-20"
Free Msg: Unable to send message - Message Blocking is active.
OK
Any ideas on how to get messages flowing?
Twilio developer evangelist here.
The NB-IoT network is not intended for communications use and thus doesn't support SMS at this time. The message you sent from the SIM likely didn't go anywhere either.
However, we recognise that you should receive an error message when trying to send messages to a SIM that doesn't support it. We will look into making that an error in the API rather than queueing and never sending the message.
In Morocco we have 3 operators:
=> IAM, INWI and ORANGE
=> My personal phone number was originally purchased from IAM operator then i have transfered it to INWI (and this is the problem)
I am integrating Twilio in my software and have made some tests and observed this when sending a new sms to someone :
- If the phone number is normal (not transfered as in my case) the SMS is delivered correctly
- If the phone number is transfered from an operator to an other as in my case the SMS is not Delivered
Am i missing any config or something ?
I am testing with postman via post http call to Twilio REST API url :
https://api.twilio.com/2010-04-01/Accounts//Messages.json
i got this message while i am trying to send sms with twilio. i never blocked any number
In my case it happened for an Indian number. For Indian number it could be blocked by the end user -
Limitations sending SMS messages to Indian mobile devices
SMS messages entering into India are categorized as “Transactional” or “Promotional” and may result as an "Error - 30004".
By default, all SMS messages sent from Twilio phone numbers are categorized as “Promotional” and are subject to the following limitations:
They cannot be sent to any phone number in India’s Do Not Call Registry
If you’ve been having trouble sending SMS messages to an Indian number, see if that number is registered on the National Do Not Call Registry.
If the owner of the phone number wishes to start receiving SMS messages from Twilio, they can update the DNC settings by following the instructions on this website.
More details : https://support.twilio.com/hc/en-us/articles/223134167-Limitations-sending-SMS-messages-to-Indian-mobile-devices
Twilio developer evangelist here.
Error 30004 doesn't mean that you blocked a number, but that the number you are trying to send to has blocked messages from your number. They could have done so by texting "STOP," "CANCEL" or other particular words to your number.
If you don't believe that this has happened, then I recommend you get in touch with Twilio support with the number that is causing this error and they will look into it.
How to programmatically send an MMS in blackberry?
MMS API (4.6 and >)
There is a net.rim.blackberry.api.mms class which "Provides advanced utilities for interaction with the MMS messaging system.". But this gives only ability to "modify the message before it is sent or deny it from being sent completely" using addSendListener
Using MMS protocol in connection
from javax.microedition.io.Connector API:
mms
This protocol opens an MMS connection across the wireless network. The open request should be formatted as follows:
(MessageConnection) Connector.open("mms://[<peer_address >]:[<application_Id>]");
where:
< peer_address > is the phone number or the email address of recipient.
< application_Id > is used to identify a Java application.
For example, to send a mms message to specific application use
Connector.open("mms://+123456789:applicationID");
To open a server mode MessageConnection use
Connector.open("mms://:applicationID");
Also see Introduction of MMS in J2ME and sample code - How to send MMS? and Sending and Receiving MMS on J2ME devices
I have never tried this approach, so I can't tell if it's working.
Invoking Messages application
Other option is open Messages application programmatically, to compose MMS:
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES,
new MessageArguments(MessageArguments.ARG_NEW_MMS));
Also see Invoking MMS with attachment using application.
If I am writing a MIDlet, and if the device supports SMS push registration (i.e. supports WMA 1.1 spec), I will be able to send push messages to the application that is installed on the phone and is listening to SMS messages at the assigned port.
However, if I am writing a Blackberry application, can I still go ahead and use the procedure that applies to MIDP 2.0 devices. If so, can I specify static SMS push registration in JAD file, as we do for a MIDlet?
Would the appropriate JAD property be still specified as MIDlet-Push-1:{}?
Another question, that is not totally unrelated is- are there any bulk SMS providers that allow SMS bearers specify the destination ports that can be integrated with this kind of a solution?
Thanks
A regular blackberry application does not support the push registry. You'll have to keep a DatagramConnection open and listen for the incoming SMS messages that way.
DatagramConnection connection = (DatagramConnection)Connector.open("sms://:1234");
Datagram dgram = connection.newDatagram(connection.getMaximumLength());
connection.receive(dgram); // blocking call so this should be in a separate thread
String message = new String(dgram.getData());
where 1234 is the port you're listening on.
As to you're second question I'm not entirely sure, but I think mblox supports port directed SMS.
For the second question, if the bulk SMS service provider provides you with HTTP API which included the UDH field, you can send messages to application listening in that particular port