From 46d764b6a624c93079b86299c5dc2306a5956398 Mon Sep 17 00:00:00 2001 From: zhongjin Date: Wed, 1 Feb 2023 16:10:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'README.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 87 +++++++++++++++++++------------------------------------ 1 file changed, 30 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index 4c09cd0..8a2ac4c 100644 --- a/README.md +++ b/README.md @@ -2,45 +2,7 @@ ## asterisk - -https://linuxize.com/post/how-to-install-asterisk-on-ubuntu-20-04/ - -``` -sudo apt install wget build-essential git autoconf subversion pkg-config libtool - -git clone -b next git://git.asterisk.org/dahdi/linux dahdi-linux -cd dahdi-linux -sudo make -sudo make install - -git clone -b next git://git.asterisk.org/dahdi/tools dahdi-tools -cd dahdi-tools -sudo autoreconf -i -sudo ./configure -sudo make install -sudo make install-config -sudo dahdi_genconf modules - -git clone https://gerrit.asterisk.org/libpri libpri -cd libpri -sudo make -sudo make install - -proxychains4 git clone -b 1.6.2.24 https://gerrit.asterisk.org/asterisk asterisk-1.6 - -cd asterisk-1.6 - -make clean -./configure -make -make install -make samples -make config - -``` - -### 1.6.2.24 -proxychains4 git clone -b 1.6.2.24 https://gerrit.asterisk.org/asterisk asterisk-1.6 +docker pull onenetcom/asterisk ## extensions.conf @@ -102,7 +64,7 @@ You need the gen_phonebook.pl script (https://sourceforge.net/p/flightgear/fgcom ## fgcom 终端用户维护 -服务器: fgcom.jingweiht.com +服务器: sip.jingweiht.com ``` sudo apt-get pwgen @@ -111,30 +73,37 @@ pwgen 32 -nano /etc/asterisk/pjsip.conf +nano /home/zhongjin/FGCOM/jw-asterisk-docker/asterisk -[7000](endpoint-internal-d70) -auth = 7000 -aors = 7000 -callerid = T0 <7000> +[7020] +username=7020 +type=friend +secret=7020 +host=dynamic +context=fgcom +callerid=7020 -[7000](auth-userpass) -password = 7000 -username = 7000 -[7000](aor-single-reg) -mailboxes = 7000@example ``` ## DialPlan 拨号规则 ``` -nano /etc/asterisk/fgcom.conf +nano /home/zhongjin/FGCOM/jw-asterisk-docker/asterisk/extensions.conf + +[fgcom] +exten => 7000,1,Dial(SIP/7000) +exten => 7777,1,Dial(SIP/7777) +exten => 7778,1,Dial(SIP/7778) +exten => 7010,1,Dial(SIP/7010) +exten => 7020,1,Dial(SIP/7020) +exten => 7001,1,Dial(SIP/7001) +exten => 7002,1,Dial(SIP/7003) +exten => 7003,1,Dial(SIP/7003) + + -;telphone -exten => 7000,1,Dial(PJSIP/7000) -exten => 7777,1,Dial(PJSIP/7777) ``` @@ -142,13 +111,17 @@ exten => 7777,1,Dial(PJSIP/7777) ## 重现加载及监视 ``` -sudo su + +docker exec -it jw-asterisk-docker-asterisk-1 /bin/bash + asterisk -vvvvvr -core reload +sip reload + +core restart + -# pjsip reload qualify endpoint