更新 'README.md'

main
zhongjin 2 years ago
parent 073a296657
commit 46d764b6a6

@ -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

Loading…
Cancel
Save