Commandline client

<< Click to Display Table of Contents >>

Navigation:  Reference > Connector properties > Web connector >

Commandline client

Commandline client


Diafaan SMS Server includes a commandline client that makes use of the Web connector. It has the same functionality as the HTTP API but a different syntax.

 

Usage:

dmscmnd.exe "key1:value1" "key2:value2" "key3:value3" ...

 

keys:

host

mandatory

The host name and port number of the Web Connector.

Use multiple host keys/value combination for redundancy support.

e.g. "host:host1:9710" "host:host2:9710"

command

mandatory

HTTP page name, e.g. "command:send-message"

 

 

Commands


 

send-message

Send one or more messages.

 

keys

username

optional

The name of the user, if omitted the guest account is used

password

optional

The password of the user

to

required

One or more phone/pager numbers, separated by semicolons

contact-name

required

One or more contact names and/or groups from the user's contact list, separated by semicolons

from

optional

Sender id

message

optional

Message text

message-type

optional

Message type to indicate if the message is text, Unicode, flash etc.

gateway

optional

One or more gateway names, separated by semicolons, that may be used to send the message.

priority

optional

A higher number ensures that the message is placed higher in the message send queue and is sent before messages with a lower priority.

 

returns

OK: message-id

or

ERROR:error-code error-message

 

If multiple messages are sent this command returns one response line per message in the order at which the numbers are located in the to field.

 

example

dmscmnd.exe host:localhost:9710 command:send-message username:admin password: to:+44xxxxxxxx message-type:sms.automatic "message:Message Text"

 

example with redundant host:

dmscmnd.exe host:host1:9710 host:host2:9710 command:send-message username:admin password: to:+44xxxxxxxx message-type:sms.automatic "message:Message Text"

 

request-status-update

Get the status of a previously sent message.

 

keys

username

optional

The name of the user, if omitted the guest account is used

password

optional

The password of the user

message-id

mandatory

Message id of the previously sent message

 

returns

STATUS:status-code status-message

or

ERROR:error-code error-message

 

example

dmscmnd.exe host:localhost:9710 command:request-status-update username:admin password: message-id:c3b0c20a-b63e-4bbf-919f-3d4251a8b9c0

 

request-server-status

Get the status of the Diafaan SMS Server and all the Gateways and Connectors statistics.

 

parameters

username

optional

The name of the user, if omitted the guest account is used

password

optional

The password of the user

 

returns

An XML file with the status and statistics of Diafaan SMS Server.

or

ERROR:error-code error-message

 

example

dmscmnd.exe host:localhost:9710 command:request-server-status username:admin password:

 

request-received-messages

Get a list of received messages in the inbox.

 

keys

username

optional

The name of the user, if omitted the guest account is used

password

optional

The password of the user

limit

optional

The maximum number of messages returned

remove

optional

Set to "1" to remove the returned messages from the database

order

optional

Set to "newest" to get newest messages first, otherwise oldest messages are displayed first.

 

returns

An XML file with a list of the requested messages.

or

ERROR:error-code error-message

 

example

dmscmnd.exe host:localhost:9710 command:request-received-messages username:admin password: limit:10 order:newest