Vous êtes sur la page 1sur 7

NIC SMS Gateway Integration Guide

Contents

Step

1: Registration for SMS Service

3

Step 2: Pre-requisite for integration and checking

3

Step

3: Testing

5

Step 4: Sample code for integration over HTTPS........................................................6

Step 1: Registration for SMS Service

and

sealed

form

smssupport@gov.in for further processing.

must

be

sent

to

  • 3. For any issue related to SMS form filling, SMS Support is to be contacted on smssupport@gov.in or register complain on http://servicedesk.nic.in (toll free number 1800111555).

  • 4. For further clarification regarding

filling

up

the

online

form,

refer

 
  • 5. To

know

the

NIC

Coordinators

for

your

ministry

and

department,

Refer

Step 2: Pre-requisite for integration and checking

1. ALL TESTING MUST BE DONE FROM SERVER FROM WHICH SMS GATEWAY NEEDS TO BE INTEGRATED. 2. Check the domain look up using nslookup command. If domain (smsgw.sms.gov.in) does not get resolved, then please contact your server/firewall administrator. Refer below screenshot for using nslookup command.

Step 1: Registration for SMS Service 1. Online form on <a href=https://msgapp.emailgov.in/OnlineForms/SMS_Service_Registration.jsp 2. The scanned copy of the duly signed and sealed form smssupport@gov.in for further processing. must be sent to 3. For any issue related to SMS form filling, SMS Support is to be contacted on smssupport@gov.in or register complain on http://servicedesk.nic.in (toll free number 1800111555). 4. For further clarification regarding filling up the online form, refer https://msgapp.nic.in/OnlineForms/images/OnlineFormsGuidelines.pdf . 5. To know the NIC Coordinators for your ministry and department, Refer https://msgapp.nic.in/OnlineForms/nic_coordinators.jsp . Step 2: Pre-requisite for integration and checking 1. ALL TESTING MUST BE DONE FROM SERVER FROM WHICH SMS GATEWAY NEEDS TO BE INTEGRATED. 2. Check the domain look up using nslookup command. If domain (smsgw.sms.gov.in) does not get resolved, then please contact your server/firewall administrator. Refer below screenshot for using nslookup command. 3. Telnet smsgw.sms.gov.in (164.100.14.211) on port 443. Go to command line interface (CLI) and type telnet smsgw.sms.gov.in 443 and press enter. If telnet works then connection to SMS gateway is OK. " id="pdf-obj-2-98" src="pdf-obj-2-98.jpg">

3. Telnet smsgw.sms.gov.in (164.100.14.211) on port 443. Go to command line interface (CLI) and type telnet smsgw.sms.gov.in 443 and press enter. If telnet works then connection to SMS gateway is OK.

Step 1: Registration for SMS Service 1. Online form on <a href=https://msgapp.emailgov.in/OnlineForms/SMS_Service_Registration.jsp 2. The scanned copy of the duly signed and sealed form smssupport@gov.in for further processing. must be sent to 3. For any issue related to SMS form filling, SMS Support is to be contacted on smssupport@gov.in or register complain on http://servicedesk.nic.in (toll free number 1800111555). 4. For further clarification regarding filling up the online form, refer https://msgapp.nic.in/OnlineForms/images/OnlineFormsGuidelines.pdf . 5. To know the NIC Coordinators for your ministry and department, Refer https://msgapp.nic.in/OnlineForms/nic_coordinators.jsp . Step 2: Pre-requisite for integration and checking 1. ALL TESTING MUST BE DONE FROM SERVER FROM WHICH SMS GATEWAY NEEDS TO BE INTEGRATED. 2. Check the domain look up using nslookup command. If domain (smsgw.sms.gov.in) does not get resolved, then please contact your server/firewall administrator. Refer below screenshot for using nslookup command. 3. Telnet smsgw.sms.gov.in (164.100.14.211) on port 443. Go to command line interface (CLI) and type telnet smsgw.sms.gov.in 443 and press enter. If telnet works then connection to SMS gateway is OK. " id="pdf-obj-2-104" src="pdf-obj-2-104.jpg">

4.

If telnet does not work, then there is connection issue. Refer below screenshot.

4. If telnet does not work, then there is connection issue. Refer below screenshot. 5. Onehttps://farps.nic.in as per below screenshot. 7. Firewall request has to be filled by respective NIC coordinator for SMS access through URL https://farps.nic.in/ as described below in Sample Firewall request. *If both private IP and public IP are configured on your application server, then before filling up the following firewall form, please confirm from your network/firewall administrator that the SMS request from your application will reach SMS server from which IP (PUBLIC or PRIVATE). " id="pdf-obj-3-7" src="pdf-obj-3-7.jpg">
  • 5. One possible reason for telnet failure is that your application server is behind a firewall and firewall rule is not configured to allow traffic from your server to SMS Gateway.

  • 6. In this regard you have to apply for firewall rule through https://farps.nic.in as per below screenshot.

