Friday 22 October 2010

Yet another possible reason for error of sending SMS with GPRS Modem

In Deepnet, some users still got the notorious error message "org.apache.xmlrpc.XmlRpcException: null values not supported by XML-RPC" when they tried to send SMS with a GPRS Modem.


Coincidentally, this problem happened on my Motorola which can be taken as a GPRS Modem. On the second day, I received a message from T-Mobile, my network operator. It says "Yesterday you sent a message to an invalid number. UK mobile numbers start with 07 or +447. Numbers starting 447 without the leading + are invalid."


Immediately I realized the mobile number format requested was the culprit. In deepnet, mobile number must comply with the so-called "International Format". Assume you have a UK SIM card, and the mobile phone number is given as 07955512345, in deepnet you have to use 00447955512345, which is correct when you use SMS service provider like Clickatell, however it is wrong for Mobile Operator, at least in my case.


In that case, you have to do some modification so that this kind of phone number format is allowed in Deepnet. Please follow the instructions below.



1, go to the folder “C:\Program Files\Deepnet Authentication Server\Tomcat\webapps\das\scripts”, assume you have installed the server in the default folder;
2, backup the file “admin.js”, then open it with your favourite editor;
3, locate the function “isValidMobile”

function isValidMobile(sMobile) {
// var mobileExp = /^[0]{2}\d{1,}$/;
var mobileExp = /^\d{1,}$/;
return mobileExp.test(sMobile);
}

4, change it to

function isValidMobile(sMobile) {
return true;
}

5, try to modify the mobile number to “+447955512345”;
6, send SMS OTP;

No comments: