The goal of this library is to turn the browser in a softphone based on SIP+WebRTC
Get the libarary fro dist/libwebphone.js
- First of all you need to include the JavaScript in the browser. In order to do so, you need to add the following snippet in your HTML.
- Next need to set the parameter to start connect kazoo platform in below function "StartStack"
}
Methods The phone object has below accessible methods:
StartStack() :: Connect to Kazoo platform with credential and other paramaters phone.Disconnect() :: Logout and disconnect from kazoo platform phone.CallAudioOnly([Number to dial]) :: Audio call generation phone.MuteUnMuteCallAudio() :: Mute / UnMute audio call phone.HoldResumCall() :: park / Unpark audio call phone.HangUpCall() :: Hang up ongoing call phone.CallTransfer([Number to transfer]) :: Call transfer phone.CallAudioVideoBoth([Number to dial]) :: Audio and Video call generation phone.MuteUnMuteCallVideo() :: Stop / Sahring video local video stream
Using this, you should now be able to create some cool applications using softphones in your browser!You can use the kazoopjone example project where the libwebphone.js is used
If you have any question or remark about the library or its documentation, feel free to come talk to us on IRC #2600hz on FreeNode.