Traccar SMS Gateway for Android

Anton Tananaev4 years ago

Hmmm. Sorry, it doesn't make sense. What is your phone IP? Are you using correct configuration?

Ronaldo4 years ago

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

Anton Tananaev4 years ago

What if you open http://192.168.1.200:8082/ in a browser from your laptop?

Ronaldo4 years ago

Send SMS using following API:

POST /
{
    "to": "+10000000000",
    "message": "Your message"
}
Anton Tananaev4 years ago

Looks correct. No more ideas.

Ronaldo4 years ago

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

Joystick4 years ago

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.

  1. Make sure to add a phone number on the user's profile.
  2. Make sure the Android device is on the same network as the server.
  3. Make sure the Android device have a sim enabled sim card installed.
Joystick4 years ago

I meant to say sms enabled sim card to be installed

Anton Tananaev4 years ago

Ronaldo Palam can you please try this new version:

https://github.com/traccar/traccar-sms-gateway/releases/tag/v1.2

Ronaldo4 years ago

Good morning Anton,

I will do this.

Thank you very much.

Ronaldo4 years ago

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!

Ronaldo4 years ago

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.

Jose B4 years ago

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

Anton Tananaev4 years ago

If your phone has a public IP, it should work as well.

Anton Tananaev4 years ago

One note though, there are no keys or authentication, so it would be very insecure to expose it to everyone on the internet.