phone ip (traccar client):
192.168.1.197
phone fixed ip (traccar sms gateway):
192.168.1.200
notebook's fixed ip (traccar server):
192.168.1.195
traccar.xml configuration:
<entry key='notificator.types'>web,mail,sms</entry>
<entry key='notificator.sms.manager.class'>org.traccar.sms.HttpSmsClient</entry>
<entry key='sms.http.url'>http://192.168.1.200:8082/</entry>
<entry key='sms.http.template'>
{
"to": "{phone}",
"message": "{message}"
}
</entry>
checking ports on windows:
TCP 192.168.1.195:5055 192.168.1.197:53505 ESTABLISHED
"phone traccar client originating port 53505 to communicate with the server through port 5055 (clearly ipv4)"
TCP [::1]:8082 [::1]:51977 ESTABLISHED
TCP [::1]:51977 [::1]:8082 ESTABLISHED
"browser originating port 51977 to connect to the server on port 8082 via ipv6, but as everything is on windows itself this works"
but the list does not show the ip and port of the sms gateway phone (or it is only sampled at the time of transmission ...)
What if you open http://192.168.1.200:8082/
in a browser from your laptop?
Send SMS using following API:
POST /
{
"to": "+10000000000",
"message": "Your message"
}
Looks correct. No more ideas.
it may be that question of debugging my device ...
but thanks Anton,
I will try from here and if successful I will let you know ...
Hi Anton
I've set this up on a old Android phone and it is working as expected. Well done on yet another great project. Thanks.
Some notes for anyone interested.
I meant to say sms enabled sim card to be installed
Ronaldo Palam can you please try this new version:
https://github.com/traccar/traccar-sms-gateway/releases/tag/v1.2
Good morning Anton,
I will do this.
Thank you very much.
Good afternoon Anton,
I just arrived at the office (I was attending external clients) ...
well, to ensure operation and save time, i restored the phone by erasing all settings, then i downloaded the new version and installed it keeping all other settings.
I'm happy to say that everything worked!
Now knowing that everything is ok (because the goal was a quick result), when I have some time I will test the old version again to make eliminations with my cell phone.
Will this application work only if the phone is on the same network as the server?
I ask this because my server is an external provider (contratado).
JB
If your phone has a public IP, it should work as well.
One note though, there are no keys or authentication, so it would be very insecure to expose it to everyone on the internet.
Hmmm. Sorry, it doesn't make sense. What is your phone IP? Are you using correct configuration?