Skip to content

批量修改FreeSWITCH的开户信息(密码等)

License

Notifications You must be signed in to change notification settings

sudaning/Fmuser

Repository files navigation

Welcome to Fmuser

Version Supported-python-version Build Status Coverage Star Fork MIT License

Introduction

Fmuser is a pure Python library designed to modify FREESWITCH's register user information in batch mode. In /scripts , there are some scripts written by me for daily use.

Installation

  1. Via pip
    pip install pyFmuser
  2. Via easy_install
    easy_install pyFmuser
  3. From source(recommend)
    python setup.py install

upgrading

  1. Via pip
    pip install --upgrade pyFmuser

Examples

#!/usr/bin/env python 
# -*- coding: utf-8 -*- 

import os
from fmuser import Muser

if __name__ == '__main__':
	# 搜索XML文件的根路径(递归搜索子路径)
	user_dir = '/usr/local/freeswitch/conf/directory'
	# XML中的路径
	key=r'/params/param[@name="password"]'
	# 需要修改的密码
	password = '1234'
	# 需要修改的用户号码
	numbers = ['1000', '13632672292', '2000']

	user = Muser(user_dir=user_dir)
	user.set_modify_rule(key=key, value=password)
	user.run(numbers)

From the author

Welcome to use Fmuser (●'◡'●)ノ♥
If you find any bug, please report it to me by opening a issue. Fmuser needs to be improved, your contribution will be welcomed.

About

批量修改FreeSWITCH的开户信息(密码等)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages