Skip to content

Commit

Permalink
Baselined from internal Repository
Browse files Browse the repository at this point in the history
last_commit:b869e25deabec90fdf72b999a50a8c7aa857c477
  • Loading branch information
GVE Devnet Admin committed Apr 26, 2024
0 parents commit 43720d7
Show file tree
Hide file tree
Showing 35 changed files with 1,042 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
53 changes: 53 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Docker Build & Publish

on:
push:
branches:
- main
- master
tags:
- '*'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}


jobs:
push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf

- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
45 changes: 45 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as maintainers of this Cisco Sample Code pledge to making participation with our project a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Showing empathy towards other people

Examples of unacceptable behavior include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other interactions with this project that are not aligned to this Code of Conduct, or to ban temporarily or permanently any person for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project. Examples of representing a project include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Cisco SE GitHub team at ciscose-github@cisco.com. The team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project or Cisco SE Leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Cisco Sample Code

This project, and the code contained herein, is provided for example and/or demonstration purposes by Cisco for use by our partners and customers in working with Cisco's products and services. While Cisco's customers and partners are free to use this code pursuant to the terms set forth in the [LICENSE][LICENSE], this is not an Open Source project as we are not seeking to build a community around this project and its capabilities.


We do desire to provide functional and high-quality examples and demonstrations. If you should discover some bug, issue, or opportunity for enhancement with the code contained in this project, please do notify us by:

1. **Reviewing Open Issues** to verify that the issue hasn't already been reported.
2. **Opening a New Issue** to report the bug, issue, or enhancement opportunity.

[LICENSE]: ../LICENSE
Binary file added IMAGES/0image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IMAGES/launch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 81 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
CISCO SAMPLE CODE LICENSE
Version 1.1
Copyright (c) 2020 Cisco and/or its affiliates

