2023-01-06 12:35:18 +08:00
# Docs
2023-01-17 23:21:52 +08:00
## asterisk
2023-02-01 16:11:10 +08:00
https://git-x.kongjian.xin/FGCOM/jw-asterisk-docker.git
2023-02-01 16:10:31 +08:00
docker pull onenetcom/asterisk
2023-01-17 23:21:52 +08:00
2023-01-17 23:34:09 +08:00
## extensions.conf
```
[general]
static=yes
writeprotect=yes
;
[default]
#include "fgcom.inc"
include => fgcom
```
## iax.conf
```
[general]
bandwidth=low
disallow=lpc10
jitterbuffer=yes
forcejitterbuffer=no
tos=lowdelay
autokill=30000
codecpriority=host
disallow=all
allow=gsm
allow=ilbc
allow=g726
language=en
maxauthreq=30
context=fgcom
minregexpire=30
maxregexpire=10800
maxexpirey=10800
defaultexpirey=10800
;
[guest]
type=user
username=guest
secret=guest
context=fgcom
qualify=yes
callerid=Guest IAX User
host=dynamic
requirecalltoken=no
;
```
## fgcom.inc
```
```
You need the gen_phonebook.pl script (https://sourceforge.net/p/flightgear/fgcom/ci/master/tree/server/gen_phonebook.pl?format=raw) and nav.dat.gz and apt.dat.gz from the git repository.
2023-01-17 23:21:52 +08:00
2023-01-06 12:46:02 +08:00
## fgcom 终端用户维护
2023-02-01 16:10:31 +08:00
服务器: sip.jingweiht.com
2023-01-06 12:46:02 +08:00
```
2023-01-06 12:59:16 +08:00
sudo apt-get pwgen
pwgen 32
2023-02-01 16:10:31 +08:00
nano /home/zhongjin/FGCOM/jw-asterisk-docker/asterisk
2023-01-06 12:46:02 +08:00
2023-02-01 16:10:31 +08:00
[7020]
username=7020
type=friend
secret=7020
host=dynamic
context=fgcom
callerid=7020
2023-01-06 12:46:02 +08:00
```
## DialPlan 拨号规则
```
2023-02-01 16:10:31 +08:00
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)
2023-01-06 12:46:02 +08:00
```
## 重现加载及监视
```
2023-02-01 16:10:31 +08:00
docker exec -it jw-asterisk-docker-asterisk-1 /bin/bash
2023-01-06 12:46:02 +08:00
2023-01-06 14:54:00 +08:00
asterisk -vvvvvr
2023-01-06 12:59:16 +08:00
2023-02-01 16:10:31 +08:00
sip reload
2023-02-20 13:34:45 +08:00
core restart now
在CLI中的查询命令:
sip show peers 显示所有的SIP peers(包括friends)
sip show users 显示所有的SIP users(包括friends)
sip show registry 显示注册到的主机状态
sip debug 显示所有的Sip信息
module reload chan_sip.so 重新装载sip的配置文件
2023-02-01 16:10:31 +08:00
2023-01-06 15:02:58 +08:00
2023-01-06 12:59:16 +08:00
2023-01-06 12:46:02 +08:00