diff --git a/modules/dispatcher/README b/modules/dispatcher/README
index a6dd931..86225b6 100644
--- a/modules/dispatcher/README
+++ b/modules/dispatcher/README
@@ -16,11 +16,11 @@
 
    ng-voice GmbH
 
-   Copyright � 2004 FhG FOKUS
+   Copyright � 2004 FhG FOKUS
 
-   Copyright � 2005 Voice Sistem
+   Copyright � 2005 Voice Sistem
 
-   Copyright � 2010 Daniel-Constantin Mierla (asipto.com)
+   Copyright � 2010 Daniel-Constantin Mierla (asipto.com)
      __________________________________________________________________
 
    Table of Contents
@@ -72,7 +72,7 @@
               4.3. ds_next_dst()
               4.4. ds_next_domain()
               4.5. ds_mark_dst([state])
-              4.6. ds_is_from_list([groupid [, uri, mode] ])
+              4.6. ds_is_from_list([groupid [, mode [, uri] ] ])
               4.7. ds_load_update()
               4.8. ds_load_unset()
 
diff --git a/modules/dispatcher/dispatcher.c b/modules/dispatcher/dispatcher.c
index 5356f2e..13f3f56 100644
--- a/modules/dispatcher/dispatcher.c
+++ b/modules/dispatcher/dispatcher.c
@@ -159,8 +159,9 @@
 
 static int w_ds_is_from_list0(struct sip_msg*, char*, char*);
 static int w_ds_is_from_list1(struct sip_msg*, char*, char*);
+static int w_ds_is_from_list2(struct sip_msg*, char*, char*);
 static int w_ds_is_from_list3(struct sip_msg*, char*, char*, char*);
-static int fixup_ds_is_from_list3(void** param, int param_no);
+static int fixup_ds_is_from_list(void** param, int param_no);
 
 static void destroy(void);
 
@@ -192,8 +193,10 @@
 		0, 0, REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
 	{"ds_is_from_list",  (cmd_function)w_ds_is_from_list1, 1,
 		fixup_igp_null, 0, ANY_ROUTE},
+	{"ds_is_from_list",  (cmd_function)w_ds_is_from_list2, 2,
+		fixup_ds_is_from_list, 0, ANY_ROUTE},
 	{"ds_is_from_list",  (cmd_function)w_ds_is_from_list3, 3,
-		fixup_ds_is_from_list3, 0, ANY_ROUTE},
+		fixup_ds_is_from_list, 0, ANY_ROUTE},
 	{"ds_load_unset",    (cmd_function)w_ds_load_unset,   0,
 		0, 0, ANY_ROUTE},
 	{"ds_load_update",   (cmd_function)w_ds_load_update,  0,
@@ -844,7 +847,26 @@
 	return ds_is_from_list(msg, s);
 }
 
-static int w_ds_is_from_list3(struct sip_msg *msg, char *set, char *uri, char *mode)
+static int w_ds_is_from_list2(struct sip_msg *msg, char *set, char *mode)
+{
+	int vset;
+	int vmode;
+
+	if(fixup_get_ivalue(msg, (gparam_t*)set, &vset)!=0)
+	{
+		LM_ERR("cannot get set id value\n");
+		return -1;
+	}
+	if(fixup_get_ivalue(msg, (gparam_t*)mode, &vmode)!=0)
+	{
+		LM_ERR("cannot get mode value\n");
+		return -1;
+	}
+
+	return ds_is_addr_from_list(msg, vset, NULL, vmode);
+}
+
+static int w_ds_is_from_list3(struct sip_msg *msg, char *set, char *mode, char *uri)
 {
 	int vset;
 	int vmode;
@@ -855,25 +877,26 @@
 		LM_ERR("cannot get set id value\n");
 		return -1;
 	}
-	if(fixup_get_svalue(msg, (gparam_t*)uri, &suri)!=0)
-	{
-		LM_ERR("cannot get uri value\n");
-		return -1;
-	}
 	if(fixup_get_ivalue(msg, (gparam_t*)mode, &vmode)!=0)
 	{
 		LM_ERR("cannot get mode value\n");
+		return -1;
+	}
+	if(fixup_get_svalue(msg, (gparam_t*)uri, &suri)!=0)
+	{
+		LM_ERR("cannot get uri value\n");
 		return -1;
 	}
 
 	return ds_is_addr_from_list(msg, vset, &suri, vmode);
 }
 
-static int fixup_ds_is_from_list3(void** param, int param_no)
+
+static int fixup_ds_is_from_list(void** param, int param_no)
 {
-	if(param_no==1 || param_no==3)
+	if(param_no==1 || param_no==2)
 		return fixup_igp_null(param, 1);
-	if(param_no==2)
+	if(param_no==3)
 		return fixup_spve_null(param, 1);
 	return 0;
 }
diff --git a/modules/dispatcher/doc/dispatcher_admin.xml b/modules/dispatcher/doc/dispatcher_admin.xml
index 5177a12..11c75ce 100644
--- a/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/modules/dispatcher/doc/dispatcher_admin.xml
@@ -994,7 +994,7 @@
  	</section>
   	<section  id="dispatcher.f.ds_is_from_list">
  		<title>
-		<function moreinfo="none">ds_is_from_list([groupid [, uri, mode] ])</function>
+		<function moreinfo="none">ds_is_from_list([groupid [, mode [, uri] ] ])</function>
  		</title>
  		<para>
 		This function returns true, if there is a match of source address or uri
@@ -1011,17 +1011,6 @@
 			</para>
 		</listitem>
 		<listitem>
-			<para><emphasis>uri</emphasis> (optional) - if is empty or missing,
-				the matching is done against source IP, port and protocol.
-				Otherwise the value has to be a valid SIP URI, used to match
-				against addresses in the dispatcher list. Only IP, port and
-				protocol are matches, any additional parameters are ignored.
-				The parameter can be a static or dynamic (with variables)
-				string. The domain part of the URI can be an IP address or
-				a hostname.
-			</para>
-		</listitem>
-		<listitem>
 			<para><emphasis>mode</emphasis> - (optional) - a bitmask to specify
 				how the matching should be done. If is 0, all ip, port and
 				proto are matched. If bit one is set, then port is ignored.
@@ -1030,6 +1019,17 @@
 				It must be provided if the uri parameter is provided.
 			</para>
 		</listitem>
+        <listitem>
+            <para><emphasis>uri</emphasis> (optional) - if is empty or missing,
+                the matching is done against source IP, port and protocol.
+                Otherwise the value has to be a valid SIP URI, used to match
+                against addresses in the dispatcher list. Only IP, port and
+                protocol are matches, any additional parameters are ignored.
+                The parameter can be a static or dynamic (with variables)
+                string. The domain part of the URI can be an IP address or
+                a hostname.
+            </para>
+        </listitem>
 		</itemizedlist>
 
 		<para>
