Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update yate, update debian to stable version #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 37 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,51 @@
FROM debian:buster
FROM debian:bookworm

#yate
COPY deps/yate_5.5-1_amd64.deb /tmp/
#build yate
RUN apt update && apt install -y -f \
/tmp/yate_5.5-1_amd64.deb \
autoconf \
build-essential \
doxygen \
gcc \
git \
grep \
make \
original-awk \
sed \
vim

#ADD deps/yate /yate
RUN git clone https://github.com/yatevoip/yate.git /yate
WORKDIR "/yate"
RUN ./autogen.sh
RUN ./configure
RUN make all
RUN make install

#yate-tcl
RUN apt update && apt install -y -f \
ffmpeg \
lame \
libmp3lame0 \
netcat-openbsd \
python3-pip \
python3-venv \
tcl \
tcllib \
tcl-tls
tcl-tls \
tcllib

#yate-tcl
COPY deps/yate-tcl /opt/yate-tcl
RUN mkdir /usr/local/share/tcltk && ln -s /opt/yate-tcl/ygi /usr/local/share/tcltk/ygi

RUN pip3 install python-yate requests
#RUN pip3 install python-yate requests
RUN python3 -m venv /venv
RUN /venv/bin/pip install requests python-yate

#yate-config
COPY config /etc/yate
COPY config /usr/local/etc/yate

COPY sounds /opt/sounds
COPY sounds /usr/local/share/yate/sounds/

COPY hotline /usr/share/yate/scripts/
COPY hotline /usr/local/share/yate/scripts/

ENTRYPOINT [ "/usr/bin/yate", "upstream_broke_it" ]
ENTRYPOINT [ "yate", "upstream_broke_it" ]
10 changes: 6 additions & 4 deletions hotline/hotline.tcl
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
#!/usr/bin/tclsh
package require ygi

set sounds "/usr/local/share/yate/sounds"

::ygi::start_ivr
::ygi::set_dtmf_notify

::ygi::idle_timeout

::ygi::play_wait "yintro"
::ygi::play_wait "$sounds/yintro"
::ygi::sleep 500

while { true } {
set digit [::ygi::play_getdigit file "pocmenu/123"]
set digit [::ygi::play_getdigit file "$sounds/pocmenu/123"]
if { $digit == "1" } {
::ygi::play_getdigit file "pocmenu/warteschleife" stopdigits { 3 }
::ygi::play_getdigit file "$sounds/pocmenu/warteschleife" stopdigits { 3 }
}

if { $digit == "2" } {
::ygi::play_getdigit file "pocmenu/clan_chi_telekom" stopdigits { 3 }
::ygi::play_getdigit file "$sounds/pocmenu/clan_chi_telekom" stopdigits { 3 }
}

}