npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

webrtc-test-tool

v1.1.14

Published

用于并发测试webrtc通话的工具。

Readme

webrtc test tool

用于并发测试webrtc通话。 该工具能够根据提供的配置文件,读取账号信息并自动注册asterisk,注册成功后自动发起通话。 该工具会根据配置文件中的users个数创建相应线程数,请不要一次性添加太多用户避免机器负载过高。nodejs线程数最大限制1000。

使用

webrtc-test-tool -l verbose -p ./config.json执行呼叫任务,设置输出日志等级(默认info),并指定配置文件位置,呼叫信息于配置文件内。
webrtc-test-tool gettpl 获取配置文件模板。
webrtc-test-tool readme 获取readme说明文档
webrtc-test-tool -h查看工具如何使用。

配置文件

使用命令webrtc-test-tool gettpl获取配置文件模板,可以使用-d 指定配置文件生成位置,默认位置在命令行执行的工作目录下。 模板内容如下:

{
    "ip": "",
    "port": "",
    "stun": "",
    "turn": "",
    "restSecond": "",
    "registryExpires": "",
    "userAgent": "WebClient",
    "users": [
        {
            "realm": "",
            "caller": "",
            "registername": "",
            "registerpassword": "",
            "callee": ""
        }
    ]
}

配置项如无特殊说明即为必填。
ip: pbx地址,如果是fqdn或者cloud可以直接填写域名,例如:hello.test.smartpbx.cn。
port: 端口。
stun: 如果使用的是fqdn或者cloud环境,填写该配置来指定stun服务器地址。需要填写完整的stun url,例如:stun:hello.test.smartpbx.cn:11009,该配置不是必填,没有可以放空。


turn: 如果网络环境为对称nat,填写该配置指定turn服务地址,需要填写完整的turn url,例如:turn:hello.test.smartpbx.cn:11009,该配置不是必填,没有可以放空。


restSecond: 每次呼叫间隔时间,单位为秒。
registryExpires: 注册过期时间,单位为秒。
userAgent: 代表哪种客户端,默认:WebClient,可选WebPC extraHeaders:额外的sip头,可选,例如: ["Webrtc-Type: webtrunk"] users: 用户信息列表,有多少个用户就会执行多少路通话。用户信息可在/api/v1.0/extension/getregisterinfo接口中获取
realm: pbx的域,一般为YSAsterisk。
caller: 主叫号码。 registername: 注册的用户,也用作主叫分机。
registerpassword: 注册密码。
callee: 被叫号码。