Browse code

examples: moved to misc directory

Daniel-Constantin Mierla authored on 07/12/2016 13:56:54
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,27 +0,0 @@
1
-#
2
-# $Id$
3
-#
4
-# email notification to email address from mysql database
5
-#
6
-
7
-# ------------------ module loading ----------------------------------
8
-
9
-loadmodule "modules/exec/exec.so"
10
-loadmodule "modules/sl/sl.so"
11
-
12
-# send email if a request arrives
13
-route[0] {
14
-     if (!exec_msg('
15
-	QUERY="select email_address from subscriber 
16
-		where user=\"$SIP_OUSER\"";
17
-	EMAIL=`mysql  -Bsuser -pheslo -e "$QUERY" ser`;
18
-	if [ -z "$EMAIL" ] ; then exit 1; fi ;
19
-	echo "SIP request received from $SIP_HF_FROM for $SIP_OUSER" |
20
-	mail -s "request for you" $EMAIL ')) {
21
-		# exec returned error ... user does not exist
22
-		sl_send_reply("404", "User does not exist");
23
-	} else {
24
-		sl_send_reply("600", "No messages for this user");
25
-	};
26
-		
27
-}
Browse code

user_id changed to user

Jan Janak authored on 25/01/2003 14:59:15
Showing 1 changed files
... ...
@@ -13,7 +13,7 @@ loadmodule "modules/sl/sl.so"
13 13
 route[0] {
14 14
      if (!exec_msg('
15 15
 	QUERY="select email_address from subscriber 
16
-		where user_id=\"$SIP_OUSER\"";
16
+		where user=\"$SIP_OUSER\"";
17 17
 	EMAIL=`mysql  -Bsuser -pheslo -e "$QUERY" ser`;
18 18
 	if [ -z "$EMAIL" ] ; then exit 1; fi ;
19 19
 	echo "SIP request received from $SIP_HF_FROM for $SIP_OUSER" |
Browse code

new exec examples introduced

Jiri Kuthan authored on 05/01/2003 20:37:51
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,27 @@
1
+#
2
+# $Id$
3
+#
4
+# email notification to email address from mysql database
5
+#
6
+
7
+# ------------------ module loading ----------------------------------
8
+
9
+loadmodule "modules/exec/exec.so"
10
+loadmodule "modules/sl/sl.so"
11
+
12
+# send email if a request arrives
13
+route[0] {
14
+     if (!exec_msg('
15
+	QUERY="select email_address from subscriber 
16
+		where user_id=\"$SIP_OUSER\"";
17
+	EMAIL=`mysql  -Bsuser -pheslo -e "$QUERY" ser`;
18
+	if [ -z "$EMAIL" ] ; then exit 1; fi ;
19
+	echo "SIP request received from $SIP_HF_FROM for $SIP_OUSER" |
20
+	mail -s "request for you" $EMAIL ')) {
21
+		# exec returned error ... user does not exist
22
+		sl_send_reply("404", "User does not exist");
23
+	} else {
24
+		sl_send_reply("600", "No messages for this user");
25
+	};
26
+		
27
+}