forked from respoke/pjsip-docker
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
59 lines (50 loc) · 1.88 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# -*- Dockerfile -*-
FROM debian:jessie
MAINTAINER MartyTremblay
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
libgsm1-dev \
libspeex-dev \
libspeexdsp-dev \
libsrtp0-dev \
libssl-dev \
portaudio19-dev \
python \
python-dev \
python-pip \
python-virtualenv \
&& \
apt-get purge -y --auto-remove && rm -rf /var/lib/apt/lists/*
RUN pip install paho-mqtt
COPY config_site.h /tmp/
ENV PJSIP_VERSION=2.5.5
RUN mkdir /usr/src/pjsip && \
cd /usr/src/pjsip && \
curl -vsL http://www.pjsip.org/release/${PJSIP_VERSION}/pjproject-${PJSIP_VERSION}.tar.bz2 | \
tar --strip-components 1 -xj && \
mv /tmp/config_site.h pjlib/include/pj/ && \
CFLAGS="-O2 -DNDEBUG" \
./configure --enable-shared \
--disable-opencore-amr \
--disable-resample \
--disable-sound \
--disable-video \
--with-external-gsm \
--with-external-pa \
--with-external-speex \
--with-external-srtp \
--prefix=/usr \
&& \
make all install && \
/sbin/ldconfig # && \
# rm -rf /usr/src/pjsip
#ADD https://raw.githubusercontent.com/MartyTremblay/sip2mqtt/master/sip2mqtt.py /opt/sip2mqtt/sip2mqtt.py
RUN curl -L https://raw.githubusercontent.com/MartyTremblay/sip2mqtt/master/sip2mqtt.py -o /opt/sip2mqtt/sip2mqtt.py
#RUN wget https://raw.githubusercontent.com/MartyTremblay/sip2mqtt/master/sip2mqtt.py -O /opt/sip2mqtt/sip2mqtt.py
RUN cd /usr/src/pjsip/pjsip-apps/src/python && \
python setup.py build && python setup.py install
CMD ["python", "/opt/sip2mqtt/sip2mqtt.py", ""]