1.7.0 • Published 4 years ago
react-softphone v1.7.0
React SoftPhone
Install
npm install --save react-softphone
Usage
import React from 'react'
import SoftPhone from 'react-softphone'
import { WebSocketInterface } from 'jssip';
const config = {
domain: 'sip-server@your-domain.io', // sip-server@your-domain.io
uri: 'sip:sip-user@your-domain.io', // sip:sip-user@your-domain.io
password: 'secret', // PASSWORD ,
ws_servers: 'wss://sip-user@your-domain.io:8089/ws', //ws server
sockets: new WebSocketInterface('wss://sip-server@your-domain.io:8089/ws'),
display_name: '***',//jssip Display Name
debug: false // Turn debug messages on
};
const setConnectOnStartToLocalStorage =(newValue)=>{
// Handle save the auto connect value to local storage
return true
}
const setNotifications =(newValue)=>{
// Handle save the Show notifications of an incoming call to local storage
return true
}
const setCallVolume =(newValue)=>{
// Handle save the call Volume value to local storage
return true
}
const setRingVolume =(newValue)=>{
// Handle save the Ring Volume value to local storage
return true
}
function App() {
return (
<div className="App">
<header className="App-header">
<SoftPhone
callVolume={33} //Set Default callVolume
ringVolume={44} //Set Default ringVolume
connectOnStart={false} //Auto connect to sip
notifications={false} //Show Browser Notification of an incoming call
config={config} //Voip config
setConnectOnStartToLocalStorage={setConnectOnStartToLocalStorage} // Callback function
setNotifications={setNotifications} // Callback function
setCallVolume={setCallVolume} // Callback function
setRingVolume={setRingVolume} // Callback function
timelocale={'UTC+3'} //Set time local for call history
/>
</header>
</div>
);
}
export default App;
License
MIT © prinze77
This hook is created using create-react-hook.
1.7.0
4 years ago
1.6.0
5 years ago
1.5.0
5 years ago
1.4.0
5 years ago
1.3.0
5 years ago
1.2.0
5 years ago
1.1.3
5 years ago
1.2.1
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.11-0
5 years ago
1.0.10
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.1-11
5 years ago
1.0.1-10
5 years ago
1.0.1-9
5 years ago
1.0.1-8
5 years ago
1.0.1-7
5 years ago
1.0.1-6
5 years ago
1.0.1-5
5 years ago
1.0.1-4
5 years ago
1.0.1-3
5 years ago
1.0.1-2
5 years ago
1.0.1-1
5 years ago
1.0.1-0
5 years ago