Support forum

Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

How to check gateway status from an HTTP callback script
sp_NewPost Add Reply sp_NewTopic Add Topic
September 18, 2022
1:34 am
Oscar Guerrero

Thanks Henk...
Call api: http://DIAFAANSERVER:xxxx/http/request-server-status?username=xxxxx&password=xxxxx
It effectively responds an XML with the states of the gateways.

Load data with "simplexml_load_file($url)", a loop for "GatewayStatusList->Gateway" and an if for "attributes()->Name" together with "attributes()->Active" I get the status I needed.

Now I can assign a backup gateway from the callback if the primary gateway fails.

Thank you so much.

September 16, 2022
3:44 pm
Henk Helmantel
Forum Posts: 1472
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

Hello Oscar,

You can use the request-server-status HTTP API call to get an XML document with the status of Diafaan SMS Server and all gateways and connectors. This API call can only be called by a user with administrator privileges.

Regards, Henk

September 16, 2022
3:39 am
Oscar Guerrero

Hello, I have developed a "callback" for diafaan and I use it with external queries for "cellular portability" and everything is fine, diafaan works excellent. 1 gateway for each company and the "callback" finally resolves after all queries which gateway to send.
But I have a little problem...
How can I check from the "Callback" if the gateway is disabled by "DisableOnFailedMessages", to send through another gateway.

Is there any command or any other way to check the status of a gateway?

From web admin there is "serverstatus", where it shows "Active" or "offline", could this query be made in some way from the callback?


Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 529

Currently Online:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Member Stats:

Guest Posters: 668

Members: 0

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 3

Topics: 1131

Posts: 3858

Newest Members:

, Henk Helmantel

Administrators: Henk Helmantel: 1472