Do not use ({}) for define empty array, the correct way is :local arrayvar [:toarray ""] I myself used that method once suggested by another user, but it backfired because, although I don't quite remember now how, it had unwanted effects that backfired on me in programming. IT SEEMS to wo...
How can I do to execute an action if <Count> is >0. I think this will work even if Count tag is empty or non-existent: :global tokenParser :global recvSMS :local xmlSmsList ([$recvSMS]->"data") :local smsCount [:tonum [($tokenParser->"getTag") source=$xmlSmsList tag="Count&...
I wonder if it is possible to work with SMS with a "secure" API - there should be the possibility of authorization to access the API ... AFAIK, user-password authentication in HiLink returns access tokens in the headers of the http response and /tool/fetch has no way to get them, so it's ...
Hello, Rex! No, these modems of mine don't send SMS via API... They are sent from the WEB interface without any problems... You can try this in terminal to test if you can authenticate with HiLink API (assuming modem IP is 192.168.8.1 ): [admin@MikroTik] > :put [/tool fetch "http://192.168.8.1...
SMS messages are not deleted delSMS had a few errors. New version: :global delSMS do={ :local lteIP "192.168.8.1" :global tokenParser # get SessionID and Token via LTE modem API :local urlSesTokInfo "http://$lteIP/api/webserver/SesTokInfo" :local api [/tool fetch $urlSesTokInfo ...
I thought that you wanted to send one email for each sms. In that case the script would be something like this: ... :foreach tagContent in=$smsList do={ # tagContent - content of tag :local index [($tokenParser->"getTag") source=$tagContent tag="Index"] :local phone [($tokenParse...
I have also run into this nasty bug of [...] executing all functions in the script. In my case, the function first called was not the first declared, but the first in alphabetical order: deleteSMS. I guess this was because all functions were "methods" of an array, and as array members are ...
Afaik, you can't delete the entire inbox with one command. But can do it one message at a time using its index. In the delete request, instead of <Index>10</Index> use <Index>$index</Index> . And then (not tested): ... :local index ([($tokenParser->"getTag") source=$tagContent tag="In...
I have tested (read back) to receive SMS and process the content, without success. The recvSMS works well, but retrieves a bunch of sms messages at a time. The getBetween parser is very limited and can only process the first appearance ot each tag. I've a more advanced parser that walks incremental...
...the author to tell me exactly... These scripts are contributed unselfishly by its creators. It's unfair to expect or demand them any kind of guarantee about its applicability. For this kind of info you should contact the modem manufacturer or vendor. I think that there are two kind of HiLink dev...
:set $prefix [/routing/route/print count-only where belongs-to="bgp-IP-$remote"] not only puts the value in $prefix but also outputs it to the terminal. How can I suppress that? I think this is done with as-value . Code will be: :set prefix [/routing/route/print as-value count-only where ...
Elaborating that script, is possible to send file with size less than 63K by SSH...
This will be very interesting, but it seems that it is needed to load the file in memory to pass it to ssh-exec.
How do you will overcome the 4K limit?