SMS Notification through custom SMS messaging server

unky2 years ago

Is it possible to configure custom SMS server for sending notificatins from Traccar?
My SMS server opens HTTP Port and accepts simple request to send SMS. It is enought to just call http request like this:

http://my.sms.server.address:9090/sendsms?phone=<PHONE_NUMBER>&text=<SMS_TO_SEND>&password=<SERVER_PASSWORD>

so in Traccar it would be nice to configure simple URL to send notification and that URL shoud be called from traccar server when notification send is required. Parameter could be hardly written in above URL.

Anton Tananaev2 years ago

We don't support data via query parameters. Only via payload, if your SMS provider supports it.

unky2 years ago

Yes, My server also supports payload. So, how to configure it in traccar config XML?

Anton Tananaev2 years ago
unky2 years ago

OK, I have checked it. It works for me bu there is another important question. I have to define payload but is it paramtrisable?
I want to send sms notification when my gps mounted in Landroid Worx grass cuter leaves defined zone (steal alarm) but what I have noticed there is only one type of sms for sending notification. There is no information about gps device ID and so on. Only phone number and message to sent. It is not paramtrised in case of configurable devices?

Anton Tananaev2 years ago

The message is configurable in the templates.

unky2 years ago

What template to change? I see 3 folders export, full, short. There are many files but which one is related to notifications?

Anton Tananaev2 years ago

Have you read our documentation?

unky2 years ago

I have read:

Traccar uses Velocity Engine for notification templates. Emails use the long version and most other channels use the the short version of the templates.
Templates can be easily adjusted to your needs or translated. Template *.vm files must be in the UTF-8 encoding.

But on Velocity Engine doc I can not find any information which file is related to Your sms notification.
I rally need only simple help to point which file is responsible for sms notification and then I will try to cope with the problem.
Is it necessary to read All Doc on VE just to add ID of device to SMS notification?

Anton Tananaev2 years ago

Emails use the long version and most other channels use the the short version of the templates.