���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /usr/local/FlashphonerWebCallServer/client/examples/min/phone/ |
// Init WCS JavaScript API var f = Flashphoner.getInstance(); // Current call incoming or outgoing var currentCall; // Init Flashphoner API function initAPI() { f.addListener(WCSEvent.ErrorStatusEvent, errorEvent); f.addListener(WCSEvent.ConnectionStatusEvent, connectionStatusListener); f.addListener(WCSEvent.RegistrationStatusEvent, registrationStatusListener); f.addListener(WCSEvent.CallStatusEvent, callStatusListener); f.addListener(WCSEvent.OnCallEvent, callListener, this); f.init(); } // New connection function connect() { f.connect({urlServer: field("urlServer"), appKey: 'defaultApp', sipLogin: field("sipLogin"), sipPassword: field("sipPassword"), sipDomain: field("sipDomain"), sipPort: parseInt(field("sipPort"))}); } // Hangup the call function hangup() { f.hangup(currentCall); } // Mute audio during the call function mute() { f.mute(); } // Unmute audio during the call function unmute() { f.unmute(); } // New call function call() { var call = new Call(); call.callee = field("callee"); currentCall = f.call(call); } // Answer the call function answer() { f.answer(currentCall); } // Connection Status function connectionStatusListener(event) { trace(event.status); if (event.status == ConnectionStatus.Established) { trace('Connection has been established. You can start a new call.'); } } // Registration Status function registrationStatusListener(event) { trace(event.status); } // Incoming call handler function callListener(event) { var call = event; trace("Phone - callListener " + call.callId + " call.mediaProvider: " + call.mediaProvider + " call.status: " + call.status); currentCall = call; } // Call Status function callStatusListener(event) { trace(event.status); if (event.status == CallStatus.ESTABLISHED) { trace('Call ' + event.callId + ' is established'); } } // Error function errorEvent(event) { trace(event.info); } // Trace function trace(str) { console.log(str); } //Get field function field(name){ var field = document.getElementById(name).value; return field; }