Is it possible to send a b c d ... characters over USSD protocol - ussd

As far as I know we can send numbers and some characters like * and # over USSD but I want to send other characters and words like "Test". Is it possible?

A USSD message can contain upto 182 alphanumeric characters.
This includes letters, and you can test this out by simply checking your balance or services on your mobile. Almost all the USSD responses sent by the carrier contain letters.

The answer is yes/no. USSD supports all kinds of characters, you can not only send a,b,c,d but also in other languages but it is generally limited to the responses by the users and messages from your service operator. However, While dialing a short code(eg *123*12#) you cannot include these characters(a,b,c..), because generally the operators just uses the numbers to define their services as per the standards and hence does not allow use of other characters.

Programmatically, you can. In GSM modules with AT command interface you do so with the AT+CUSD command and get answers with the +CUSD unsolicited result code. Android phones seem to lack an API for that, but workaround code seems possible.

Related

How do sites like Vonage or PhoneValidator determine whether a phone number is mobile or a landline?

Sorry if this isn't the proper channel for this question; it's hard to tell where else to put it.
Primary Question
Given a phone number (in my case: US or +1), I want to know whether that phone number is designated for use with mobile or landline phones (exclusive or). (Optionally: can I determine whether they were ported?)
I know that the ability to port numbers implies that no data on this is 100% accurate. I'm only looking to be about as accurate as existing services like Vonage's Number Insight API, or PhoneValidator.com, without giving them my customer's phone numbers directly. I'd preferably like to know how they acquire their information so I can replicate it.
I do know that NANPA publishes Central Office Code Assignment Records, which is enough to get me the company who 'owns' a block of numbers, but that doesn't necessarily tell me whether they're mobile or landline blocks.
Reading the TYPE from Google's libphonenumber gives the rather unhelpful FIXED_LINE_OR_MOBILE response, whereas I'm looking for which device type specifically.
Secondary question:
Given that NANPA hands out phone numbers in blocks of 1000, am I safe to presume that a random number within that block is representative of the whole block? In other words: does 222-222-2000 being a mobile number imply that 2000 through 2999 is?
Thank you!

Does a Twilio Messaging Service prevent "snowshoe messaging" when sending a bulk text?

I've been reading up on the Twilio documentation regarding text queue limits for long code numbers (14,400 segments max for 1 MPS). The docs suggest adding more numbers to a Messaging Service to load balance many requests. However, I also read in the docs that texts can be filtered by carriers if their systems detect "snowshoe" messaging - meaning that the same text is being sent from multiple numbers.
So if I have 2 US local numbers in my Messaging Service, will Twilio help prevent snowshoe-ing somehow since it suggests adding more numbers to load balance? I can't seem to find a definitive answer.
Thanks for any help!
Twilio developer evangelist here.
While adding numbers to a messaging service can increase your throughput it is not recommended when sending the same message out to numbers in the US and Canada. If you are looking for higher throughput it is better to consider toll-free numbers or short codes. You can read more about choosing toll-free or short code numbers here. For even more certainty sending mass messages, you should investigate whether registering for A2P 10DLC could work for you and bring you higher throughput and better deliverability instead.

Twilio calls keep failing-- I think i've been filtered/blacklisted by carrier. What is limit or best practice around this

TL;DR Twilio calls keep failing-- I think i've been filtered/blacklisted by carrier. What is limit I'm hitting up against and/or best practice around this.
Further description
I'm trying to automate leaving voicemail in an outbound sales effort.
After a handful of calls, any further calls for a given number return 'Failed', with description 'Invalid Phone Number' 13224.
I'm assuming I'm being throttled by the carriers for suspicious/annoying robo-dialing.
Are there rules of thumb for avoiding this blacklisting?
Twilio developer evangelist here.
Error 13224 does suggest you have invalid numbers rather than are being blocked. The full message is:
Dial: Twilio does not support calling this number or the number is invalid
This error occurs when the provided number is not in E.164 format; for example using local dialing pattern 01234567890 instead of the full E.164 address +441234567890. This can also occur when calls are attempted to non-existent country codes, area codes, or exchanges. For example, there is no +693 country code, no +1238 US area code, and no 555 US exchange.
This can also occur with properly-formatted, valid destinations if none of Twilio’s carrier partners are able to deliver the call; for example a telecom network outage in the phone number’s local area.
Have you ensured the numbers you are dialling are in fact in full E.164 format?

Specifying multiple Twilio numbers when sending an SMS to spread load over all numbers

I am new to Twilio and was reading that the limit is 1 SMS per Second per Number.
If you have more phone numbers, then the overall sending rate increases.
My question is if we need to specify multiple numbers in the code in order to take advantage of the increased rate with having more numbers, or is this taken care of automatically by Twilio, even when I specify only one number in the code?
It is not clear if I manually have to Round Robin across all my numbers myself, or if Twilio does this for us.
I am using PHP to do this.
Twilio evangelist here.
You will have to write the code that round robins across all of the numbers in your account. This should be pretty straight-forward.
What I would do is put all of those numbers in an array (you can use the REST API to get the list of all of your Twilio phone numbers), and then in your message sending loop, just use a counter to keep track of your place in that array. Once that counter reaches the array size, just reset it to 0 to start over at the beginning of the array.
Hope that helps.
Over the years the answer to this question has changed. There is now a Twilio service called Copilot which enables all kinds of number intelligence. See the docs here for examples of how to use it. That docs page lists it as a "public beta" (though it also suggests sending API queries to the 2010 version of their API, so it seems a bit outdated).
Edit: Be sure to read the docs regarding the response, since the Copilot behavior is different than the standard message sending behavior:
There is a slight difference in API response when specifying the MessagingServiceSid parameter. When you only specify the From parameter, Twilio will validate the phone numbers synchronously and return either a queued status or an error. When specifying the MessagingServiceSid parameter, Twilio will first return an accepted status.

How to recognize fax numbers?

What should be the best way to recognize that a number is connected to a fax without actually sending faxes around ?
I suppose that a short phone call can be made: the goal is to determine if a number that is declared as a fax line is really a fax line, working and available.
If you can make a phone call, many faxes create a "Fax Identification tone".
This signal may be sent by the Terminating FAX machine anywhere between 1.8 to 2.5 seconds AFTER answering the call. The CED signal consists of a 2100 Hz tone that is from 2.6 to 4 seconds in duration. The CED tone is useful for disabling any echo cancellers on the line.
The CED also incorporates a "silent" interval following the 2100 Hz tone. This interval lasts from 55 to 95 (75 +/- 20) mS. Following this interval, the Terminating FAX machine will initiate the Pre-Message Identification procedures by transmitting a 300 BPS "Line Turn-around" preamble.
Some older faxes do not support that though, no idea how they can be triggered (i.e. by you sending a tone first, but that could be really annoying if you have a phone instead of a fax number)
I understand your question as that you have a list of fax-numbers in your customer database and want to verify that those numbers still are valid.
Then you could use TAPI to programatically call those numbers and check if its a fax that answering, no need to actually send any fax, just connect and ask the device (fax) what capabilities it has.
Here are Microsofts information about their TAPI
An easier way could be to have a fax modem on the com-port and using ATI-commands to call the device and send ATX3D and see if the device answers with ATA. (Or something similar, it was ages ago I programmed modems..)
It's essentially impossible.
They make line-sharing switch devices. For example, visit http://www.faxswitch.com/ to see their offerings.
The line appears like a voice line until you send a fax recognition tone. Then the line switches to a fax machine, if one exists.
So, a single number can be voice and fax.
A quick and dirty way of testing if a number is a fax number would be to google (using some API) for "Fax [number]".
e.g.
http://www.google.co.uk/search?q="Fax+01422+329262"
Not in New Zealand at least.
Here, Fax-Numbers do not differ from normal numbers in terms of namespacing.
A fax number may be only 1 digit ( the rightmost ) different from their normal line, or even a company may not have distinct FAX/Phone lines, and they just share a line and use tone detection to initiate fax protocol instead.
Also, you don't need to register with anybody to have fax services work on your phone line, so there's no index you can look up to see if its a fax or not. The only way to know is initiate a call, and see if you get a fax response, and even then, if the Fax happens to be turned off, you'll get a false negative.
I think your question may turn out to result in hunting for phantoms.
Oh, and for additional fun, you may have desktops with their dialup modem plugged into the wall merely emulating a fax device :). If you don't want to include these as "fax machines". you will be most likely out-of-luck.
First, there isn't anything inherent in the number that identifies it as a fax line. Even the phone company doesn't know - it's just a device attached to the wall jack, by the customer.
At some point you just have to trust the user. However, try the following ideas as well:
On each fax, publish a number (preferably toll-free) where the recipient can call to cancel. In some localities this might be a requirement anyway - "unsolicited" faxes are considered abusive in much the same way as spam since they can entail both material and bandwidth costs for the recipient. This will protect you in the eventuality that someone subscribes a number that doesn't belong to them.
Add some kind of error threshold to your software that will halt fax attempts once n attempts fail, and flag the number as inoperative. If you have some other way to contact the user, you could notify them of this event. The same principle works for e-mail addresses - I've received snail-mail notifications from companies when I changed e-mail addresses and forgot to notify them; once the e-mail had bounced a few times, they sent a courtesy letter to remind me to update it.
Many old fax lines are set to automatically pick up even on a voice call, so you could just call and check. On the other hand, it won't work on a lot of new ones, so while you could tell that one is a fax line, you couldn't tell it wasn't.
I'm sure a fax is a modem, so if you connected to it - using AT codes maybe (how 1990's!), you could determine from the response codes that there was a fax there - but you still have to make the call, make the negotiation etc - just dont send a page.

Resources