Retrieval of the originating address (sender's number) by SMSC - sms

I'm trying to implement SMS transmission between two GSM devices. I've searched and read standards and articles a lot but couldn't find the answer to the following question. Does anyone know how does SMSC get aware of the sender's number and insert it in the TP-OA field of the SMS-Deliver packet stack?

Actually I'm not sure that either this is what you need or this would help you but anyways..
In GSM network there are a lot of nodes and each does certain things for which it is responsible. They communicate to each other with messages, that contain certain information needed for processing of required operation: establishing a call, sending SMS, doing Update Location etc.
So the information about sender's number comes to SMSC from another node called VLR/MSC together with a message saying to it "Yo, one guy wants to send SMS to another guy. So here is this message and information about these guys. Please, forward it".
Here is scenario of user A sending SMS to user B:
User A sends SMS to VLR/MSC together with information about its destination
VLR/MSC then invokes MAP message ForwardSM (Forward Short Message) to send received data further through the network to a node called SMS IMSC
SMS IMSC is a node that plays a role of interface between network and SMSC
SMS IMSC on receipt of ForwardSM message sends TPDU (Transfer Protocol Data Unit) message towards SMSC with the text of sent SMS and routing information
After this SMSC sends reply to user A with a result of receiving the SMS. If it's successful then SMSC starts routing this SMS through the network towards user B
So the message you are looking for is TPDU message from Point 3. Type of this message is SMS-SUBMIT according to TPDU types.
Edit:
Authentication is separate operation that takes place when subscriber starts his activity (eg turns on his phone) or roams to another area that is being served by another VLR/MSC. Anyway, VLR/MSC treats this user as new to this area. Skip this part if you know what is VLR/MSC:
HLR is a node that stores all the information about every subscriber in operator's network. So basically it's a database that has all the info about every single subscriber in the entire operator's network.
And network covers huge geographical area so it's divided is smaller areas called cells. VLR/MSC is a node similar to HLR (it also stores subscribers' data). But it is responsible for one certain cell, so it stores data of subscribers who currently operate in this certain cell. So when new subscriber comes to its area VLR/MSC downloads his data from HLR. And when subscriber leaves this area VLR/MSC removes his data.
And if some node would need to get subscriber's data, it won't "ask" HLR for it, but instead it will "ask" VLR/MSC in whose area the subscriber is currently active.
So when VLR/MSC sees a new subscriber coming to its area, before downloading his data from HLR it triggers authentication process to check if this user is valid and that someone else doesn't pretend to be this user:
VLR/MSC sends Send Authentication Info MAP message together with IMSI (mobile subscriber number which is uniquely identified by his SIM card) to HLR
HLR checks the given IMSI and validates subscriber. If subscriber exists and there is no troubles with him then HLR sends IMSI to AUC (Authentication Center)
On IMSI reception AUC generates a triplet (some encryption keys needed for subscriber identification) that contains SRES, RAND and Kc values and sends this data back to HLR
HLR forwards this data back to VLR/MSC which triggered authentication process
VLR/MSC after reception of SRES, RAND and Kc sends received RAND to mobile subscriber
After mobile subscriber receives the RAND he calculates SRES using given RAND and Ki (some value that is written in user's SIM card) and sends calculated SRES back to VLR/MSC
On the final step VLR/MSC compares SRES generated by AUC with SRES generated by user. And if they match then user is identified successfully, VLR/MSC fetches subscriber's data from HLR and authentication process is completed.
After VLR/MSC downloaded data from HLR every other node that would need data of this subscriber would fetch it from VLR/MSC not HLR. And after that authentication process won't start every time subscriber wants to do something (make a call, send SMS and so on).
So when user A sends SMS to user B the data about user A (his number for example) is stored in VLR/MSC already and it arrives to SMSC from VLR/MSC together with the SMS user A sent.

Related

How to implement SMS tracking in Twilio where multiple SMS been sent to the same number

We are implementing an SMS tracking feature for our app using Twilio where we will send an SMS to our customer and once they reply with Yes/No
we will take action accordingly. For normal case, where each customer has one single phone number we can easily track the replies and
take action. But if the customer use the same phone number for multiple accounts and we send multiple SMS to the same customer
(eventually in a same phone number) we are not able to track which specific SMS they have replied for.
Lets take an example,
User Tom has three accounts with us. Each of the three accounts uses the same phone number P.
Twilio SMS are tracked by a combination of From/To pair.
Assuming, we are using one Twilio proxy number as sending number which is S.
Case 1: Tom has one booking canceled for a short notice period. An SMS has been sent from S->P. When a reply is received, we can easily track the reply and take the action.
Case 2: Tom has two or more bookings canceled due to a short notice period.
For each canceled booking, an SMS has been sent from S->P. When the user replies, we are unable to detect which booking to mark the reply for.
It is not possible to know which message a person has responded to in SMS. The only way to efficiently handle this is to send messages from different numbers. So, if a user signs up with the same phone number as another user then you need to assign a new Twilio number to them. Then you can tell which user you are contacting or receiving messages from by the number.
If you send out messages about bookings on the same account at the same time, then you need to be even more granular with the number access. Each notification should assign a number to use and then when a reply comes to that number it was about that notification. Then if you need to send a second message simultaneously, you attach a different Twilio number to it. And so on for more messages.

emulate radio communication using channel or mutex

I need to emulate a radio communication network composed of N nodes, with these properties:
nodes either send then receive data, or receive then send data, but not at the same time.
data sent over-the-air are received by all nodes which are in receive mode at that time.
if two or more nodes sends data simultaneously, data are lost.
there is no time synchronization among nodes.
In Go, if I use a channel to emulate the transmission media, data are serialized, and only one receiver gets the data, not all of them.
Also, I cannot think of a way to "ruin" the data if two sender try to send at the same time. Whether I use a mutex or not, one of the sender will successfully get its message sent.
Why don't you create a publisher and subscriber module using Golang Channels.
Create a centralized queuing system where all your sender and receiver nodes register themself. If any node sends the data it will go to that module and from the sender's list, it picks the senders channel and starts writing on it. The same applies to receivers also.
You have to create one channel per node and register it to a central pub/sub module. This will definitely solve your problem.

How to send messages in veins?

I need to send a message only to one vehicle that i want to choose. I am reading the available TraCIDemo11p and the cars are broadcasting the message to all cars. How can change that and make it send the message to only one care for example to car number 3.Thank you
Keep in mind that communication between cars in Veins (or any MANET simulator) is wireless which means that many cars can hear the MAC frame that sent to a specific node.
To send a message from car A to another car B, they must be in their wireless range or they support an ad-hoc routing protocol to reach other not-in-range cars (which is not implemented in Veins, AFAIK).
If you are sure that both sending and receiving cars are in range, then you can fill the destination address in WSM by the ID of the intended car and let the WAVE application to delete any message that has a destination address different from the local ID.

Will concatenated sms be delivered always in the order sent out by a GSM handset?

As I know concatenated sms are split in GSM handset and delivered to network. Does GSM standard talk about order of these packets? Will it be always sent in order? That is first sequence packet first and next later?
My questions regarding this.
1. Does SMPP talk about order of long sms segments? Like is it possible for SP to get out of order messages?
2. Does GSM handset deliver long messages always in order or not?
"long sms" officially known as concatenated sms can and will turn up in any order. Therefore the receiving device / system must be able to cater for this. Concatenated sms come in the form of multiple sms. Encoded within is the part number and the total number of parts for the concatenated sms (you can search for information on the "UDH - User Data Header" to get more information).
So answering your questions:
1) There is no ordering in the sending / receiving of concatenated sms. Only information within each concatenated sms part which says which part it is and how big the complete concatenated sms is.
2) GSM handsets tend to send out in order. The order is lost usually during the store and forward process on the SMSC side. On a side note GSM handsets when receiving a concatenated sms build the sms once all parts are received.

How do some SMS messages transmit the senders name?

I have noticed that certain SMS messages that I receive from companies come with a 'sender name'. eg. Just today I received an SMS from a number I have never used before (not im my contacts), however the senders name showed up as 'Adobe'. I get this from other companies too. eg Facebook, Google & Banking.
Is it similar to how a email server works? (you tell the server who you 'are' before you send the message) Is this the case with a carrier's cell tower?
I guess I'm wondering what the service is called and how it works? (ie. can you send 'header info' with SMS messages or is the cell tower just spoofing the message's 'sender number' and replacing it with characters?)
(hopefully this is the right place to ask this question...)
The MAP protocol (the one used for sending SMS messages among others) allow specifying either a phone number or an alphanumeric number as the sender.
AFAIK this cannot be set from your phone where the sender number will be always your public phone number but SMS Centers can allow sending such messages on other interfaces like the ones used by banks and the companies mentioned by you (usually using the SMPP or UCP protocoll).
Please note that some Telcos do not allow this kind of sender address in messages originated elsewhere but sent to their customers (or they don't allow it for everybody). They use SMS spam filters/firewalls called Home Routers for this.
Mobile communication in GSM, UMTS and LTE is governed by 3GPP.
The TP-OA field in SMS-DELIVER TPDU in an incoming SMS typically contains the number of a sender.
The network fills the TP-OA field with usually an MSISDN.
Please see 3GPP TS 23.040 Figure C.10.
But in case of a company name, TP-OA can be made alphanumeric using the Type of Number Information Element as 7-bit default alphabet
I suggest you to read 3GPP TS 24.011 and 23.040 to get an idea of how SMSes work.
However, I must point out that since a sender does not send TP-OA, it can't be easily spoofed.

Resources