Auto-forward incoming SMS from one mobile phone number to another phone number using a Huawei mobile broadband device (dongles, wingles)
As I switched to iPhone supporting Dual SIM (eSIM), this repository won’t be maintained anymore.
Auto-forward incoming SMS from one mobile phone number to another phone number using a Huawei mobile broadband device (dongles, wingles).
This Node.js module forwards incoming SMS from one mobile phone number (e.g. personal) to another one (e.g. work).
The typical use case is someone equipped with a professional mobile phone, who wants to keep his/her personal phone number separate from work number,
but does not want to carry both phones all the time.
This module acts as a “limited” SMS gateway: source phone number SIM (e.g. personal) is placed into a Huawei mobile broadband device which offers
SMS APIs.
The module scans incoming SMS and forwards them to a target phone number (e.g. work).
The detailed workflow is as follows:
npm install -g sms-forward
config.json.sample
to config.json
config.json
accordingly (see Configuration section)node index.js
config.json file shall contains the following keys/values:
Key | Default | Description |
---|---|---|
sms_target_number |
N/A | The phone number to which SMSs are forwarded. This shall be prefixed with international number (e.g. +33) and MUST NOT CONTAIN ANY WHITESPACES. e.g. “+33612345678 |
sms_scan_frequency |
N/A | SMS forwarding scan frequency in seconds. i.e. how often messages to be forwarded shall be checked. e.g. “30” (seconds) |
huawei_modem_ip |
N/A | The Huawei Modem’s IP. e.g. “192.168.1.1” |
huawei_modem_login |
N/A | Optional - The Huawei Modem’s login. e.g. “admin”. Some Huawei dongles require a login/password authentication (e.g. E355), others do not (e.g. E3372) |
huawei_modem_password |
N/A | Optional - The Huawei Modem’s login’s password. e.g. “admin” |
messages_retention_days |
N/A | Optional - Messages older than provided days will be deleted in order to free up messages space (which is limited on Huawei devices). e.g. “30” (days) |
macos_address_book_db_path |
N/A | Optional - needed for message’s originator’s name resolution. Path of your MacOS AddressBook to resolve message’s originator’s name from phone number. You can find a list of databases by running the following command in a terminal: find ~/Library/Application\ Support/AddressBook/ -name "AddressBook-v22.abcddb" -exec ls -rtlah {} + , pick the last one in the list. |
country |
N/A | Optional - needed for message’s originator’s name resolution. Your 2-letters ISO 3166-2 code country. e.g. “FR” for France, “GB” for United Kingdom. |
Configuration sample:
{
"sms_target_number": "+33612345678",
"sms_scan_frequency": 30,
"huawei_modem_ip": "192.168.1.1",
"huawei_modem_login": "admin",
"huawei_modem_password": "admin",
"messages_retention_days" : 30,
"macos_address_book_db_path": "/Users/<MY_USER>/Library/Application Support/AddressBook//Sources/DE540B1E-A3CF-4655-B1F6-6DDC0B42CD5F/AddressBook-v22.abcddb",
"country": "FR"
}
Incoming calls (voice) can easily be redirected by activating Call Forwarding.
i.e. all incoming calls (voice) are systematically forwarded to another mobile. This completely covers my use case, because the transfer will happen
no matter if the phone is OFF or the SIM not connected to cellular network.
SMS, however, is a different story. No telco operator (that I know of) offers a SMS Forwarding feature (the equivalent of Call Forwarding for SMS).
There are some options out there but none of them completely meets my requirements:
This module heavily relies on the material found in the following links: