Skip to content

Commit

Permalink
[ASTERISK] updated Asterisk to 15.4.0 (#19)
Browse files Browse the repository at this point in the history
[ASTERISK] updated Asterisk to 15.4.0
[SRTP] updated to 2.1.0
[MONGOC] updated to 1.9.5
[PATCH] removed old patches
[README] updated
  • Loading branch information
minoruta authored May 9, 2018
1 parent a5de308 commit 6e388c3
Show file tree
Hide file tree
Showing 14 changed files with 1,038 additions and 12,918 deletions.
32 changes: 27 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ ARG VERSION_UBUNTU=latest
FROM ubuntu:$VERSION_UBUNTU
MAINTAINER KINOSHITA minoru <[email protected]>

ARG VERSION_ASTERISK=15.1.3
ARG VERSION_MONGOC=1.8.2
#
# Essential arguments
#
ARG VERSION_ASTERISK
ARG VERSION_MONGOC
ARG VERSION_LIBSRTP

WORKDIR /root
RUN mkdir src
COPY src/* src/
RUN mkdir ast_mongo
#COPY ./LICENSE ast_mongo/
#COPY README.md ast_mongo/

RUN apt -qq update \
&& apt -qq install -y \
Expand All @@ -22,7 +24,6 @@ RUN apt -qq update \
libsqlite3-dev \
libjansson-dev \
libcurl4-openssl-dev \
libsrtp0-dev \
pkg-config \
build-essential \
autoconf \
Expand All @@ -31,6 +32,24 @@ RUN apt -qq update \
file \
git

#
# Prepare strp
#
WORKDIR /root
RUN wget https://github.com/cisco/libsrtp/archive/v$VERSION_LIBSRTP.tar.gz \
&& tar xzf v$VERSION_LIBSRTP.tar.gz \
&& rm v$VERSION_LIBSRTP.tar.gz \
&& cd libsrtp-$VERSION_LIBSRTP \
&& ./configure > /dev/null \
&& make \
&& make install \
&& make clean \
&& ldconfig \
&& cd ..

#
# Prepare MongoDB C Driver
#
RUN cd $HOME \
&& wget -nv "https://github.com/mongodb/mongo-c-driver/releases/download/$VERSION_MONGOC/mongo-c-driver-$VERSION_MONGOC.tar.gz" -O - | tar xzf - \
&& cd mongo-c-driver-$VERSION_MONGOC \
Expand All @@ -41,6 +60,9 @@ RUN cd $HOME \
&& tar czf mongo-c-driver-$VERSION_MONGOC.tgz mongo-c-driver-$VERSION_MONGOC \
&& rm -rf mongo-c-driver-$VERSION_MONGOC

#
# Build and install Asterisk with patches for ast_mongo
#
RUN cd $HOME \
&& wget -nv "http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-$VERSION_ASTERISK.tar.gz" -O - | tar -zxf - \
&& cd asterisk-$VERSION_ASTERISK \
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ The **`ast_mongo`** project provides the following plugins for Asterisk;
1. Realtime configuration engine with MongoDB,
1. CDR backend for MongoDB,
1. CEL backend for MongoDB (contributed by [viktike][9], thanks [viktike][9]),
1. and a [test bench](test_bench) with MongoDB replica set based on Docker technology.
1. ~~and a [test bench](test_bench) with MongoDB replica set based on Docker technology~~(Deprecated).
1. and a [test bench](test/docker) based on Docker technology.

Plugin name |Realtime |CDR|CEL|Source code|Config file(s)
-----------------------|------------|---|---|-----------|--------------
Expand Down Expand Up @@ -136,6 +137,10 @@ Name of DB |Name of Collection |Comment

- See Asterisk's official document [Setting up PJSIP Realtime][5] as well.

## Supporting library
- [`ast_mongo_ts`](https://github.com/minoruta/ast_mongo_ts) which is nodejs library
provides functionalities to handle asterisk's object through MongoDB.

## License and Copyright

- The related code to Asterisk:
Expand Down
14 changes: 5 additions & 9 deletions patches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@
This is an example of how to apply a patch;

```
$ wget -nv "http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-x" -O - | tar -zxf -
$ cd asterisk-x
$ wget https://github.com/minoruta/ast_mongo/blob/master/asterisk/patches/ast_mongo-x.patch
$ patch -p1 -i ast_mongo-x.patch
$ wget -nv "http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-a.b.c" -O - | tar -zxf -
$ cd asterisk-a.b.c
$ wget https://raw.githubusercontent.com/minoruta/ast_mongo/master/patches/ast_mongo-x.y.z.patch
$ patch -p1 -i ast_mongo-x.y.z.patch
$ ./bootstrap.sh
$ ./configure
$ make
$ sudo make install
$ ...
```

## Regarding file name of the patches

Each file have a suffix based on an asterisk you specify in [`config.json`](../../config.json).
The minor revision of the suffix however is almost meaningless.
So you can use a patch which has same major version, or run [`./test`](../test_bench#test) to get a patch which has same version number.
You can get a specific version patch. See [`test/docker`](../test/docker) in detail.
Loading

0 comments on commit 6e388c3

Please sign in to comment.