Send and receive using the database
With Auron Omni, you can send and receive messages through the database. A straightforward way to do this is by creating new records directly in the database.
This is very useful, especially when your script or application runs on a different PC or on a Linux or Unix system. In these cases, it is possible to connect directly to the Auron Omni database.
If you need to integrate from a different database such as MySQL, PostgreSQL, Oracle, or any other system, have a look at the database integration channel.
To send an SMS message, run this query:
INSERT INTO InsertSms (StatusID, ToAddress, Body)
VALUES ('SCHEDULED', '+3112345678', 'Hello, World')
This sends an SMS message to +3112345678 using the first available outgoing SMS channel.
To send the SMS through a specific channel, use:
INSERT INTO InsertSms (StatusID, ChannelID, ToAddress, Body)
VALUES ('SCHEDULED', 'GSMCHANNEL1', '+3112345678', 'Hello, World')
This sends the same SMS message through GSMCHANNEL1.
Find the documentation for InsertSms here.
Have a look at immediate processing in the database to make sending more responsive.
You can also use this view to see incoming messages by filtering on the StatusID field. For example:
SELECT * FROM InsertSms WHERE StatusID = 'RECEIVED'
This shows all received messages.
You can send email messages in the same way.
INSERT INTO InsertEmail (StatusID, ToAddress, BodyPlainText)
VALUES ('SCHEDULED', 'alerts@yourcompany.com', 'Alert!')
Find the documentation for InsertEmail here.
Find definitions of the Insert tables in the Database Layout section of the knowledge base.