These terms govern this Cisco Systems, Inc. ("Cisco"), example or demo
source code and its associated documentation (together, the "Sample
Code"). By downloading, copying, modifying, compiling, or redistributing
the Sample Code, you accept and agree to be bound by the following terms
and conditions (the "License"). If you are accepting the License on
behalf of an entity, you represent that you have the authority to do so
(either you or the entity, "you"). Sample Code is not supported by Cisco
TAC and is not tested for quality or performance. This is your only
license to the Sample Code and all rights not expressly granted are
reserved.

1. LICENSE GRANT: Subject to the terms and conditions of this License,
Cisco hereby grants to you a perpetual, worldwide, non-exclusive, non-
transferable, non-sublicensable, royalty-free license to copy and
modify the Sample Code in source code form, and compile and
redistribute the Sample Code in binary/object code or other executable
forms, in whole or in part, solely for use with Cisco products and
services. For interpreted languages like Java and Python, the
executable form of the software may include source code and
compilation is not required.

2. CONDITIONS: You shall not use the Sample Code independent of, or to
replicate or compete with, a Cisco product or service. Cisco products
and services are licensed under their own separate terms and you shall
not use the Sample Code in any way that violates or is inconsistent
with those terms (for more information, please visit:
www.cisco.com/go/terms).

3. OWNERSHIP: Cisco retains sole and exclusive ownership of the Sample
Code, including all intellectual property rights therein, except with
respect to any third-party material that may be used in or by the
Sample Code. Any such third-party material is licensed under its own
separate terms (such as an open source license) and all use must be in
full accordance with the applicable license. This License does not
grant you permission to use any trade names, trademarks, service
marks, or product names of Cisco. If you provide any feedback to Cisco
regarding the Sample Code, you agree that Cisco, its partners, and its
customers shall be free to use and incorporate such feedback into the
Sample Code, and Cisco products and services, for any purpose, and
without restriction, payment, or additional consideration of any kind.
If you initiate or participate in any litigation against Cisco, its
partners, or its customers (including cross-claims and counter-claims)
alleging that the Sample Code and/or its use infringe any patent,
copyright, or other intellectual property right, then all rights
granted to you under this License shall terminate immediately without
notice.

4. LIMITATION OF LIABILITY: CISCO SHALL HAVE NO LIABILITY IN CONNECTION
WITH OR RELATING TO THIS LICENSE OR USE OF THE SAMPLE CODE, FOR
DAMAGES OF ANY KIND, INCLUDING BUT NOT LIMITED TO DIRECT, INCIDENTAL,
AND CONSEQUENTIAL DAMAGES, OR FOR ANY LOSS OF USE, DATA, INFORMATION,
PROFITS, BUSINESS, OR GOODWILL, HOWEVER CAUSED, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

5. DISCLAIMER OF WARRANTY: SAMPLE CODE IS INTENDED FOR EXAMPLE PURPOSES
ONLY AND IS PROVIDED BY CISCO "AS IS" WITH ALL FAULTS AND WITHOUT
WARRANTY OR SUPPORT OF ANY KIND. TO THE MAXIMUM EXTENT PERMITTED BY
LAW, ALL EXPRESS AND IMPLIED CONDITIONS, REPRESENTATIONS, AND
WARRANTIES INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTY OR
CONDITION OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-
INFRINGEMENT, SATISFACTORY QUALITY, NON-INTERFERENCE, AND ACCURACY,
ARE HEREBY EXCLUDED AND EXPRESSLY DISCLAIMED BY CISCO. CISCO DOES NOT
WARRANT THAT THE SAMPLE CODE IS SUITABLE FOR PRODUCTION OR COMMERCIAL
USE, WILL OPERATE PROPERLY, IS ACCURATE OR COMPLETE, OR IS WITHOUT
ERROR OR DEFECT.

6. GENERAL: This License shall be governed by and interpreted in
accordance with the laws of the State of California, excluding its
conflict of laws provisions. You agree to comply with all applicable
United States export laws, rules, and regulations. If any provision of
this License is judged illegal, invalid, or otherwise unenforceable,
that provision shall be severed and the rest of the License shall
remain in full force and effect. No failure by Cisco to enforce any of
its rights related to the Sample Code or to a breach of this License
in a particular situation will act as a waiver of such rights. In the
event of any inconsistencies with any other terms, this License shall
take precedence.
125 changes: 125 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# GVE_DevNet_CTI_Route_Point_Conference_Creator

## Contacts

* Rey Diaz (rediaz@cisco.com)

## Solution Components

* Cisco Unified Communications Manager
* Cisco Jabber

## Installation/Configuration

### Requirements

- [OpenJDK](https://openjdk.java.net/) 11
- [Apache Maven](https://maven.apache.org/) 3.6.3
- [Visual Studio Code](https://code.visualstudio.com/)
- A working Cisco Unified Communications Manager environment:

- An CUCM application-user or end-user username/password, with the following roles:

- `Standard CTI Allow Control of Phones supporting Connected Xfer and conf`
- `Standard CTI Allow Control of Phones supporting Rollover Mode`
- `Standard CTI Enabled`
- `Standard CTI Allow Control of all Devices`

- [CTI suported phone devices](https://developer.cisco.com/site/jtapi/documents/cti-tapi-jtapi-supported-device-matrix/) (i.e. Jabber soft phones), configured with at least one shared directory number.

> Note, ensure all internal directory numbers have `Allow Control of Device from CTI` enabled
### Getting Started

1. Make sure you have OpenJDK 11 installed, `java` is available in the path, and `$JAVA_HOME` points to the right directory:

```bash {"id":"01HWAXPM2EXPE5ESV6DKGNKBWW"}
$ java -version
openjdk 11.0.8 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)

```

```bash {"id":"01HWAXPM2EXPE5ESV6DP15ZH2N"}
$ echo $JAVA_HOME
/usr/lib/jvm/java-1.11.0-openjdk-amd64

```

2. Open a terminal and use `git` to clone this repository

```bash {"id":"01HWAXPM2EXPE5ESV6DRGV6KA1"}
git clone https://wwwin-github.cisco.com/gve/VE_DevNet_Jabber_Conference_Initiation_With_Original_User.git

```

3. Open the Java project in [Visual Studio Code](https://code.visualstudio.com/):

```bash {"id":"01HWAXPM2EXPE5ESV6DRPEC220"}
cd GVE_DevNet_Jabber_Custom_Tab_Shared_Lines_Status
code .

```

4. Edit rename `.env.example` to `.env`, and edit to specify environment variable config for the samples you wish to run.

7. In `monitorLines.java` on line 22, specify the shared line extensions to monitor by DN. For example:
`String[] lineDNs = { "5016", "5017"};`

![Launch](/IMAGES/launch.png)

## Usage

Once the project is running, it will start monitoring the shared lines specified in the lineDNs[] array.

Upon a call being created to the CTI route point (885016, line 200 on handler.java) A conference will initiate from 5016 to 4030, and then 5017 will be conferenced in.

## Notes

1. In this project, the 11.5 and 12.5 versions of the JTAPI Java library have been deployed to the project's local Maven repo (in `lib/`), with 12.5 being the configured version.

If you want to use 11.5 (or you deploy another version, as below), modify `pom.xml` to specify the desired JTAPI version dependency. Modify `<version>`:

```xml {"id":"01HWAXPM2EXPE5ESV6DWMQD26M"}
<dependency>
<groupId>com.cisco.jtapi</groupId>
<artifactId>jtapi</artifactId>
<version>12.5</version>
</dependency>

```

2. If you want to use another JTAPI version in the project:

* Download and install/extract the JTAPI plugin from CUCM (**Applications** / **Plugins**)

* From this repository's root, use Maven to deploy the new version of `jtapi.jar` to the local repo. You will need to identify the full path to the new `jtapi.jar` installed above:

```bash {"id":"01HWAXPM2EXPE5ESV6DWQV7193"}
mvn deploy:deploy-file -DgroupId=com.cisco.jtapi -DartifactId=jtapi -Dversion={version} -Durl=file:./lib -DrepositoryId=local-maven-repo -DupdateReleaseInfo=true -Dfile={/path/to/jtapi.jar}

```

> Note: be sure to update {version} and {/path/to/jtapi.jar} to your actual values
3. JTAPI configuration - e.g. trace log number/size/location and various timeouts - can be configured in `jtapi_config/jtapi.ini` (defined as a resource in `pom.xml`)

4. As of v12.5, the Cisco `jtapi.jar` does not implement the [Java Platform Module System](https://www.oracle.com/corporate/features/understanding-java-9-modules.html) (JPMS). See this [issue](https://github.com/CiscoDevNet/jtapi-samples/issues/1) for more info.

### LICENSE

Provided under Cisco Sample Code License, for details see [LICENSE](LICENSE.md)

### CODE_OF_CONDUCT

Our code of conduct is available [here](CODE_OF_CONDUCT.md)

### CONTRIBUTING

See our contributing guidelines [here](CONTRIBUTING.md)

#### DISCLAIMER:

Please note: This script is meant for demo purposes only. All tools/ scripts in this repo are released for use "AS IS" without any warranties of any kind, including, but not limited to their installation, use, or performance. Any use of these scripts and tools is at your own risk. There is no guarantee that they have been through thorough testing in a comparable environment and we are not responsible for any damage or data loss incurred with their use.
You are responsible for reviewing and testing any scripts you run thoroughly before use in any non-testing environment.
7 changes: 7 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Configurtion settings

# JTAPI user configuration
CUCM_ADDRESS=
JTAPI_USERNAME=
JTAPI_PASSWORD=

52 changes: 52 additions & 0 deletions jtapi_config/jtapi.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#Cisco Jtapi version 10.5(0.98000)-2 Release ini parameters
#Tue Mar 04 22:23:02 PST 2014
UseLogFileTraceWriteThread=1
INFORMATIONAL=1
DesiredServerHeartbeatInterval=30
TracePath=./jtapi_logs
FileNameExtension=log
SyslogCollector=
TraceFileSize=1048576
UseAlarmService=0
ProviderOpenRequestTimeout=200
JavaSocketConnectTimeout=15
HuntListEnabled=1
JtapiPostConditionTimeout=5
ApplicationIgnoresFwdDestination=0
ApplicationPriority=2
SecurityTraceEnabled=0
AlarmServicePort=1444
RouteSelectTimeout=5000
ProviderRetryInterval=30
DropAnyPartyEnabled=1
QueueStatsEnabled=1
FileNameBase=CiscoJtapi
JTAPI_DEBUGGING=1
PeriodicWakeupEnabled=1
CTI_DEBUGGING=1
JTAPINotificationPort=2789
Traces=WARNING;INFORMATIONAL;DEBUG
PeriodicWakeupInterval=50
AlarmServiceHostname=
QueueSizeThreshold=25
Debugging=JTAPI_DEBUGGING;JTAPIIMPL_DEBUGGING;CTI_DEBUGGING;CTIIMPL_DEBUGGING;PROTOCOL_DEBUGGING;MISC_DEBUGGING
PROTOCOL_DEBUGGING=1
UseSystemDotOut=0
MISC_DEBUGGING=1
UseSameDirectory=0
NumTraceFiles=10
UseSyslog=0
DEBUG=1
SecurityTraceLevel=0
UseTraceFile=1
WARNING=1
CMAssignedAppID=0
UseProgressAsDisconnectedDuringErrorEnabled=0
CtiManagers=;;;;;;;;;
Directory=
LanguageTFTPServerIP=
CTIIMPL_DEBUGGING=1
CtiRequestTimeout=30
JTAPIIMPL_DEBUGGING=1
SyslogCollectorUDPPort=514
CtiRedirectRequestTimeout=120
Binary file added lib/com/cisco/jtapi/jtapi/12.5/jtapi-12.5.jar
Binary file not shown.
1 change: 1 addition & 0 deletions lib/com/cisco/jtapi/jtapi/12.5/jtapi-12.5.jar.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9f1b328f1dbf00e1d22edc734eb9ccc0
1 change: 1 addition & 0 deletions lib/com/cisco/jtapi/jtapi/12.5/jtapi-12.5.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
493fc4dd8249d701a9b208b1b6fe6d57154e8dbf
8 changes: 8 additions & 0 deletions lib/com/cisco/jtapi/jtapi/12.5/jtapi-12.5.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cisco.jtapi</groupId>
<artifactId>jtapi</artifactId>
<version>12.5</version>
</project>
1 change: 1 addition & 0 deletions lib/com/cisco/jtapi/jtapi/12.5/jtapi-12.5.pom.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9f32e94c33c068d3546c1c3442d325b9
Loading

0 comments on commit 43720d7

Please sign in to comment.