Support forum

Advanced Search

— Forum Scope —




— Match —





— Forum Options —





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

sp_TopicIcon
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
Guest
Guests

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.
Oscar.

September 16, 2022
3:44 pm
Henk Helmantel
Admin
Forum Posts: 1375
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
Guest
Guests

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?

regards
Oscar.

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 494

Currently Online:
32 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Member Stats:

Guest Posters: 642

Members: 0

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 3

Topics: 1067

Posts: 3647

Newest Members:

, Henk Helmantel

Administrators: Henk Helmantel: 1375