• Stars
    star
    133
  • Rank 272,600 (Top 6 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created over 8 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Audio Video Signaling (AVS)

Wire - Audio, Video, and Signaling (AVS)

This repository is part of the source code of Wire. You can find more information at wire.com or by contacting [email protected].

You can find the published source code at github.com/wireapp.

For licensing information, see the attached LICENSE file and the list of third-party licenses at wire.com/legal/licenses/.

Build Requirements

Apart from the basic toolchain for each system, you need these:

  • clang, libc++
  • readline (for building zcall, only)
  • yasm (for video only)
  • alsa (for Linux only).

For OSX and iOS, you should have Xcode and the Command Line Tools for your specific version of both OSX and Xcode. Things will break if you have the wrong version. You can install the latter via menu Xcode, then Open Developer Tool, then More Developer Tools.

For getting autoconf, automake, libtool, readline and yasm, we suggest Homebrew. Follow the instructions there, then:

$ brew install \
  autoconf \
  automake \
  jq \
  libsodium \
  libtool \
  multirust \
  pkg-config \
  protobuf-c \
  readline \
  sdl \
  yasm
$ multirust default nightly

For Android, you need both the Android SDK as well as the Android NDK. Just get the latest versions and install them somewhere cozy. You need to export two environment variables ANDROID_SDK_ROOT and ANDROID_NDK_ROOT pointing to the respective location. Unless you do a one-off, you probably want to add them to your .bash_profile.

For Linux, you need to install the packages for the stuff mentioned above or, of course, build it all from scratch. If you are on a Debian-esque system, do this:

$ sudo apt-get install \
  autoconf \
  automake \
  clang \
  libasound2-dev \
  libc++-dev \
  libc++abi-dev \
  libevent-dev \
  libprotobuf-c-dev \
  libreadline-dev \
  libsodium-dev \
  libtool \
  libx11-dev \
  libxcomposite-dev \
  libxdamage-dev \
  libxrender-dev \
  make \
  pkgconf \
  protobuf-c-compiler \
  yasm \
  zlib1g-dev \
  zip

$ curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly

For Windows, you will have to start by adding your system to the build system. Good luck!

Build Instructions

AVS uses pre-built Google WebRTC by default that are pulled from the prebuilt webrtc repository as a part of the make process. For information about building your own WebRTC see the "Using a Locally Built WebRTC" section below.

AVS has more dependencies that need to be updated. The first time you need to fetch the submodules by doing:

$ ./prepare.sh

Next step is to build AVS itself. When building AVS with the prebuilt WebRTC, invoke make with:

make

This will build a selection of tools or your host machine. You probably want zcall, the AVS command line client. You can only build that by saying make zcall. Similarly, you can build any other tool by giving its name to make.

The deliverables are being built with the command make dist. You can limit this to only select target platforms through make dist_android, make dist_osx and make dist_ios. All of them take quite a while on a fresh checkout.

You'll find the deliverables in build/dist/{android,ios,osx}.

You can also build just the wrappers for a given architecture by saying make wrappers AVS_OS=<os> AVS_ARCH=<arch> where <os> is one of android, ios, or osx. There is no wrappers for Linux, so you are out of luck there. For <arch> there are several possible values depending on the OS. You can just leave the whole thing out and will receive reasonable defaults (ARMv7 or X86-64). Have a look at mk/target.mk for more on this.

If you want to have a local version of a dist_* target that hasn't all the necessary architectures but builds quicker, you can pass DIST_ARCH=<your_arch> to make and will only built for that architecture:

$ make dist_ios DIST_ARCH=arm64

will build an iOS distribution that will only contain arm64 instead of the usual five architectures.

Using a Locally Built WebRTC

It is possible to use your own locally built WebRTC libraries instead, by following the instructions in the readme file of the prebuilt webrtc repository.

Once built and packaged you should have the following files:

contrib/webrtc/webrtc_<version>_android.zip
contrib/webrtc/webrtc_<version>_headers.zip
contrib/webrtc/webrtc_<version>_ios.zip
contrib/webrtc/webrtc_<version>_linux.zip
contrib/webrtc/webrtc_<version>_osx.zip

These files should be copied to the contrib/webrtc directory and the WEBRTC_VER variable set when making AVS, for example:

make WEBRTC_VER=20200603.local

You can also modify the version set in the mk/target.mk file, as follows:

ifeq ($(WEBRTC_VER),)
WEBRTC_VER := 20200603.local
endif

Running make should then unpack and use the locally built version of WebRTC.

Using the Library

During the build, a set of static libraries is being built. You can use this library in your own projects.

You'll find the APIs in include/*.h. avs.h is your catchall include file. Always use that to protect yourself agains reorganizations.

Linking is a bit tricky, we'll add instructions soon. The easiest is probably to add build/$(your-platform)/lib to your library path and then add all .a files in there as -l arguments.

Using the Command Line Client (zcall)

Start the command line client provding the email address of an existing account using the -e option. You can switch to staging (aka dev) by adding the -D option and to edge by adding the -E option. Since caching is currently a little broken, you probably want to add the -f option, too. For further information on available options, try the ever helpful -h option.

Once started, hit h to see a list of key strokes available and type :help and enter to see a list of commands. All commands are entered by typing : first.

Creating a Client

The first thing you will need is a clientid. This can be done as follows:

:get_clients lists clients for this user, the current one for zcall is marked with a * :reg_client register a new client

There is a limit of 8 clients per user, if all are used you will need to remove one with:

:delete_cient <clientid>

Beware that there is no "are you sure" question, use this only if you know what you are doing! If you delete an in-use client by accident bad things may happen.

Managing Conversations

Keys for listing, selecting and showing conversations are:

l list conversations, the selected one is marked with -> j select previous conversation k select next conversation i show selected conversation ID and members

You can also select a conversation with the :switch command and send basic chat messages to the selected conversation with :say

Calling

Keys for calling are:

c start a call in the selected conversation a answer the most recent incoming call e end/leave the call m toggle mute V toggle video sending

Incoming calls are indicated by the following line:

calling: incoming audio call in conv: Conversation (conference) from "test_user:0123456789abcdef" ring: yes ts: 1614244695

Architecture overview:

           .-----------.                            .---------.  .----------.
           |   wcall   |                            | engine  |  | mediamgr |
           '-----------'                            '---------'  '----------'
            /    |    \                                  |
  .-----------.  |  .-----------.   .----------.    .---------.
  |  egcall   |  |  |   ccall   |---| keystore |    |  REST   |
  '-----------'  |  '-----------'   '----------'    |  nevent |
            \    |    /                             | protobuf|
           .-----------.   .-----------.            '---------'
           |   ecall   |---|  econn    |
           '-----------'   '-----------'
             /        \
     mobile /          \ web
  .-----------.     .-----------.
  | peerflow  |     |  jsflow   |
  '-----------'     '-----------'
        |                 |
  .-----------.     .-----------.
  |webrtc(C++)|     | avs_pc(JS)|
  | peerconn  |     '-----------'
  '-----------'           |
                    .-----------.
                    | webrtc(JS)|
                    | peerconn  |
                    '-----------'

    .------------------------------.
    | Low-level utility modules:   |
    | - audummy (Dummy audio-mod)  |
    | - base (Base module)         |
    | - cert (Certificates)        |
    | - dict (Dictionary)          |
    | - jzon (Json wrappers)       |
    | - log (Logging framework)    |
    | - queue (Packet queue)       |
    | - sem (Semaphores)           |
    | - store (Persistent Storage) |
    | - trace (Tracing tool)       |
    | - uuid (UUID helpers)        |
    | - zapi (ZETA-protocol API)   |
    | - ztime (Timestamp helpers)  |
    '------------------------------'

Some specifications implemented:

Reporting bugs

When reporting bugs against AVS please include the following:

  • Wireshark PCAP trace (download Wireshark)
  • Full logs from client
  • Session-ID
  • Which Backend was used
  • Exact version of client
  • Exact time when call was started/stopped
  • Name/OS of device
  • Adb logcat for Android

Run-time libraries

FROM ubuntu:16.04 RUN apt-get install -qqy --no-install-recommends
libprotobuf-c-dev
libc6-dev-i386
libreadline-dev
libx11-dev
libxcomposite-dev
libxdamage-dev
libxrender-dev
libc++-dev
libc++abi-dev

Upload to sonatype

To manually upload to sonatype create a local.properties with the following values:

sonatype.username=
sonatype.password=
signingKeyFile=<path to asc file>
signingPassword=<gpg key passphrase>

More Repositories

1

wire-server

๐Ÿ‡ช๐Ÿ‡บ Wire back-end services
Haskell
2,599
star
2

wire

ใ€ฐ๏ธ Overview of the open source code for Wire
2,366
star
3

wire-webapp

๐Ÿ‘ฝ Wire for web
TypeScript
1,103
star
4

wire-desktop

๐Ÿ’ป Wire for desktop
TypeScript
1,053
star
5

proteus

Axolotl Protocol Implementation
Rust
412
star
6

wire-ios-sync-engine

iOS synchronization library for Wire
Swift
149
star
7

wire-server-deploy

Code to install/deploy wire-server (on kubernetes)
Shell
94
star
8

wire-android

๐Ÿค– The new Wire client for Android
Kotlin
94
star
9

lithium

Wire Services JDK
Java
79
star
10

coax

A (barely working) native Wire client for Unix
Rust
75
star
11

wire-ios

๐Ÿ“ฑ Wire for iOS (iPhone and iPad)
Swift
65
star
12

wire-web-packages

Collection of npm modules created by Wire's web team.
TypeScript
59
star
13

wire-android-sync-engine

Sync library for Android.
Scala
58
star
14

bot-sdk-node

๐Ÿค–
JavaScript
58
star
15

pqproteus

PQProteus
Rust
57
star
16

echo-bot

Echo bot
Java
56
star
17

cryptobox

High-level API with persistent storage for proteus
Rust
52
star
18

melissa

Messaging Layer Security (MLS) implementation in Rust
Rust
52
star
19

wire-ios-link-preview

๐Ÿท Open Graph data parser used to generate link previews
Swift
48
star
20

kalium

๐ŸŒ An SDK for creating Wire clients on Android and JVM. Expanding to iOS and Web.
Kotlin
44
star
21

carthage-gradle-plugin

Gradle plugin for Carthage
Kotlin
36
star
22

libsodium-neon

Node.js bindings to rust_sodium.
Rust
36
star
23

proteus.js

Axolotl protocol implementation for JavaScript
JavaScript
36
star
24

generic-message-proto

Protocol definition for generic messages.
Scala
35
star
25

hkdf

HKDF implementation (RFC 5869)
Rust
29
star
26

cryptobox-c

C-FFI to cryptobox
C
29
star
27

wire-ios-data-model

Core Data model and entity classes
Swift
28
star
28

cryptobox-haskell

Cryptobox Haskell FFI
Haskell
27
star
29

wire-signals

A small and effective event-handling library for Scala
Scala
23
star
30

wire-ios-cryptobox

Swift
22
star
31

wire-ios-transport

Objective-C
22
star
32

wire-ios-ziphy

https://wire.com
Swift
22
star
33

wire-ios-share-engine

Share extension framework for iOS
Swift
22
star
34

core-crypto

MLS/Proteus multiplexer abstraction with encrypted persistent storage in Rust
Rust
20
star
35

node-addressbook

Node.js module providing access to the macOS address book
C++
18
star
36

cryptobox-jni

JNI bindings for cryptobox with support for cross-compilation to Android.
Java
17
star
37

cryptobox.js

JavaScript
17
star
38

wire-ios-images

๐Ÿ—ป Framework to perform rotation and scaling of images
Objective-C
16
star
39

wire-ios-system

Swift
15
star
40

github-action-wire-messenger

JavaScript
15
star
41

wire-ios-utilities

Swift
14
star
42

saml2-web-sso

Library and example web app for the SAML Web-based SSO profile.
Haskell
14
star
43

wire-ios-mocktransport

Objective-C
13
star
44

wire-ios-canvas

Canvas is a component for painting and composing pictures
Swift
13
star
45

wire-ios-protos

๐Ÿ“œ obj-c autogenerated classes from https://github.com/wireapp/generic-message-proto protocol buffer definitions
Swift
13
star
46

wire-emails

Templates for sending emails for Wire
HTML
12
star
47

wire-ios-testing

Objective-C
12
star
48

wire-ios-request-strategy

iOS synchronization base interfaces for Wire
Swift
12
star
49

ansible-cassandra

Ansible role to install an Apache Cassandra cluster
Shell
12
star
50

wire-ios-message-strategy

iOS synchronization of messages for Wire
Swift
11
star
51

backend-api-protobuf

Scala
11
star
52

antiscroll-2

macOS Lion-styled scrollbars for DOM elements.
HTML
11
star
53

anna-bot

Rosie chatbot for Wire
Java
11
star
54

wire-account

Account verifications and forgotten passwords (https://wire-account-staging.zinfra.io/forgot/).
TypeScript
10
star
55

libsodium.js

libsodium compiled to pure JavaScript, with convenient wrappers
JavaScript
10
star
56

wire-web-store-engine

Provider for the following storage engines: File, IndexedDB, Memory & LocalStorage.
JavaScript
10
star
57

picklejar-engine

A JUnit 5 Test engine for running cucumber test in Java. Suitable for very big test suite projects.
Java
9
star
58

wire-web-core

Collection of npm modules created by Wire's web team.
TypeScript
9
star
59

wire-web-queue-priority

A promise based dynamic priority queue runner.
JavaScript
9
star
60

libsodium

A modern and easy-to-use crypto library.
C
9
star
61

avs-ios-binaries

AVS binaries for iOS
Objective-C
9
star
62

libsodium-native

C++
8
star
63

alert-bot

Broadcasts alerts
Java
8
star
64

backup-export-tool

Tool which exports Wire client's backups and generates PDF from it.
Java
8
star
65

wire-audio-files

Audio notifications files for Wire application.
Scala
8
star
66

wire-web-config-default

7
star
67

cryptobox-ios

iOS binaries for cryptobox
Shell
7
star
68

wire-android-translations

โ˜Ž๏ธ Non-english strings for Wire android client
7
star
69

wire-theme

CSS
6
star
70

rusty-jwt-tools

Tools for manipulating JSON Web Tokens, JWS, JWE, and JWK in Rust
Rust
6
star
71

roman

Lithium proxy for Wire
Java
6
star
72

scala-utils

JVM friendly utility classes for Scala, including signals and threading.
Scala
6
star
73

recording-bot

Java
6
star
74

broadcast-bot

Broadcast Channel for Wire
Java
6
star
75

wire-ios-shared-resources

Shared resources used by the Wire iOS application
Groovy
6
star
76

bazinga64

Base64 encoding and decoding with ASCII string representation. Works with Node.js and modern browsers.
JavaScript
6
star
77

mls-client

Rust
5
star
78

gitlab

GitLab integration for Wire
Java
5
star
79

babel-plugin-remove-jsx-attributes

Babel plugin for removing attributes from JSX elements
JavaScript
5
star
80

ldap-scim-bridge

Command-line translator between LDAP and SCIM systems.
Haskell
5
star
81

wire-web-ets

End-to-end Test Service (ETS) for Wire's test automation suite
TypeScript
5
star
82

charon

Proxy mapping requests from Slack bots to Roman and back
Python
5
star
83

don-bot

Don - Wire meta bot
Java
4
star
84

prebuilt-webrtc-binaries

Prebuilt binaries for webrtc library
Shell
4
star
85

wire-ios-notification-engine

Notification extension framework for iOS
Swift
4
star
86

wire-desktop-packages

Collection of npm modules used by Wire's desktop clients.
TypeScript
4
star
87

grunt-npm-bower

Grunt plugin which helps migrating from Bower to npm.
JavaScript
4
star
88

brand

Brand assets & styleguide content ยท brand.wire.com
HTML
3
star
89

webapp-module-modal

CSS
3
star
90

mls-server

A prototype MLS server (deprecated)
Haskell
3
star
91

mi

morphing identity
Rust
3
star
92

terraform-hcloud-rke2

HCL
3
star
93

cryptobox4j

Cryptobox jni optimized for Services
Java
3
star
94

hscim

System for Cross-domain Identity Management (SCIM)
Haskell
3
star
95

wire-web-config-wire

2
star
96

outlook-addin

Wire add-in for Microsoft Outlook
TypeScript
2
star
97

restund

Fork of restund from http://www.creytiv.com/restund.html with custom patches
C
2
star
98

echo-bot-roman

Implementation of echo bot using Roman as proxy
Python
2
star
99

admin-broadcast

Admin messages broadcasts across the Wire
TypeScript
2
star
100

mi-haskell

Haskell bindings for wireapp/mi
Haskell
2
star