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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sip-dialpad-react

v0.0.8

Published

一个基于 React 的 SIP 拨号盘 SDK,可以轻松集成到任何网站中。

Downloads

15

Readme

SIP Dialpad React SDK

一个基于 React 的 SIP 拨号盘 SDK,可以轻松集成到任何网站中。

特性

  • 🚀 轻量级,单文件 SDK
  • 📱 响应式设计
  • 🎨 可自定义主题
  • 🔧 简单易用的 API
  • 📦 支持 UMD 和 ES 模块
  • test

安装方式

方法一:CDN 引入(推荐)

<!DOCTYPE html>
<html>
    <head>
        <title>SIP Dialpad SDK</title>
    </head>
    <body>
        <!-- 引入React和ReactDOM -->
        <script crossorigin src="https://pub-res.hermesomni.com/sdk/js-sip/sip-dialpad-sdk.latest.js"></script>
        <div id="dialpad-container"></div>
        <button id="makeCall">call</button>

        <script>
        console.log('SDK 已加载:', typeof SipDialpadSDK);
        console.log('SDK 内容:', SipDialpadSDK);

        try {
            // 正确的调用方式
            const sdk = SipDialpadSDK.createSipDialpadSDK();
            console.log('SDK 实例创建成功:', sdk);

            // 尝试渲染 SDK
            sdk.render("dialpad-container", {extNo: "xxx", extPwd: "xxx", iframe: { width: 800, height: 600, url: 'https://baidu.com'}});
            console.log('SDK 渲染成功');
            // call
            document.getElementById('makeCall').addEventListener('click', () => {
                sdk.makeCall('12345679',{
                 ticketId:"",
                 orderId:"",
                 businessId:"",
             })
            })
        } catch (error) {
            console.error('SDK 错误:', error);
        }
    </body>
</html>
<!DOCTYPE html>
<html>
    <head>
        <title>SIP Dialpad SDK</title>
    </head>
    <body>
        <script crossorigin src="https://pub-res.hermesomni.com/sdk/js-sip/sip-dialpad-sdk.latest.js"></script>
    </body>
</html


<script setup lang="ts">
import { ref } from "vue";

function renderDialpad() {
  const sdk = SipDialpadSDK.createSipDialpadSDK();
  console.log("SDK 实例创建成功:", sdk);

  // 尝试渲染 SDK
  sdk.render("dialpad-container", {extNo: "xxx", extPwd: "xxx", iframe: { width: 800, height: 600, url: 'https://baidu.com'}});
  console.log("SDK 渲染成功");
  // call
  const call = ()=>{
    sdk.makeCall('12345679',{
         ticketId:"",
         orderId:"",
         businessId:"",
     })
  }
}
</script>

<template>
  <div>
    <button @click="renderDialpad">渲染</button>
    <div id="dialpad-container"></div>
    <button @click="call">call</button>
  </div>
</template>

<style scoped></style>
<!DOCTYPE html>
<html>
    <head>
        <title>SIP Dialpad SDK</title>
    </head>
    <body>
        <script crossorigin src="https://pub-res.hermesomni.com/sdk/js-sip/sip-dialpad-sdk.latest.js"></script>
    </body>
</html>

const Home = ()=>{
    const renderDialpad = ()=>{
        const sdk = SipDialpadSDK.createSipDialpadSDK();
        console.log("SDK 实例创建成功:", sdk);

        // 尝试渲染 SDK
        sdk.render("dialpad-container", {extNo: "xxx", extPwd: "xxx", iframe: { width: 800, height: 600, url: 'https://baidu.com'}});
        console.log("SDK 渲染成功");
        // 代码调用打电话
        const call = ()=>{
            sdk.makeCall('12345679',{
             ticketId:"",
             orderId:"",
             businessId:"",
         })
        }
    }

    return (
        <div>
            ok
            <button onClick={renderDialpad}>render</button>
            <div id="dialpad-container" />
            <button onClick={call}>call</button>
        </div>
    )
}