NowSMS 2008 added an XML-based status query interface that reports information similar to what is reported on the “Status” page of the NowSMS configuration dialog. The query results include information about SMSC connection status, the number of messages processed via the different connections, and the number of messages pending in the queues, among other information.
The XML-based status interface can be accessed on the web port of the SMS gateway using a URL of “/ADMIN/XMLSTATUS” (not case sensitive). To enable access to this interface, “Enable Web Account Administration” must be enabled on the “Web” tab of the NowSMS administrative interface. The Admin User Name and Password can either be sent in an HTTP “Authorization:” header, or using “&User=username&Password=password” in the URL request.
An example will help better illustrate the information that is available.
Connect to the NowSMS server with the following URL: http://127.0.0.1:8800/admin/xmlstatus?user=adminuser&password=adminpass Substitute in your appropriate IP address and port … and the appropriate “adminuser” and “adminpass” values. The XML formatted information is quite readable, so a good way to get started is to make the request to your own NowSMS server via a web browser to see what information is returned.
Here’s an example of the XML response from one of our testing servers (I’ve added some line breaks for readability):
<NowSMSStatus>
<SMSCStatus>
<Name>SMPP – xps5:9000</Name>
<Status>OK</Status>
<MessagesToday>44640</MessagesToday>
<MessagesLast7Days>44640</MessagesLast7Days>
<MessagesLast30Days>44640</MessagesLast30Days>
</SMSCStatus>
<SMSCStatus>
<Name>SMPP – xps5:9001</Name>
<Status>OK</Status>
<MessagesToday>43369</MessagesToday>
<MessagesLast7Days>43369</MessagesLast7Days>
<MessagesLast30Days>43369</MessagesLast30Days>
</SMSCStatus>
<SMSCStatus>
<Name>SMPP – xps5#2:9000</Name>
<Status>OK</Status>
<MessagesToday>45308</MessagesToday>
<MessagesLast7Days>45308</MessagesLast7Days>
<MessagesLast30Days>45308</MessagesLast30Days>
</SMSCStatus>
<SMSCStatus>
<Name>SMPP – xps5#2:9001</Name>
<Status>OK</Status>
<MessagesToday>48856</MessagesToday>
<MessagesLast7Days>48856</MessagesLast7Days>
<MessagesLast30Days>48856</MessagesLast30Days>
</SMSCStatus>
<SMSOUTQ>92833</SMSOUTQ>
<SMSINQ>0</SMSINQ>
<SMSRCPTQ>0</SMSRCPTQ>
<SMSSubmitted>
<MessagesToday>275006</MessagesToday>
<MessagesLast7Days>275006</MessagesLast7Days>
<MessagesLast30Days>275006</MessagesLast30Days>
</SMSSubmitted>
<SMSSent>
<MessagesToday>182173</MessagesToday>
<MessagesLast7Days>182173</MessagesLast7Days>
<MessagesLast30Days>182173</MessagesLast30Days>
</SMSSent>
<SMSReceived>
<MessagesToday>73786</MessagesToday>
<MessagesLast7Days>73786</MessagesLast7Days>
<MessagesLast30Days>73786</MessagesLast30Days>
</SMSReceived>
<SMSFailed>
<MessagesToday>0</MessagesToday>
<MessagesLast7Days>0</MessagesLast7Days>
<MessagesLast30Days>0</MessagesLast30Days>
</SMSFailed>
<SMSRetried>
<MessagesToday>0</MessagesToday>
<MessagesLast7Days>0</MessagesLast7Days>
<MessagesLast30Days>0</MessagesLast30Days>
</SMSRetried>
<MMSProcessedUser>
<MessagesToday>0</MessagesToday>
<MessagesLast7Days>0</MessagesLast7Days>
<MessagesLast30Days>0</MessagesLast30Days>
</MMSProcessedUser>
<MMSProcessedVASP>
<MessagesToday>0</MessagesToday>
<MessagesLast7Days>0</MessagesLast7Days>
<MessagesLast30Days>0</MessagesLast30Days>
</MMSProcessedVASP>
<MMSSentMMSC>
<MessagesToday>0</MessagesToday>
<MessagesLast7Days>0</MessagesLast7Days>
<MessagesLast30Days>0</MessagesLast30Days>
</MMSSentMMSC>
<MMSSentVASP>
<MessagesToday>0</MessagesToday>
<MessagesLast7Days>0</MessagesLast7Days> <MessagesLast30Days>0</MessagesLast30Days>
</MMSSentVASP>
<MMSRetrieved>
<MessagesToday>0</MessagesToday>
<MessagesLast7Days>0</MessagesLast7Days>
<MessagesLast30Days>0</MessagesLast30Days>
</MMSRetrieved>
<SMPPClientList>
<ActiveConnectionCount>2</ActiveConnectionCount>
<ActiveConnection>
<Name>micro</Name>
<ConnectionType>S</ConnectionType>
<IPAddress >192.168.1.114</IPAddress>
</ActiveConnection>
<ActiveConnection>
<Name>micro</Name>
<ConnectionType>R</ConnectionType>
<IPAddress >192.168.1.114</IPAddress>
</ActiveConnection>
</SMPPClientList>
</NowSMSStatus>
Most of this information directly correlates to statistics that are displayed on the NowSMS configuration dialog.
Related pages:
- Query NowSMS Server Status Starting with the NowSMS 2008 release, an XML-based status query interface is available which reports information similar to what is...
- NowSMS Status Query with PHP Previous articles have described the XML-based status query interface that can be used to programmatically retrieve information about the current...
- XML Status Query for SMSC Connection Status and Statistics We posted details about an XML-based NowSMS status query in an earlier posting: http://www.nowsms.com/xml-status-query-for-smsc-connection-status-and-statistics This query reports information similar to...
- Update Patch – 2010.11.26 An update patch release of the Now SMS & MMS Gateway is now available for download at http://www.nowsms.com/download/nowsms20101126.zip. This ZIP...
- Web Menu Interface When the menu driven web interface is enabled, it is easy to test the ability of sending various types of...
- Provisioning SMS and MMSC User Accounts via HTTP For NowSMS v5.51 and later, an HTTP-based interface has been added to allow for account provisioning by external applications. This...
- Configuring the Web Interface and SMPP Server When you wish to submit any type of SMS message, including MMS notifications or WAP push messages, you must submit...
- NowSMS Update – 2011.03.21 An interim update release of the Now SMS & MMS Gateway is currently available at http://www.nowsms.com/download/nowsms20110321.zip. Use the executable file...
- NowSMS Group Text Messaging The NowSMS Group Text feature is designed to facilitate group communications over SMS. At it’s core, it’s about sending a...
- Editing Distribution Lists and Address Books in NowSMS The NowSMS documentation doesn’t provide any technical information about the format of the distribution lists and address books that are...
Topic Category: connection status, statistics, XML
For comments and further discussion, please click here to visit the NowSMS Technical Forums (Discussion Board)...
2 Responses to “XML Status Query for SMSC Connection Status and Statistics”

Click here to download a free trial version of NowSMS & MMS Gateway, NowSMS Lite or NowWAP Gateway.
Learn more about NowSMS Lite.
Additional information regarding this interface was posted in another article:
http://blog.nowsms.com/2010/02/xml-status-query-for-smsc-connection.html
From the discussion board …
Here’s a useful tip on how to parse individual elements from the XML status query:
http://www.nowsms.com/discus/messages/1/60149.html
The script in this example retrieves the size of the outbound SMS message queue.