Community discussions

MikroTik App
 
Aukesp
just joined
Topic Author
Posts: 1
Joined: Thu Jul 22, 2021 11:05 pm

Send SMS to mobile

Wed Oct 13, 2021 1:34 am

Hello,

I have search some forum topic's but could not find an answer to my problem.
It is quiet simple: I want to sent an SMS by script.

I use the following code:

#Local variable
:local PHONE1 "06xxxxxxxx";
:local INTERFACE "lte1";

#bericht naar SMS
:log info $INTERFACE;
:log info $PHONE1;
/tool sms send port=$INTERFACE phone-number=$PHONE1 message="Hallo All";

:log info "SMS sent";


Whats going wrong here?
 
dermawas
Frequent Visitor
Frequent Visitor
Posts: 64
Joined: Sat Jul 10, 2021 7:06 am

Re: Send SMS to mobile

Thu Oct 14, 2021 10:42 am

Hi

i'm using USB modem so we need to set a channel to send.
not sure in LTE if there is a channel

the following is the sample of sending sms
/tool sms send port=$UsbPort phone-number=$DestPhoneNumber1 message="$SMSMessageText" channel=$Channel;

hope it helps
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Send SMS to mobile

Thu Oct 14, 2021 3:56 pm

The correct syntax for MikroTik modules onboard (not USB or others), for example RBwAPR-2nD + R11e-LTE
/tool sms
send lte1 phone-number=00000000 message="xxxxxxxxxxxxxx"

The message must be on General GSM 7 encoding alphabet format, for example "ążźćęłóńÀÁÈÉÌÍÒÓÙÚ" etc. are unsupported

more detail about alphabet:
viewtopic.php?f=2&t=82278&p=411358&hili ... et#p411358

Who is online

Users browsing this forum: eldoncito2019 and 19 guests