Traccar SMS Gateway

fanfan69 2 years ago

hello everyone, I have just installed "Traccar SMS Gateway" on my Android phone, and I notice that it uses the same port "8082" as my local server, the application works with postman but with the traccar server, this could it be the cause?

Anton Tananaev 2 years ago

You're not running the server on your phone, right? So it shouldn't be a problem that the port is the same.

fanfan69 2 years ago

yes indeed, but I have an error at startup here is the log:

2023-09-08 17:49:55  INFO: jetty-10.0.15; built: 2023-04-11T17:25:14.480Z; git: 68017dbd00236bb7e187330d7585a059610f661d; jvm 17.0.6+10
2023-09-08 17:49:55  INFO: Started o.t.w.@1b3a9ef4{/,null,AVAILABLE}
2023-09-08 17:49:55  INFO: Session workerName=node0
2023-09-08 17:49:57  WARN: JAXBContext implementation could not be found. WADL feature is disabled.
2023-09-08 17:49:58  INFO: Started o.e.j.s.ServletContextHandler@3c826498{/,null,AVAILABLE}
2023-09-08 17:49:58  INFO: Started ServerConnector@47058864{HTTP/1.1, (http/1.1)}{0.0.0.0:8082}
2023-09-08 17:49:58  INFO: Started Server@13d289c7{STARTING}[10.0.15,sto=0] @19463ms
2023-09-08 17:50:11  INFO: user: 1, action: login, from: 127.0.0.1
Anton Tananaev 2 years ago

I don't see any errors. I only see a warning that has nothing to do with the port and can safely be ignored.

fanfan69 2 years ago

ok, my configuration does not work

    <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.0.5:8082/</entry>
    <entry key='sms.http.authorization'>xxxxxxxxxx</entry>
    <entry key='sms.http.template'>
            {
                "to": "{100000003}",
                "message": "{message}"
            }</entry>
error: Cannot invoke "java.lang.CharSequence.toString()" because "replacement" is null - NullPointerException (... < HttpSmsClient:76 < *:94 < BaseProtocol:126 < CommandsManager:76 < ...)
Anton Tananaev 2 years ago

First of all, it looks like you're not using the latest official release. You should upgrade before we can help you.

Also, your configuration is wrong. It should be "to": "{phone}",.

fanfan69 2 years ago

if it is official downloaded on github, there was "phone" but as that did not work I put the number of my tracker :(

Anton Tananaev 2 years ago

I think the key is not just "official", but "the latest official".

fanfan69 2 years ago

ok sorry, I understand, the update is 5.9 how can I not lose the current settings?

Anton Tananaev 2 years ago

Have you read the documentation before asking?

fanfan69 2 years ago

no because in the zip the readme reference has a simple video.

fanfan69 2 years ago

ok it works with 5.9, see how I retrieve my settings on the forum, thank you