문제

I would like someone experience with kannel to enlighten me please.

I currently run a little site that revolves around sending and receiving SMS. I am using Kannel as SMS Gateway, One feature that I like to have in it is Priority based Queuing of my SMS to be sent.

The work around that me and my colleague have come up with is to write an intermediary program, to which we will send our SMS to be sent, it will manage it's own queue and will in turn handle them to kannel Priority wise.

It will store SMS to MySQL database for persistence and would be done in PHP.

I just want to be sure that this is a good way to solve our problem and I want to open source it so other peoples can benefit.

Many thanks.

도움이 되었습니까?

해결책

Kannel itself does not support message priority in internal queue.

However you can use sqlbox addon (included in Kannel 1.5.0 release - see "addons/sqlbox" catalog).

This case you can make simple changes in the following way:

  1. Add "my_prio" field to table structure.
  2. Change original fetching SQL query to order messages by this field (SELECT ... ORDER BY my_prio).
  3. Insert MT messages with appropriate value of this "my_prio" field.

All mentioned changes may be done in "addons/sqlbox/gw/sqlbox_mysql.h" file.

다른 팁

I posted this question on Kannel-dev mailing list and I came to know that Kannel does implement basic priority scheduling on outgoing SMS. It was hard to find, because, we all know an easy to understand "User Guide" is not kannel's strength.

However, if you go to Kannel User Guide, and read under the "Using the HTTP interface to send SMS messages" section, you will find that you can set an optional parameter "priority" while sending GET request to kannel to send SMS:

priority | number | Optional. Sets the Priority value (range 0-3 is allowed). (Defaults to 0, which is the lowest priority).

I hope this helps, however, I don't know yet how it internally works, does it implements aging so low priority messages don't starve etc. I have raised the question on mailing list but still no response, if any one has more information on this please update us.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top