Index: gw/urltrans.c
===================================================================
--- gw/urltrans.c	(revision 4837)
+++ gw/urltrans.c	(working copy)
@@ -868,7 +868,7 @@
     Octstr *url, *post_url, *post_xml, *text, *file, *exec;
     Octstr *accepted_smsc, *accepted_account, *forced_smsc, *default_smsc;
     Octstr *grpname;
-    int is_sms_service;
+    int is_sms_service, regex_flag = REG_EXTENDED;
     Octstr *accepted_smsc_regex;
     Octstr *accepted_account_regex;
     Octstr *allowed_prefix_regex;
@@ -970,7 +970,7 @@
 	    Octstr *aliases;
 	    
 	    /* convert to regex */
-            octstr_convert_range(tmp, 0, octstr_len(tmp), tolower);
+        regex_flag |= REG_ICASE;
 	    keyword_regex = octstr_format("^[ ]*(%S", tmp);
 	    octstr_destroy(tmp);
 
@@ -984,7 +984,6 @@
 	        
 	        for (i = 0; i < gwlist_len(l); ++i) {
 	            os = gwlist_get(l, i);
-	            octstr_convert_range(os, 0, octstr_len(os), tolower);
 	            octstr_format_append(keyword_regex, "|%S", os);
 	        }
 	        gwlist_destroy(l, octstr_destroy_item);
@@ -993,7 +992,7 @@
 	    octstr_append_cstr(keyword_regex, ")[ ]*");
 	}
 
-        if (keyword_regex != NULL && (ot->keyword_regex = gw_regex_comp(keyword_regex, REG_EXTENDED)) == NULL) {
+        if (keyword_regex != NULL && (ot->keyword_regex = gw_regex_comp(keyword_regex, regex_flag)) == NULL) {
             error(0, "Could not compile pattern '%s'", octstr_get_cstr(keyword_regex));
             octstr_destroy(keyword_regex);
             goto error;
@@ -1353,11 +1352,12 @@
         if (gw_regex_match_pre(t->keyword_regex, msg) == 1) {
             debug("", 0, "match found: %s", octstr_get_cstr(t->name));
             gwlist_append(list, t);
-        } else {
-            debug("", 0, "no match found: %s", octstr_get_cstr(t->name));
         }
     }
-    
+
+    if (!gwlist_len(list))
+       debug("", 0, "no match found: \"%s\"", octstr_get_cstr(msg));
+
     return list;
 }
 
@@ -1373,7 +1373,6 @@
 
     /* convert tolower and try to match */
     data = octstr_duplicate(msg->sms.msgdata);
-    octstr_convert_range(data, 0, octstr_len(data), tolower);
     i = 0;
     while((i = octstr_search_char(data, 0, i)) != -1 && i < octstr_len(data) - 1) {
         octstr_delete(data, i, 1);
Index: doc/userguide/userguide.xml
===================================================================
--- doc/userguide/userguide.xml	(revision 4837)
+++ doc/userguide/userguide.xml	(working copy)
@@ -6032,17 +6032,16 @@
          number of `%s' fields in the URL. This allows you to
         configure the gateway to use different URLs for the same
         keyword depending on the number of words the SMS message
-        contains. The keyword matches in non-case sensitive manner,
-		  which means you don't have to use aliases to handle different
-		  cased versions of your keyword.
+        contains. The keyword is case insensitive, which means you don't
+        have to use aliases to handle different cased versions of your keyword.
      </entry></row>
 
    <row><entry><literal>keyword-regex</literal></entry>
      <entry>POSIX regular expression</entry>
      <entry valign="bottom">
      This field may be used to enable service-selection based on a regular expression.
-     If this field is defined for a service, then the selection will rely on the regex only, never taking
-     the literal <literal>keyword</literal> into account.
+     You can define either keyword or keyword-regex in configuration, but not both in
+     the same sms-service. keyword-regex is case sensitive.
      See section on <xref linkend="regular-expressions"> for details.
    </entry></row>
 
@@ -6050,7 +6049,8 @@
      <entry>word-list</entry>
      <entry valign="bottom">
         If the service has aliases, they are listed as a list with 
-        each entry separated with a semicolon (';')
+        each entry separated with a semicolon (';'). Aliases are case
+        insensitive just like keyword.
 
      </entry></row>
 
