Thank you for the answer.
It is very sad that you don’t understand what is wrong here. It was not for your developer team to make decision that will remove a feature that it was sold with. It is like car manufacturer disabling my car audio in an update 2 years after purchase because they thought it was good idea. It is not right to the customers.
I am sorry if I come out bitter, but you created problem for me. That was not really needed.
But, it seems I am now stuck with status quo here and I might as well try to figure out how get myself out of this mess.
Your comments are not any help, I am afraid. Link to Monitoring via Zabbix - Teltonika Networks Wiki shows how to monitor Teltonika equipment in Zabbix. That is not the problem. That is bog standard SNMP and works just fine.
Problem is exactly sending SMS messages out from Zabbix via Teltonika ruter.
We are already using web hook to send, but that was easy because all we were sending were one liner HTTP posts.
Looking into RT956 API calls, it is not documented well enough with examples. You have authentication example and get config example. Not a single send SMS example. Looking into API, Send SMS does not show it needs authentication. Yet it does.
And no, I cannot downgrade FW simply, because if I do, I loose all config and router defaults to factory settings. Meaning I loose connection to it on remote network where it lives.
Web hooks in Zabbix are great pain because you have no way of debugging except stabbing in the dark and trying to figure out from a log. Not to mention that I am not JScript programmer and Zabbix is not really documenting how it actually works.
So what I need is :
Send Authenticate API call → it will return answer containing security token.
I need to parse that response to extract security token.
Than I need to call Send Message Api call, and pass the parameters. Including security token. How do I do that? What would be example?
Using Curl I managed to get authenticated and get session and token. Then I tried to send SMS.
curl -X POST “https://10.179.246.116/api/messages/actions/send” -H “Content-Type: application/json” -H “Authorization: Bearer 6ee154f4b42a41839d20a4ded7d8c8e8” -d ‘{“data”:{“number”:“0038599xxxxxxx”,“message”:“Test API”,“modem”:“1-1.4”}}’ -k
I kinda figured this is how it should work, by logic. Sec token is copied from authentication few seconds before that. And it did not show error, but I did not receive a message.
And now I have a problem. Api shows only parameters for Send.
How do I send session token with it? Did I do it right?
What is a modem parameter? Modem name, modem ID, what? I found this 1-1.4 somewhere on the Internet. Is that right?
How do I know what modem to use? We have two sim card slots, so I guess it is more than one destination, what is syntax to choose modem? I use only one SIM at the time, in Slot1
Also, what should be user rights for a user to send SMS?
As I am determined to make this work I would really need help figuring this out. I think that would be nice of you guys, considering the circumstances.
If I have this sorted out, I can keep buying your devices for my purpose. Which I would like because these routers are darn nice and reliable and work well otherwise. As you can see, I am not just complaining, I tried what I could, but between me not understanding well, and incomplete documentation on both Zabbix and your side I I am stuck.
So please, do right by me and give me a hand if you can.
If you do, I will personally make sure that Zabbix includes the working WebHook into distro so people could have off the shelf solution that works. That will bring customers, instead of the opposite.
Best,
Siniša