Wednesday, May 20, 2009

Kannel HTTP Connection


I had to configured an HTTP connection for Kannel today. Below is the way you have to configured the config file:

group = smsc
smsc = http
smsc-id = http_connection
system-type = kannel
smsc-username = tester
smsc-password = foobar
port = 11030
send-url = "http://localhost:9090/outgoingmessage"

Once you configured this part, my biggest question was, how you will send the MO (incoming message) to kannel. It's implied that the MT will be using the "send-url".

Later I found out from my friend Stipe Tolj (best Telco consultant and one of the senior developers of Kannel) that it does not matter. You can do the following to send the MO:
http://localhost:11030/?username=tester&password=foobar&from=1234567890&to=4444&text=Hello

The only thing you need to use is the port for the configuration, username, and password. Then, you use the same syntax as the sendsms api. You also need to make sure you can access this port. You can always use the iptables syntaxt below:
iptables -I RH-Firewall-1-INPUT -p tcp -m tcp --dport 11030 -j ACCEPT

No comments:

Post a Comment