You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by dr...@apache.org on 2018/10/12 13:00:21 UTC
[08/15] incubator-unomi git commit: commit poc
commit poc
Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/1403a9a4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/1403a9a4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/1403a9a4
Branch: refs/heads/UNOMI-204
Commit: 1403a9a44cc5a548a216bab98586f66d11cc8360
Parents: 2b838a6
Author: dgaillard <dg...@jahia.com>
Authored: Mon Oct 8 17:51:49 2018 +0200
Committer: dgaillard <dg...@jahia.com>
Committed: Mon Oct 8 17:51:49 2018 +0200
----------------------------------------------------------------------
extensions/twilio/README.md | 43 +++++++++
extensions/twilio/core/.gitignore | 3 +
extensions/twilio/core/pom.xml | 81 +++++++++++++++++
.../unomi/twilio/actions/TwilioCallAction.java | 91 ++++++++++++++++++++
.../META-INF/cxs/actions/twilioCall.json | 21 +++++
.../META-INF/cxs/rules/callVisitorTwilio.json | 44 ++++++++++
.../resources/OSGI-INF/blueprint/blueprint.xml | 44 ++++++++++
.../main/resources/org.apache.unomi.twilio.cfg | 25 ++++++
extensions/twilio/karaf-kar/pom.xml | 79 +++++++++++++++++
.../karaf-kar/src/main/feature/feature.xml | 28 ++++++
extensions/twilio/pom.xml | 36 ++++++++
.../web-tracker/wab/src/main/webapp/voice.xml | 5 ++
12 files changed, 500 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1403a9a4/extensions/twilio/README.md
----------------------------------------------------------------------
diff --git a/extensions/twilio/README.md b/extensions/twilio/README.md
new file mode 100644
index 0000000..8ade7ee
--- /dev/null
+++ b/extensions/twilio/README.md
@@ -0,0 +1,43 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+
+Apache Unomi Web Tracker
+=================================
+
+This extension is providing the web tracker to start collecting visitors data on your website.
+The tracker is implemented as an integration of [analytics.js](https://github.com/segmentio/analytics.js) for Unomi.
+
+## Getting started
+
+Extension can be tested at : `http://localhost:8181/tracker/index.html`
+
+In your page include unomiOptions and include code snippet from `snippet.min.js` :
+
+```html
+<script type="text/javascript">
+ var unomiOption = {
+ scope: 'realEstateManager',
+ url: 'http://localhost:8181'
+ };
+ window.unomiTracker||(window.unomiTracker={}),function(){for(var e=[],r=["trackSubmit","trackClick","trackLink","trackForm","initialize","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"],n=0;n<r.length;n++){var t=r[n];window.unomiTracker[t]=function(r){return function(){var n=Array.prototype.slice.call(arguments);return n.unshift(r),e.push(n),window.unomiTracker}}(t)}unomiTracker.load=function(e,r){var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=r.url+"/tracker/javascript/unomi-tracker.js",n.addEventListener?n.addEventListener("load",function(r){"function"==typeof e&&e(r)},!1):n.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||e(window.event)};var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(n,t)},unomiTracker.load(function(r){for(unomiTracker.initialize({"Apache Unomi":r});e.length>0;){var n=e.shift(),t=n.shift();unomiTracker[t]&&unom
iTracker[t].apply(unomiTracker,n)}},unomiOption),unomiTracker.page()}();
+</script>
+```
+
+`window.unomiTracker` can be used to send additional events when needed.
+
+Check analytics.js API [here](https://segment.com/docs/sources/website/analytics.js/). All methods can be used on `unomiTracker` object, although not all event types are supported by Unomi intergation.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1403a9a4/extensions/twilio/core/.gitignore
----------------------------------------------------------------------
diff --git a/extensions/twilio/core/.gitignore b/extensions/twilio/core/.gitignore
new file mode 100644
index 0000000..6ade2e9
--- /dev/null
+++ b/extensions/twilio/core/.gitignore
@@ -0,0 +1,3 @@
+node_modules
+yarn-error.log
+src/main/webapp/dist
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1403a9a4/extensions/twilio/core/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/twilio/core/pom.xml b/extensions/twilio/core/pom.xml
new file mode 100755
index 0000000..dbb462e
--- /dev/null
+++ b/extensions/twilio/core/pom.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.unomi</groupId>
+ <artifactId>unomi-web-tracker</artifactId>
+ <version>1.4.0-incubating-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>unomi-web-tracker-wab</artifactId>
+ <name>Apache Unomi :: Extension :: Web Tracker :: Wab</name>
+ <description>This is a simple Apache Unomi plugin.</description>
+ <packaging>bundle</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.unomi</groupId>
+ <artifactId>unomi-api</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient-osgi</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore-osgi</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <_wab>src/main/webapp</_wab>
+ <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
+ <Import-Package>
+ *
+ </Import-Package>
+ <Web-ContextPath>/tracker</Web-ContextPath>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+
+ <resources>
+ <resource><directory>../javascript/dist</directory></resource>
+ </resources>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1403a9a4/extensions/twilio/core/src/main/java/org/apache/unomi/twilio/actions/TwilioCallAction.java
----------------------------------------------------------------------
diff --git a/extensions/twilio/core/src/main/java/org/apache/unomi/twilio/actions/TwilioCallAction.java b/extensions/twilio/core/src/main/java/org/apache/unomi/twilio/actions/TwilioCallAction.java
new file mode 100644
index 0000000..b13fccd
--- /dev/null
+++ b/extensions/twilio/core/src/main/java/org/apache/unomi/twilio/actions/TwilioCallAction.java
@@ -0,0 +1,91 @@
+/*
+
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+*/
+
+package org.apache.unomi.twilio.actions;
+
+import com.twilio.Twilio;
+import com.twilio.rest.api.v2010.account.Call;
+import com.twilio.type.PhoneNumber;
+import org.apache.unomi.api.Event;
+import org.apache.unomi.api.actions.Action;
+import org.apache.unomi.api.actions.ActionExecutor;
+import org.apache.unomi.api.services.EventService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Map;
+
+/**
+ * @author dgaillard
+ */
+public class TwilioCallAction implements ActionExecutor {
+ private static Logger logger = LoggerFactory.getLogger(TwilioCallAction.class);
+
+// public static final String DEMO_VOICE_URL = "http://demo.twilio.com/docs/voice.xml";
+ public static final String DEMO_VOICE_URL = "http://6cebf511.eu.ngrok.io/tracker/voice.xml";
+ private static final String VISITOR_PHONE_NUMBER = "visitorPhoneNumber";
+
+ private String twilioAccountSid;
+ private String twilioAuthToken;
+ private String twilioPhoneNumber;
+
+ @Override public int execute(Action action, Event event) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Execute action {} for event id {} and type {}", TwilioCallAction.class.getName(), event.getItemId(), event.getEventType());
+ }
+
+ Map<String, Object> parameterValues = action.getParameterValues();
+ if (!parameterValues.containsKey(VISITOR_PHONE_NUMBER)) {
+ logger.warn("Could not execute action, missing mandatory parameter {}, event id = {}", VISITOR_PHONE_NUMBER, event.getItemId());
+ return EventService.NO_CHANGE;
+ }
+
+ Twilio.init(twilioAccountSid, twilioAuthToken);
+
+ URI textUrl;
+ try {
+ textUrl = new URI(DEMO_VOICE_URL);
+ } catch (URISyntaxException e) {
+ logger.error("Error when building URI with response URL = {}", "http://localhost:8181/cxs/twilio/validate");
+ return EventService.NO_CHANGE;
+ }
+
+ Call call = Call.creator(new PhoneNumber(parameterValues.get(VISITOR_PHONE_NUMBER).toString()), new PhoneNumber(twilioPhoneNumber), textUrl).create();
+
+ logger.info(call.getSid());
+
+ if (logger.isDebugEnabled()) {
+ logger.debug("Action {} is done for event id {} and type {}", TwilioCallAction.class.getName(), event.getItemId(), event.getEventType());
+ }
+ return EventService.NO_CHANGE;
+ }
+
+ public void setTwilioAccountSid(String twilioAccountSid) {
+ this.twilioAccountSid = twilioAccountSid;
+ }
+
+ public void setTwilioAuthToken(String twilioAuthToken) {
+ this.twilioAuthToken = twilioAuthToken;
+ }
+
+ public void setTwilioPhoneNumber(String twilioPhoneNumber) {
+ this.twilioPhoneNumber = twilioPhoneNumber;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1403a9a4/extensions/twilio/core/src/main/resources/META-INF/cxs/actions/twilioCall.json
----------------------------------------------------------------------
diff --git a/extensions/twilio/core/src/main/resources/META-INF/cxs/actions/twilioCall.json b/extensions/twilio/core/src/main/resources/META-INF/cxs/actions/twilioCall.json
new file mode 100755
index 0000000..13cd438
--- /dev/null
+++ b/extensions/twilio/core/src/main/resources/META-INF/cxs/actions/twilioCall.json
@@ -0,0 +1,21 @@
+{
+ "metadata": {
+ "id": "twilioCallAction",
+ "name": "Call Visitor with Twilio",
+ "description": "This action will call the visitor with Twilio",
+ "systemTags": [
+ "event",
+ "availableToEndUser",
+ "hasNoTemplate"
+ ],
+ "readOnly": true
+ },
+ "actionExecutor": "twilioCall",
+ "parameters": [
+ {
+ "id": "phoneNumber",
+ "type": "string",
+ "multivalued": false
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1403a9a4/extensions/twilio/core/src/main/resources/META-INF/cxs/rules/callVisitorTwilio.json
----------------------------------------------------------------------
diff --git a/extensions/twilio/core/src/main/resources/META-INF/cxs/rules/callVisitorTwilio.json b/extensions/twilio/core/src/main/resources/META-INF/cxs/rules/callVisitorTwilio.json
new file mode 100644
index 0000000..bbc7ba5
--- /dev/null
+++ b/extensions/twilio/core/src/main/resources/META-INF/cxs/rules/callVisitorTwilio.json
@@ -0,0 +1,44 @@
+{
+ "metadata": {
+ "id": "callVisitorTwilio",
+ "name": "Call visitor with Twilio",
+ "description": "Call a visitor with Twilio when receiving a requestCall event"
+ },
+ "condition": {
+ "parameterValues": {
+ "subConditions": [
+ {
+ "type": "eventTypeCondition",
+ "parameterValues": {
+ "eventTypeId": "requestCall"
+ }
+ },
+ {
+ "type": "eventPropertyCondition",
+ "parameterValues": {
+ "eventProperty": "requestCall",
+ "operator": "exist"
+ }
+ }
+ ],
+ "operator": "and"
+ },
+ "type": "booleanCondition"
+ },
+ "actions": [
+ {
+ "parameterValues": {
+ "setPropertyName": "properties.phoneNumber",
+ "setPropertyValue": "eventProperty::target.properties(phoneNumber)",
+ "storeInSession": false
+ },
+ "type": "setPropertyAction"
+ },
+ {
+ "parameterValues": {
+ "visitorPhoneNumber": "eventProperty::target.properties(phoneNumber)"
+ },
+ "type": "twilioCallAction"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1403a9a4/extensions/twilio/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
----------------------------------------------------------------------
diff --git a/extensions/twilio/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/extensions/twilio/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
new file mode 100755
index 0000000..e21d744
--- /dev/null
+++ b/extensions/twilio/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<blueprint xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
+ xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+ <!-- cfg configuration -->
+ <cm:property-placeholder persistent-id="org.apache.unomi.weatherupdate"
+ update-strategy="reload">
+ <cm:default-properties>
+ <cm:property name="weatherUpdate.apiKey" value=""/>
+ <cm:property name="weatherUpdate.url.base" value=""/>
+ <cm:property name="weatherUpdate.url.attributes" value=""/>
+ </cm:default-properties>
+ </cm:property-placeholder>
+
+ <!-- Action executor -->
+ <service interface="org.apache.unomi.api.actions.ActionExecutor">
+ <service-properties>
+ <entry key="actionExecutorId" value="weatherUpdate"/>
+ </service-properties>
+ <bean class="org.apache.unomi.weatherupdate.actions.WeatherUpdateAction">
+ <property name="weatherApiKey" value="${weatherUpdate.apiKey}"/>
+ <property name="weatherUrlBase" value="${weatherUpdate.url.base}"/>
+ <property name="weatherUrlAttributes" value="${weatherUpdate.url.attributes}"/>
+ </bean>
+ </service>
+</blueprint>
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1403a9a4/extensions/twilio/core/src/main/resources/org.apache.unomi.twilio.cfg
----------------------------------------------------------------------
diff --git a/extensions/twilio/core/src/main/resources/org.apache.unomi.twilio.cfg b/extensions/twilio/core/src/main/resources/org.apache.unomi.twilio.cfg
new file mode 100644
index 0000000..33c7bea
--- /dev/null
+++ b/extensions/twilio/core/src/main/resources/org.apache.unomi.twilio.cfg
@@ -0,0 +1,25 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Twilio API credentials
+# Found at https://www.twilio.com/user/account/voice
+twilio.accountSid=ACe34cc2867d574f19e59575f393da60b6
+twilio.authToken=0d29358240b7be93eed6b6a3b14aa759
+
+# Twilio phone number
+# Purchase one at https://www.twilio.com/user/account/phone-numbers
+twilio.phoneNumber=+33644644570
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1403a9a4/extensions/twilio/karaf-kar/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/twilio/karaf-kar/pom.xml b/extensions/twilio/karaf-kar/pom.xml
new file mode 100644
index 0000000..5826931
--- /dev/null
+++ b/extensions/twilio/karaf-kar/pom.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.apache.unomi</groupId>
+ <artifactId>unomi-web-tracker</artifactId>
+ <version>1.4.0-incubating-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>unomi-web-tracker-karaf-kar</artifactId>
+ <name>Apache Unomi :: Extension :: Web Tracker :: Apache Karaf Feature and KAR archive</name>
+ <description>This is a simple Apache Unomi plugin.</description>
+ <packaging>kar</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.unomi</groupId>
+ <artifactId>unomi-api</artifactId>
+ <version>1.4.0-incubating-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore-osgi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient-osgi</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.unomi</groupId>
+ <artifactId>unomi-web-tracker-wab</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <includeTransitiveDependency>false</includeTransitiveDependency>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <configuration>
+ <startLevel>85</startLevel>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1403a9a4/extensions/twilio/karaf-kar/src/main/feature/feature.xml
----------------------------------------------------------------------
diff --git a/extensions/twilio/karaf-kar/src/main/feature/feature.xml b/extensions/twilio/karaf-kar/src/main/feature/feature.xml
new file mode 100644
index 0000000..cc72fd0
--- /dev/null
+++ b/extensions/twilio/karaf-kar/src/main/feature/feature.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.1" name="unomi-web-tracker-karaf-feature">
+ <feature name="unomi-web-tracker-karaf-kar" version="${project.version}"
+ description="Apache Unomi :: Extensions :: Web Tracker :: Apache Karaf Feature">
+ <details>Apache Karaf feature for the Apache Unomi Context Server extension that provide the web tracker.</details>
+ <!--<configfile finalname="/etc/org.apache.unomi.webTracker.cfg">mvn:org.apache.unomi/unomi-weather-update-core/${project-->
+ <!--.version}/cfg/weatherupdatecfg</configfile>-->
+ <bundle start-level="85">mvn:org.apache.httpcomponents/httpcore-osgi/${httpcore-osgi.version}</bundle>
+ <bundle start-level="85">mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient-osgi.version}</bundle>
+ <bundle start-level="85">mvn:org.apache.unomi/unomi-web-tracker-wab/${project.version}</bundle>
+ </feature>
+</features>
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1403a9a4/extensions/twilio/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/twilio/pom.xml b/extensions/twilio/pom.xml
new file mode 100644
index 0000000..efa80d8
--- /dev/null
+++ b/extensions/twilio/pom.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.unomi</groupId>
+ <artifactId>unomi-extensions</artifactId>
+ <version>1.4.0-incubating-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>unomi-web-tracker</artifactId>
+ <name>Apache Unomi :: Extension :: Web Tracker</name>
+ <description>Apache Unomi Context Server to provide the web tracker</description>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>wab</module>
+ <module>karaf-kar</module>
+ </modules>
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1403a9a4/extensions/web-tracker/wab/src/main/webapp/voice.xml
----------------------------------------------------------------------
diff --git a/extensions/web-tracker/wab/src/main/webapp/voice.xml b/extensions/web-tracker/wab/src/main/webapp/voice.xml
new file mode 100644
index 0000000..3561943
--- /dev/null
+++ b/extensions/web-tracker/wab/src/main/webapp/voice.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Response>
+ <Say voice="alice">Thanks for reaching out Real Estate Manager Support. Please be patient we will connect you shortly!</Say>
+ <Play>http://demo.twilio.com/docs/classic.mp3</Play>
+</Response>
\ No newline at end of file