
Security News
Frontier AI Is Now Critical Infrastructure
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.
voice-sdk-dialer
Advanced tools
A powerful WebRTC SIP client library for making and receiving voice calls in web browsers. Built with modern JavaScript and TypeScript support.
A powerful WebRTC SIP client library for making and receiving voice calls in web browsers. Built with modern JavaScript and TypeScript support.
npm install voice-sdk-dialer
Or with yarn:
yarn add voice-sdk-dialer
import VoiceSDKDialer from 'voice-sdk-dialer';
// Initialize the dialer
const dialer = new VoiceSDKDialer({
token: 'your-token',
domain: 'your-domain.com'
});
// Start the dialer with SIP configuration
dialer.start({
sipConfig: {
server: 'sip.yourdomain.com',
username: 'your-sip-username',
password: 'your-sip-password',
displayName: 'Your Display Name'
},
callbacks: {
onConnected: () => console.log('Connected to SIP server'),
onCallAnswered: (callInfo) => console.log('Call answered:', callInfo),
onError: (error) => console.error('Error:', error)
}
});
// Make a call
dialer.makeCall('+1234567890');
import VoiceSDKDialer, {
VoiceSDKOptions,
CallInfo,
CALL_STATES
} from 'voice-sdk-dialer';
const options: VoiceSDKOptions = {
sipConfig: {
server: 'sip.yourdomain.com',
username: 'user',
password: 'pass',
displayName: 'User Name'
},
callbacks: {
onCallAnswered: (callInfo: CallInfo) => {
console.log(`Call with ${callInfo.caller} is active`);
}
}
};
const dialer = new VoiceSDKDialer({
token: 'your-token',
domain: 'your-domain'
});
dialer.start(options);
new VoiceSDKDialer(options)
Parameters:
options.token (string) - Authentication tokenoptions.domain (string) - Your domainoptions.defaultCountryCode (string, optional) - Default country code (default: '+84')start(options)Initialize and start the dialer with SIP configuration.
dialer.start({
sipConfig: {
server: 'sip.example.com',
username: 'user',
password: 'pass',
displayName: 'Display Name',
port: '8089' // optional
},
callbacks: {
// Event callbacks
}
});
makeCall(number)Make an outgoing call to the specified number.
options = {
'X-[name]' = value
}
await dialer.makeCall('+1234567890', options);
answerCall()Answer an incoming call.
dialer.answerCall();
hangupCall()End or decline the current call.
await dialer.hangupCall();
hold() / unhold()Put the current call on hold or resume it.
await dialer.hold();
await dialer.unhold();
mute() / unmute()Mute or unmute the microphone.
await dialer.mute();
await dialer.unmute();
destroy()Clean up resources and destroy the dialer instance.
dialer.destroy();
The dialer supports comprehensive event callbacks:
const callbacks = {
// Connection events
onReady: (dialer) => console.log('Dialer ready'),
onConnected: () => console.log('Connected to SIP server'),
onDisconnected: () => console.log('Disconnected from server'),
onRegistered: () => console.log('SIP registration successful'),
// Call events
onIncomingCall: (callInfo) => console.log('Incoming call from:', callInfo.caller),
onOutgoingCall: (callInfo) => console.log('Calling:', callInfo.number),
onCallAnswered: (callInfo) => console.log('Call answered'),
onCallEnded: () => console.log('Call ended'),
onCallInitiated: (callInfo) => console.log('Call initiated'),
// Call controls
onMuteToggle: (isMuted) => console.log('Mute:', isMuted),
onHoldToggle: (isHeld) => console.log('Hold:', isHeld),
onDurationUpdate: (seconds) => console.log('Duration:', seconds),
// Error handling
onError: (error) => console.error('Error:', error)
};
MIT License - see the LICENSE file for details.
FAQs
A powerful WebRTC SIP client library for making and receiving voice calls in web browsers. Built with modern JavaScript and TypeScript support.
We found that voice-sdk-dialer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.