4. If telnet does not work, then there is connection issue. Refer below screenshot. 5. Onehttps://farps.nic.in as per below screenshot. 7. Firewall request has to be filled by respective NIC coordinator for SMS access through URL https://farps.nic.in/ as described below in Sample Firewall request. *If both private IP and public IP are configured on your application server, then before filling up the following firewall form, please confirm from your network/firewall administrator that the SMS request from your application will reach SMS server from which IP (PUBLIC or PRIVATE). " id="pdf-obj-3-15" src="pdf-obj-3-15.jpg">
  • 7. Firewall request has to be filled by respective NIC coordinator for SMS access through URL https://farps.nic.in/ as described below in Sample Firewall request.

*If both private IP and public IP are configured on your application server, then before filling up the following firewall form, please confirm from your network/firewall administrator that the SMS request from your application will reach SMS server from which IP (PUBLIC or PRIVATE).

Are you the Server/ Website/ NO Application Owner ? Data Centre where server hosted NIC HQ
Are you
the
Server/
Website/
NO
Application Owner ?
Data Centre where server hosted NIC HQ DATA CENTER
Functionality of the Server
SMS Server
OS of the Server
LINUX
IP Type
Public Only
Public IP
164.100.14.211 Private IP
URL of the application hosted on
above IP (if any)

Public IP rule for access from Outside Systems to SMS Gateway Server

     

URL

of

the

     

From

To

Services

server

to

be

Ports

Reason

for

Protocol

visited

opening port

YOUR

           

APPLICATION

HTTPS

443

SMS Service

TCP

SERVER IP

For any issue related to firewall, NIC Cyber Security team should be contact on 011- 24305140 (Email on : appsecmon2@nic.in, appsecdev3@nic.in , aniljha@nic.in).

Step 3: Testing

1. Once again test connectivity using nslookp and telnet command as explained above.

2. Secondly

test

SMS

delivery

by

calling

SMS

API

(https://

smsgw.sms.gov.in/failsafe/HttpLink?ussername=[USERNAME]&pin=[PASSWORD]&messa ge=[MESSAGE]&mnumber=[MOBILE NUMBER]&signature=[SENDER ID]) from the same

server/machine for which you have the firewall permission. All testing must be

done from the same eco-system for which you have got the firewall rule enabled. If this is not done you may get different result and SMS team will not be responsible for the same. If it is windows environment, then launch the internet browser and copy the SMS API on the browser as mentioned above. For Linux based system use wget or elinks command.

Use Browser (for Windows)

done from the same eco-system for which you have got the firewall rule enabled. If thishttps://msgapp.nic.in/OnlineForms/Documents.jsp . These sample codes are for your guidance only. You must review the code and if required you can modify as per your site. This link also provides documents for integration, guidelines for SMS refer https://msgapp.nic.in/OnlineForms/Documents.jsp . " id="pdf-obj-5-6" src="pdf-obj-5-6.jpg">

Use wget and elinks command as shown below (for Linux based system).

done from the same eco-system for which you have got the firewall rule enabled. If thishttps://msgapp.nic.in/OnlineForms/Documents.jsp . These sample codes are for your guidance only. You must review the code and if required you can modify as per your site. This link also provides documents for integration, guidelines for SMS refer https://msgapp.nic.in/OnlineForms/Documents.jsp . " id="pdf-obj-5-10" src="pdf-obj-5-10.jpg">
done from the same eco-system for which you have got the firewall rule enabled. If thishttps://msgapp.nic.in/OnlineForms/Documents.jsp . These sample codes are for your guidance only. You must review the code and if required you can modify as per your site. This link also provides documents for integration, guidelines for SMS refer https://msgapp.nic.in/OnlineForms/Documents.jsp . " id="pdf-obj-5-12" src="pdf-obj-5-12.jpg">

3.

If error reported as shown in below image, then contact SMS Support team on smsssupport@gov.in.

4. If SMS delivery is successful, then test SMS from your application. If from
4.
If
SMS
delivery
is
successful,
then
test SMS
from your application. If
from

application SMS is not getting delivered or you are facing any issues then check and debug your application.

Step 4: Sample code for integration over HTTPS

1.

The

sample

code

in

java,

.net

and

PHP

is

available

at

https://msgapp.nic.in/OnlineForms/Documents.jsp. These sample codes are for your

guidance only. You must review the code and if required you can modify as per your site. This link also provides documents for integration, guidelines for SMS

2.

If

required,

you

can

also

download

the

public

“SSL

Certificate”

from

3. Integrate the modified sample code in the application and use SMS gateway for SMS delivery from application.