Friday, July 26, 2019

Ubuntu 18 : Kannel : Sendsms failed : Connection refused

accessing the sendsms function returns "failed: Connection refused."

a telnet to the smsbox port has a similar response, which means no service is accessible on that port
allowing the port on the firewall still returns the same status

tail on the bearer box log shows:
INFO: ----------------------------------------
INFO: Kannel bearerbox II version 1.4.4 starting
INFO: MAIN: Start-up done, entering mainloop
INFO: AT2[xxxxxxxxxxx]: Logging in
INFO: AT2[xxxxxxxxxxx]: init device
INFO: AT2[xxxxxxxxxxx]: speed set to 115200
INFO: AT2[xxxxxxxxxxx]: Phase 2+ is supported
INFO: AT2[xxxxxxxxxxx]: AT SMSC successfully opened.

compared to a working installation, it's missing a "INFO: Client connected from <127 .0.0.1="">" message. hmmm... something is not running. looks like the smsbox is not starting by default.

modify /etc/defaults/kannel to enable smsbox
#START_WAPBOX=1
START_SMSBOX=1

restarting the service now shows:
INFO: ----------------------------------------
INFO: Kannel bearerbox II version 1.4.4 starting
INFO: MAIN: Start-up done, entering mainloop
INFO: AT2[xxxxxxxxxxx]: Logging in
INFO: AT2[xxxxxxxxxxx]: init device
INFO: AT2[xxxxxxxxxxx]: speed set to 115200
INFO: AT2[xxxxxxxxxxx]: Phase 2+ is supported
INFO: AT2[xxxxxxxxxxx]: AT SMSC successfully opened.
INFO: Client connected from <127 .0.0.1="">

a telnet test to the smsbox port connects!
sendsms works!</127></127>

1 comment:

  1. Good job noting this! Tried searching the net for an hour for the same issue. Kudos to you!

    ReplyDelete

SSH : No matching host key type found. Their offer: ssh-rsa,ssh-dss

Got this while connecting to my mikrotik router via ssh   Unable to negotiate with <ip address> port <ssh port>: no matching hos...