Rupesh Bhandari
Rupesh Bhandari

Reputation: 86

how sms are sent from twilio?

I took Twilio just for an example, there are many companies which provides this kinda facility (sms API). Twilio supports sending sms in almost every country. I wanna know how do they do it at the core level, do they have any special access to the carriers protocol? For example: if I hit this url https://twilio.com/sms_api?number=xxxxx&text=hello (just for an example) it sends "hello" to the provided number(xxxxx). But how's this happening? do they have any special API provided by different carriers ?

Upvotes: 0

Views: 656

Answers (2)

Megan Speir
Megan Speir

Reputation: 3811

man8 has got it with SMPP. But you can read a slightly more in depth explanation from our messaging lead, Ben Stein.

Particularly, the following section:

How does a text message get from one phone to another phone?

The protocol for SMS is called SMPP. Not to be confused with SMTP, which is the mail protocol. SMPP is a store and forward protocol. The way it will typically work is you have a client, the ESME (External Short Messaging Entity), which is going to connect up to the server which is the SMSC (Short Message Service Center). A persistent connection is made between those two endpoints. Text messages and other control commands flow bidirectionally: messages coming in, messages going out, and something called delivery receipts, which tell you the status of a message.

It’s not necessarily an inelegant protocol, and it technically is extensible, but you’re limited by adoption. In order to have this lowest common denominator communication all around the world, you need to use the features which are supported by all the servers and all of the handsets.

Generally, you’re limited in the protocol. For example, you want to stick to 160 characters. There are neat features like concatenation, where you can make messages much, much longer by concatenating them together. However, that’s not supported by every handset by every carrier. Especially when you look globally, support really varies. If you want to keep that consistent user experience, you want to stay lowest common denominator.

Upvotes: 1

man8
man8

Reputation: 11

Typically, providers such as Twilio would have wholesale agreements with a mixture of partner SMS aggregators and mobile networks, mostly using SMPP and in some cases perhaps SS7.

Since Twilio seems to offer voice service also, I think they're likely to have SS7 in the mix also, as SMPP isn't used for voice switching, but it's a convenient way to exchange high volumes of SMS traffic with mobile networks and SMS aggregators.

Upvotes: 1

Related Questions