https://github.com/netkiller/freeswitch
https://github.com/netkiller/freeswitch
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/netkiller/freeswitch
- Owner: netkiller
- License: mit
- Created: 2025-04-09T03:02:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-25T07:48:17.000Z (12 months ago)
- Last Synced: 2025-10-03T09:26:46.543Z (9 months ago)
- Language: Python
- Size: 41 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# freeswitch 用户管理
## 安装依赖
pip install freeswitch -i https://pypi.tuna.tsinghua.edu.cn/simple
## 帮助信息
```shell
[root@netkiller ~]# sip -h
usage: sip [-h] [-a ] [-p ] [-r 1000] [-c ] [-l] [-s 1000] [--simple] [--strength] [-e contacts.csv] [-d] [-b]
FreeSWITCH 用户管理工具
options:
-h, --help show this help message and exit
-a, --add 添加用户
-p, --passwd 指定密码
-r, --remove 1000 删除用户
-c, --change 修改用户
-l, --list 列出用户
-s, --show 1000 查看用户
--simple 密码强度(8位数字)
--strength 密码强度(16位字母加数字)
-e, --export contacts.csv
导出联系人
-d, --debug 调试模式
-b, --backup 备份 XML 配置文件
Author: netkiller - https://www.netkiller.cn/linux/voip/
```
## 添加用户
```shell
PS D:\GitHub\freeswitch> python.exe .\freeswitch.py -a 1000 BG7NYT admin
```
## 查看用于
```shell
PS D:\GitHub\freeswitch> python.exe .\freeswitch.py -s 1000
```
## 列出所有用户
```shell
PS D:\GitHub\freeswitch> python.exe .\freeswitch.py -l
+----------+--------+----------+----------+--------+
| 电话号码 | 呼号 | 密码 | 语音信箱 | 呼叫组 |
+==========+========+==========+==========+========+
| 1000 | BG7NYT | HbM3imgb | 2031 | admin |
+----------+--------+----------+----------+--------+
| 1003 | BG7NYT | 1u3Fc6t4 | 5927 | 33333 |
+----------+--------+----------+----------+--------+
```
## 删除用户
```shell
PS D:\GitHub\freeswitch> python.exe .\freeswitch.py -r 1000
```
## 编译包
```shell
(.venv) neo@Neo-Mac-mini-M4 freeswitch % pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
(.venv) neo@Neo-Mac-mini-M4 freeswitch % python3 -m build
(.venv) neo@Neo-Mac-mini-M4 freeswitch % pip install dist/freeswitch-0.0.1-py3-none-any.whl --force-reinstall
(.venv) neo@Neo-Mac-mini-M4 freeswitch % sip
usage: sip [-h] [-a ] [-p ] [-r 1000] [-c ] [-l] [-s 1000] [--simple] [--strength] [-e contacts.csv] [-d] [-b]
FreeSWITCH 用户管理工具
options:
-h, --help show this help message and exit
-a, --add 添加用户
-p, --passwd 指定密码
-r, --remove 1000 删除用户
-c, --change 修改用户
-l, --list 列出用户
-s, --show 1000 查看用户
--simple 密码强度(8位数字)
--strength 密码强度(16位字母加数字)
-e, --export contacts.csv
导出联系人
-d, --debug 调试模式
-b, --backup 备份 XML 配置文件
Author: netkiller - https://www.netkiller.cn/linux/voip/
```