**>Date: Wed, 26 Jan 2005 12:33:03 +0100 (CET) **>Subject: different shortcodes possible ? **>From: <[EMAIL PROTECTED]> **>To: <[email protected]> **> **>Hello all, **> **> **>We have a working kannel configuration for several smsc's with several **>services for a number of keywords. This all works on an active shortcode **>(4 digit). I was wondering how i could best implement another shortcode **>into this existing configuration. The problem is that some defined **>keywords (like NEW or LIST) are already in use for one shortcode. So how **>do you make it clear to kannel that he has to act different for keyword **>NEW according to the shortcode the sms was sent to ?What's the best way to have several different shortcodes in one kannel **>config ...? **>Any advice greatly appreciated,
Limit access to the sms-service by specifying the allowed receiving numbers/short-codes using the "allowed-receiver-prefix" parameter. For example: ### Service: Return General Tech News group = sms-service keyword = NEW allowed-receiver-prefix = "8324" file = "new_tech_news" ### Service: Return General Sports News group = sms-service keyword = NEW allowed-receiver-prefix = "77678" file = "new_sport_news" If an MO SMS comes in with the content "NEW" and was sent to the short code "8324" then and MT SMS will be sent by Kannel with the contents of the file "new_tech_news". If the MO SMS was sent to the short code "77678", then the contents of the file "new_sport_news" will be sent. You can even get trickier with the definitions and specify only different services based on the origination address via an "allowed-prefix" list: ### Service: Return Sports News for Ohio (prefix 1216 and 1614) group = sms-service keyword = NEW allowed-prefix = "1216;1614" allowed-receiver-prefix = "77678" file = "new_OH_sport_news" ### Service: Return Sports News for California (prefix 1415 and 1605) group = sms-service keyword = NEW allowed-prefix = "1415;1605" allowed-receiver-prefix = "77678" file = "new_CA_sport_news" ### Service: Return General Sports News group = sms-service keyword = NEW allowed-receiver-prefix = "77678" file = "new_sport_news" ### Service: Return General Tech News group = sms-service keyword = NEW allowed-receiver-prefix = "8324" file = "new_tech_news" The only problem with this technique is that you need to restart the smsbox everytime you add another shortcode or service definition. I would suggest you put the logic into your backend system and have it parse the SMS for the Destination Address (short-code), Origination Address (sender's phonenumber) and SMS content. Just setup a default sms-service and make it do a post-url to your backend (and don't forget to set the "send-sender" parameter to "true"). You can then have Kannel just routing SMS for you. See ya... d.c.
