|
@@ -269,9 +269,10 @@ route{
|
|
}
|
|
}
|
|
|
|
|
|
# requests for my domain
|
|
# requests for my domain
|
|
-
|
|
|
|
|
|
+
|
|
/* uncomment this if you want to enable presence server
|
|
/* uncomment this if you want to enable presence server
|
|
- and comment the next 'if' block */
|
|
|
|
|
|
+ and comment the next 'if' block
|
|
|
|
+ NOTE: uncomment also the definition of route[2] from below */
|
|
##if( is_method("PUBLISH|SUBSCRIBE"))
|
|
##if( is_method("PUBLISH|SUBSCRIBE"))
|
|
## route(2);
|
|
## route(2);
|
|
|
|
|
|
@@ -346,27 +347,30 @@ route[1] {
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
# Presence route
|
|
# Presence route
|
|
-route[2]
|
|
|
|
-{
|
|
|
|
- if (!t_newtran())
|
|
|
|
- {
|
|
|
|
- sl_reply_error();
|
|
|
|
- exit;
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- if(is_method("PUBLISH"))
|
|
|
|
- {
|
|
|
|
- handle_publish();
|
|
|
|
- t_release();
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- if( is_method("SUBSCRIBE"))
|
|
|
|
- {
|
|
|
|
- handle_subscribe();
|
|
|
|
- t_release();
|
|
|
|
- }
|
|
|
|
|
|
+/* uncomment the whole following route for enabling presence
|
|
|
|
+ NOTE: do not forget to enable the call of this route from the main
|
|
|
|
+ route */
|
|
|
|
+##route[2]
|
|
|
|
+##{
|
|
|
|
+## if (!t_newtran())
|
|
|
|
+## {
|
|
|
|
+## sl_reply_error();
|
|
|
|
+## exit;
|
|
|
|
+## };
|
|
|
|
+##
|
|
|
|
+## if(is_method("PUBLISH"))
|
|
|
|
+## {
|
|
|
|
+## handle_publish();
|
|
|
|
+## t_release();
|
|
|
|
+## }
|
|
|
|
+## else
|
|
|
|
+## if( is_method("SUBSCRIBE"))
|
|
|
|
+## {
|
|
|
|
+## handle_subscribe();
|
|
|
|
+## t_release();
|
|
|
|
+## }
|
|
|
|
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|