add-ipone

Dim filePath
Dim replaceText

' 获取用户输入的替换值
replaceText = InputBox("请输入电话号码:")

' 创建文件系统对象
Set objFSO = CreateObject("Scripting.FileSystemObject")

' 创建新的 config.cfg 文件
Set objFile = objFSO.CreateTextFile("config.cfg", True)

' 写入文本内容
objFile.WriteLine "#!version:1.0.0.1"
objFile.WriteLine ""
objFile.WriteLine "### This file is the exported MAC-all.cfg."
objFile.WriteLine ""
objFile.WriteLine "### For security, the following parameters with password haven't been display in this file."
objFile.WriteLine "account.1.password = zxcvbnm"
objFile.WriteLine "account.1.auth_name = " & replaceText
objFile.WriteLine "account.1.codec.pcmu.priority = 3"
objFile.WriteLine "account.1.codec.pcma.priority = 4"
objFile.WriteLine "account.1.codec.g729.priority = 1"
objFile.WriteLine "account.1.codec.g722.priority = 2"
objFile.WriteLine "account.1.display_name = " & replaceText
objFile.WriteLine "account.1.enable = 1"
objFile.WriteLine "account.1.label = " & replaceText
objFile.WriteLine "account.1.sip_server.1.address = 192.168.111.150"
objFile.WriteLine "account.1.sip_server.1.port = 5061"
objFile.WriteLine "account.1.user_name = " & replaceText
objFile.WriteLine "features.key_tone = 0"
objFile.WriteLine "features.normal_refuse_code = 404"
objFile.WriteLine "features.ringer_device.is_use_headset = 0"
objFile.WriteLine "features.send_key_tone = 0"
objFile.WriteLine "lang.gui = Chinese_S"
objFile.WriteLine "lang.wui = Chinese_S"
objFile.WriteLine "local_time.dhcp_time = 1"
objFile.WriteLine "local_time.ntp_server1 = 192.168.110.69"
objFile.WriteLine "multicast.codec = G729"
objFile.WriteLine "phone_setting.backlight_time = 0"
objFile.WriteLine "phone_setting.called_party_info_display.enable = 1"
objFile.WriteLine "voice.ring_vol = 2"
objFile.WriteLine "### Static Configuration ###"
objFile.WriteLine "static.network.cdp.enable = 0"
objFile.WriteLine "static.network.lldp.enable = 0"
objFile.WriteLine "static.network.vlan.pc_port_enable = 1"

' 关闭文件
objFile.Close

MsgBox "config.cfg 生成成功!"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值