更新 'README.md'

This commit is contained in:
zhongjin 2023-02-01 16:10:31 +08:00
parent 073a296657
commit 46d764b6a6

View File

@ -2,45 +2,7 @@
## asterisk ## asterisk
docker pull onenetcom/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
## extensions.conf ## extensions.conf
@ -102,7 +64,7 @@ You need the gen_phonebook.pl script (https://sourceforge.net/p/flightgear/fgcom
## fgcom 终端用户维护 ## fgcom 终端用户维护
服务器: fgcom.jingweiht.com 服务器: sip.jingweiht.com
``` ```
sudo apt-get pwgen 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) [7020]
auth = 7000 username=7020
aors = 7000 type=friend
callerid = T0 <7000> secret=7020
host=dynamic
context=fgcom
callerid=7020
[7000](auth-userpass)
password = 7000
username = 7000
[7000](aor-single-reg)
mailboxes = 7000@example
``` ```
## DialPlan 拨号规则 ## 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 asterisk -vvvvvr
core reload sip reload
core restart
# pjsip reload qualify endpoint