Building > Quick Guides > Messaging > Gateways > CHT Gateway > Phones
List of Phones that work well with CHT Gateway
In a techlead heaven, we would have immediate physical access to gateway phones, but alas, most of the time we have to hand them over to the partner. Fortunately, comes this guide on debugging gateway problems.
Follow the steps as below (if you don’t have physical access to the phone, start with step 2 i.e debug from the server side first)
Make sure that the device:
Is connected to the internet. You can check this by opening any Browser app in the phone and going to https://google.com
.
Check if the instance name, instance type and gateway
user password are set correctly in the Gateway Settings
app screen.
Has the latest Gateway version. Get the latest version by opening the Google Play Store, searching for Medic Gateway
and updating the existing app
Medic Gateway should be set as the default app for SMS. To check, go to Settings
in the Gateway app. If Medic Gateway is not the default, you will be met with the below app screen. In that case, click Help me change
.
If messages are not going through to the server, in the To Webapp
tab, select some of them and press Retry
at the bottom and wait for about 5-10 minutes.
If messages are not going through to the users, in the From Webapp
tab, select some of them and press Retry
at the bottom and wait for about 5-10 minutes.
In CDMA networks, there are operator issues where messages get to the users in chunks of around 160 characters when the message is too long. If this is the case, go to Settings
in the gateway screen and make sure you tick CDMA compatibility mode
Check if the phone has adequate free space
Restart the phone if no solution seems to work. Resetting the Android state sometimes resolves some persistent problems
When attacking the problem from the phones end does not work, move on to the server and try to solve it from there. Maybe the server has a configuration issue which hinders the processing or the acceptance of the messages by Medic-Api
Follow the steps:
/srv/storage/gardener/logs/
ls -lt
to arrange the log files in order of modified date. Note the concerned file which was last modified on the date you are investigatinggrep api/sms medic_medic_medic-api4.log
. As below, note the errors and work from there.cd /srv/storage/gardener/logs/
ls -lt
grep api/sms medic_medic_medic-api4.log
If the above steps don’t yield the problem, read the Obtaining Logs page, note the make/model/android version their gateway handset is and escalate with those details to the PM/project techlead.
Verifying the SMS Gateway via a Test Message
We can verify whether the SMS Gateway app is responding by sending a test message via the web app. For example, let us try this in a deployed project.
Test message creation and delivery to Gateway phone verification:
Input the test message which will be sent to the Gateway and the phone number where we wish to see the Gateway’s reply. Country code if not specified will be the default country code specified in SMS -> Default country code.
The test message text doesn’t matter here as we are just verifying if the Gateway phone receives messages from our server and responds correctly to it by sending us a message back in the phone number we input in step (i). The easiest way would be to input our own phone number in (i) and validate that the Gateway phone sends the response message to it.
After inputting the number where you expect to view the response message, press the “Send message” button.
We should see the Report Submitted message if the SMS was successfully received by the Gateway phone.
If the message was received by the Gateway we should see the message in the “Messages” tab in the app and get an auto-reply on the number we provided in step 4(i). We should be able to see the following acknowledgments in the web app and phone respectively.
Message Acknowledgement in the web app in the messages tab.
Response sent acknowledgment in the Outgoing Messages -> Due tab. The recipient should be the number we input in 4(i) and the status should be delivered.
Message reply as seen on the phone of 4(i) from Gateway phone.
If you see the message acknowledgment it means the Gateway is working as expected.
List of Phones that work well with CHT Gateway
Configuring cht-gateway
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.