which file to configure sms

hello guys, i have been reading on the forum that to configure sms i need to have the following example

<entry key='notificator.types'>web,mail,sms</entry>
<entry key='notificator.sms.manager.class'>org.traccar.sms.HttpSmsClient</entry>
<entry key='sms.http.url'>https://api.twilio.com/2010-04-01/Accounts/[YOUR ACCOUNT SID]/Messages.json</entry>
<entry key='sms.http.user'>[YOUR ACCOUNT SID]</entry>
<entry key='sms.http.password'>[YOUR AUTH TOKEN]</entry>
<entry key='sms.http.template'>
    From=[YOUR PHONE NUMBER]&amp;To={phone}&amp;Body={message}
</entry>

what am asking is which file in traccar do i need to add these settings to..thanks

stephen

Michał Piasecki5 years ago

You need to modify Traccar config file - it's somewhere in /opt/traccar/conf/.

However, I think Anton said somewhere that HTTP SMS is not really supported currently and we're supposed to use SMPP. Don't quote me on this though.

i see two files

default.xml and traccar.xml

which of the two do i need to edit

Michał Piasecki5 years ago

I think you have to modify traccar.xml - that's what I modify and I have no issues.

I also have another issue, when am configuring notifications, i only see option of Web, Mail.
But when i was using the demo, i would see option for Web, Mail and Mobile.
How can i see that option for Mobile also shows

thanks

Michał Piasecki5 years ago

This entry changes what you need:
<entry key='notificator.types'>web,mail,sms</entry>
Basically, every notification type is separated by comma. There are other notificator types, like Firebase or Telegram, however that requires much more complicated configuration.

@Michal

My default.xml file has the line <entry key='notificator.types'>web,mail,sms</entry>

but when i try to setup notifications, i am only getting the option for web now, i am nolonger even geting the option for web,mail,mobile

after i add the word sms on this line <entry key='notificator.types'>web,mail,sms</entry>

do i need to change anything

Macan5 years ago

After every change made in the config file just restart traccar server and check it again.

Michał Piasecki5 years ago

If you're not sure how to restart the server, you need to restart the traccar daemon. In a systemd distribution, the command is following: sudo systemctl restart traccar.

Tony Shelver5 years ago

As far as I can see, the recommendation is to add your configuration to traccar.xml. This will override the similar configs in default.xml.
Make sure you save the working config before making changes so you can roll it back easily.

thnaks, this worked for me