Community discussions

MikroTik App
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

SMS script

Thu Jun 14, 2012 1:46 pm

Hello,
it is possible to make a script that work when the router get SMS?
let say -
if I get sms with the word "on" then enable hotspot\send log info to mail....
it there an example of something like this?

Thanks ,
 
Base122
just joined
Posts: 10
Joined: Tue Mar 13, 2012 4:28 pm

Re: SMS script

Thu Jun 14, 2012 4:32 pm

Take a look at this script I use for sending an SMS to Email.

http://forum.mikrotik.com/viewtopic.php ... 68#p312202

I am sure you can adapt it for your use.
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

Re: SMS script

Mon Jun 18, 2012 5:39 pm

something is not working for me
I can't read the SMS (but if I put the SIM in the phone I see there is a SMS)
this is the print:

/tool sms print
receive-enabled: yes
port: usb2
channel: 4
secret: 1234
allowed-number:
keep-max-sms: 0

can you tell me what is the "secret"? I put 1234 for no reason , maybe this is the mistake?

thanks ,
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: SMS script

Mon Jun 18, 2012 5:50 pm

The pin for the SIM card (Should be "0000", unless you've changed it)?
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

Re: SMS script

Tue Jun 19, 2012 9:20 am

its a new SIM - never change it , I will try 0000 (thanks , I didn't know it)
and does it matter which channel I'm using?
again , no reason I choose 4
 
User avatar
Mixiron
just joined
Posts: 18
Joined: Sun Jun 17, 2012 11:04 am
Location: Iran,Tehran
Contact:

Re: SMS script

Tue Jun 19, 2012 10:36 am

is there a way to connect with a script to a web service SMS gateway for sending and gettig sms with out SIM card over internet?
weservice or URL webservice , for sending some critical logs ,
TanQ
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

Re: SMS script

Tue Jun 19, 2012 2:16 pm

the script is still not working
I can send\receive SMS , and I can see them
but when I run the script I see in the log "SMS to Email script started "
and that is all
not getting any mail or "SMS to Email script ended"

help?

thanks,
 
Base122
just joined
Posts: 10
Joined: Tue Mar 13, 2012 4:28 pm

Re: SMS script

Wed Jun 20, 2012 1:38 am

its a new SIM - never change it , I will try 0000 (thanks , I didn't know it)
and does it matter which channel I'm using?
again , no reason I choose 4
You cannot choose any number for the Info channel.
It must be the correct one for your GSM Modem.
Try 1,2 or 3??

Once you have the correct info channel, using the "info" button in the PPP connection display window, should show information about the modem manufacturer, network, signal strength and so on.
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

Re: SMS script

Wed Jun 20, 2012 9:06 am

Thanks ,
now it's working great!

Thank you!
 
Dobby
Member
Member
Posts: 399
Joined: Wed Jan 11, 2012 12:07 am
Location: Hogwarts

Re: SMS script

Fri Jun 22, 2012 10:24 pm

Deleted because not related.
Last edited by Dobby on Mon Mar 11, 2013 3:48 am, edited 1 time in total.
 
User avatar
Mixiron
just joined
Posts: 18
Joined: Sun Jun 17, 2012 11:04 am
Location: Iran,Tehran
Contact:

Re: SMS script

Sat Jun 23, 2012 9:37 am

Hello everybody,

@Mixiron
Please have look at the link in the next line.
https://secure.wikimedia.org/wikipedia/ ... S_gateways

I hope that was helping you.
Dear Dobi thank you for your reply ,
all these operators has a URL for their web service , i just wanted to know has any one set their web service parameters in mikrotik,
i just want to write a script that when one of my ISP internet or BGP goes down , my script connect to that web service by URL and send a sms through it instead of using SIM card and SIM card module ,
TanQ