<div dir="ltr"><div>Hi im user verto.js library and i can execute first call verto-client to verto-client but when i execute second call to same verto-client so failed bucause this is redirect to destroy event<br><br></div><br><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:"Courier New"">first receive call into to "ringing" event --> answering --> active --> hangout --> destroy</pre><br><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:"Courier New"">second receive call into to "destroy" event</pre>this is my code<br><br><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:"Courier New"">(<span style="color:rgb(0,0,128);font-weight:bold">function</span>() {<br> <span style="color:rgb(0,0,128);font-weight:bold">var </span><span style="color:rgb(69,131,131)">vertoHandle</span>, <span style="color:rgb(69,131,131)">vertoCallbacks</span>, <span style="color:rgb(69,131,131)">destinationNumber</span>, <span style="color:rgb(69,131,131)">currentCall</span>, <span style="color:rgb(69,131,131)">ext</span>, <span style="color:rgb(69,131,131)">passExt</span>;<br><br><br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">getParameterByName</span>(name) {<br> name = name.<span style="color:rgb(122,122,67)">replace</span>(<span style="color:rgb(0,0,255)">/[\[]/</span>, <span style="color:rgb(0,128,0);font-weight:bold">"</span><span style="color:rgb(0,0,128);font-weight:bold">\\</span><span style="color:rgb(0,128,0);font-weight:bold">["</span>).<span style="color:rgb(122,122,67)">replace</span>(<span style="color:rgb(0,0,255)">/[\]]/</span>, <span style="color:rgb(0,128,0);font-weight:bold">"</span><span style="color:rgb(0,0,128);font-weight:bold">\\</span><span style="color:rgb(0,128,0);font-weight:bold">]"</span>);<br> <span style="color:rgb(0,0,128);font-weight:bold">var </span><span style="color:rgb(69,131,131)">regex </span>= <span style="color:rgb(0,0,128);font-weight:bold">new </span>RegExp(<span style="color:rgb(0,128,0);font-weight:bold">"[</span><span style="color:rgb(0,0,128);font-weight:bold">\\</span><span style="color:rgb(0,128,0);font-weight:bold">?&]" </span>+ name + <span style="color:rgb(0,128,0);font-weight:bold">"=([^&#]*)"</span>),<br> <span style="color:rgb(69,131,131)">results </span>= <span style="color:rgb(69,131,131)">regex</span>.<span style="color:rgb(122,122,67)">exec</span>(<span style="color:rgb(102,14,122);font-weight:bold">location</span>.<span style="color:rgb(122,122,67)">search</span>);<br> <span style="color:rgb(0,0,128);font-weight:bold">return </span><span style="color:rgb(69,131,131)">results </span>=== <span style="color:rgb(0,0,128);font-weight:bold">null </span>? <span style="color:rgb(0,128,0);font-weight:bold">"" </span>: <span style="color:rgb(122,122,67)">decodeURIComponent</span>(<span style="color:rgb(69,131,131)">results</span>[<span style="color:rgb(0,0,255)">1</span>].<span style="color:rgb(122,122,67)">replace</span>(<span style="color:rgb(0,0,255)">/\+/g</span>, <span style="color:rgb(0,128,0);font-weight:bold">" "</span>));<br> }<br><br> <span style="color:rgb(69,131,131)">ext </span>= <span style="font-style:italic">getParameterByName</span>(<span style="color:rgb(0,128,0);font-weight:bold">"ext"</span>);<br> <span style="color:rgb(69,131,131)">passExt </span>= <span style="font-style:italic">getParameterByName</span>(<span style="color:rgb(0,128,0);font-weight:bold">"pass"</span>);<br> <span style="color:rgb(102,14,122);font-weight:bold">$</span>.<span style="color:rgb(122,122,67)">verto</span>.<span style="color:rgb(122,122,67)">init</span>({}, <span style="font-style:italic">bootstrap</span>);<br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">bootstrap</span>(status) {<br> <span style="color:rgb(102,14,122);font-weight:bold">console</span>.<span style="color:rgb(122,122,67)">log</span>(<span style="color:rgb(0,128,0);font-weight:bold">"extension: " </span>+ <span style="color:rgb(69,131,131)">ext</span>)<br> <span style="color:rgb(69,131,131)">vertoHandle </span>= <span style="color:rgb(0,0,128);font-weight:bold">new </span><span style="color:rgb(102,14,122);font-weight:bold">jQuery</span>.<span style="color:rgb(122,122,67)">verto</span>({<br> <span style="color:rgb(102,14,122);font-weight:bold">login</span>: <span style="color:rgb(69,131,131)">ext </span>+ <span style="color:rgb(0,128,0);font-weight:bold">'@<a href="http://conference2.cibersys.com">conference2.cibersys.com</a>'</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">passwd</span>: <span style="color:rgb(69,131,131)">passExt</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">socketUrl</span>: <span style="color:rgb(0,128,0);font-weight:bold">'wss://<a href="http://conference2.cibersys.com:9061">conference2.cibersys.com:9061</a>'</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">ringFile</span>: <span style="color:rgb(0,128,0);font-weight:bold">'sounds/bell_ring2.wav'</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">tag</span>: <span style="color:rgb(0,128,0);font-weight:bold">'video-container'</span>, <span style="color:rgb(128,128,128);font-style:italic">// specifying video tag in our html<br></span><span style="color:rgb(128,128,128);font-style:italic"> </span><span style="color:rgb(102,14,122);font-weight:bold">deviceParams</span>: {<br> <span style="color:rgb(102,14,122);font-weight:bold">useCamera</span>: <span style="color:rgb(0,0,128);font-weight:bold">true</span>, <span style="color:rgb(128,128,128);font-style:italic">// asking for camera permissions and devices<br></span><span style="color:rgb(128,128,128);font-style:italic"> </span><span style="color:rgb(102,14,122);font-weight:bold">useMic</span>: <span style="color:rgb(0,0,128);font-weight:bold">true</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">useSpeak</span>: <span style="color:rgb(0,0,128);font-weight:bold">true<br></span><span style="color:rgb(0,0,128);font-weight:bold"> </span>},<br> <span style="color:rgb(102,14,122);font-weight:bold">iceServers</span>: <span style="color:rgb(0,0,128);font-weight:bold">true<br></span><span style="color:rgb(0,0,128);font-weight:bold"> </span>}, <span style="color:rgb(69,131,131)">vertoCallbacks</span>);<br><br> <span style="color:rgb(102,14,122);font-weight:bold">document</span>.<span style="color:rgb(122,122,67)">getElementById</span>(<span style="color:rgb(0,128,0);font-weight:bold">"make-call"</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">"click"</span>, <span style="font-style:italic">makeCall</span>);<br> <span style="color:rgb(102,14,122);font-weight:bold">document</span>.<span style="color:rgb(122,122,67)">getElementById</span>(<span style="color:rgb(0,128,0);font-weight:bold">"answer-call"</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">"click"</span>, <span style="font-style:italic">answerCall</span>);<br> <span style="color:rgb(102,14,122);font-weight:bold">document</span>.<span style="color:rgb(122,122,67)">getElementById</span>(<span style="color:rgb(0,128,0);font-weight:bold">"hang-up-call"</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">"click"</span>, <span style="font-style:italic">hangupCall</span>);<br> <span style="color:rgb(102,14,122);font-weight:bold">document</span>.<span style="color:rgb(122,122,67)">getElementById</span>(<span style="color:rgb(0,128,0);font-weight:bold">"mute-call"</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">"click"</span>, <span style="font-style:italic">muteCall</span>);<br> <span style="color:rgb(102,14,122);font-weight:bold">document</span>.<span style="color:rgb(122,122,67)">getElementById</span>(<span style="color:rgb(0,128,0);font-weight:bold">"unmute-call"</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">"click"</span>, <span style="font-style:italic">unmuteCall</span>);<br> <span style="color:rgb(102,14,122);font-weight:bold">document</span>.<span style="color:rgb(122,122,67)">getElementById</span>(<span style="color:rgb(0,128,0);font-weight:bold">"mute-unmute-call"</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">"click"</span>, <span style="font-style:italic">muteUnmuteCall</span>);<br> <span style="color:rgb(102,14,122);font-weight:bold">document</span>.<span style="color:rgb(122,122,67)">getElementById</span>(<span style="color:rgb(0,128,0);font-weight:bold">"hold-call"</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">"click"</span>, <span style="font-style:italic">holdCall</span>);<br> <span style="color:rgb(102,14,122);font-weight:bold">document</span>.<span style="color:rgb(122,122,67)">getElementById</span>(<span style="color:rgb(0,128,0);font-weight:bold">"unhold-call"</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">"click"</span>, <span style="font-style:italic">unholdCall</span>);<br> <span style="color:rgb(102,14,122);font-weight:bold">document</span>.<span style="color:rgb(122,122,67)">getElementById</span>(<span style="color:rgb(0,128,0);font-weight:bold">"transfer-call"</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">"click"</span>, <span style="font-style:italic">transferCall</span>);<br> <span style="color:rgb(102,14,122);font-weight:bold">document</span>.<span style="color:rgb(122,122,67)">getElementById</span>(<span style="color:rgb(0,128,0);font-weight:bold">"muteVideo-call"</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">"click"</span>, <span style="font-style:italic">muteVideoCall</span>);<br> <span style="color:rgb(102,14,122);font-weight:bold">document</span>.<span style="color:rgb(122,122,67)">getElementById</span>(<span style="color:rgb(0,128,0);font-weight:bold">"unmuteVideo-call"</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">"click"</span>, <span style="font-style:italic">unmuteVideoCall</span>);<br> };<br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">makeCall</span>() {<br> <span style="color:rgb(69,131,131)">destinationNumber </span>= <span style="color:rgb(122,122,67)">prompt</span>(<span style="color:rgb(0,128,0);font-weight:bold">"Insert destination number"</span>);<br> <span style="color:rgb(0,0,128);font-weight:bold">if</span>(<span style="color:rgb(69,131,131)">destinationNumber</span>) {<br> <span style="color:rgb(69,131,131)">currentCall </span>= <span style="color:rgb(69,131,131)">vertoHandle</span>.<span style="color:rgb(122,122,67)">newCall</span>({<br> <span style="color:rgb(102,14,122);font-weight:bold">destination_number</span>: <span style="color:rgb(69,131,131)">destinationNumber</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">caller_id_name</span>: <span style="color:rgb(0,128,0);font-weight:bold">"Test Guy"</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">caller_id_number</span>: <span style="color:rgb(69,131,131)">destinationNumber</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">outgoingBandwidth</span>: <span style="color:rgb(0,128,0);font-weight:bold">"default"</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">incomingBandwidth</span>: <span style="color:rgb(0,128,0);font-weight:bold">"default"</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">useVideo</span>: <span style="color:rgb(0,0,128);font-weight:bold">true</span>, <span style="color:rgb(128,128,128);font-style:italic">// telling verto to make a call with video support<br></span><span style="color:rgb(128,128,128);font-style:italic"> </span><span style="color:rgb(102,14,122);font-weight:bold">mirrorInput</span>: <span style="color:rgb(0,0,128);font-weight:bold">true</span>, <span style="color:rgb(128,128,128);font-style:italic">// telling verto to mirror user's webcam<br></span><span style="color:rgb(128,128,128);font-style:italic"> </span><span style="color:rgb(102,14,122);font-weight:bold">useStereo</span>: <span style="color:rgb(0,0,128);font-weight:bold">true</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">useMic</span>: <span style="color:rgb(0,0,128);font-weight:bold">true</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">useSpeak</span>: <span style="color:rgb(0,0,128);font-weight:bold">true</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">dedEnc</span>: <span style="color:rgb(0,0,128);font-weight:bold">false</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">userVariables</span>: {<br> <span style="color:rgb(102,14,122);font-weight:bold">avatar</span>: <span style="color:rgb(0,128,0);font-weight:bold">""</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">email</span>: <span style="color:rgb(0,128,0);font-weight:bold">"<a href="mailto:test@test.com">test@test.com</a>"<br></span><span style="color:rgb(0,128,0);font-weight:bold"> </span>}<br> });<br> }<br><br> };<br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">answerCall</span>() {<br> <span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">answer</span>({<br> <span style="color:rgb(102,14,122);font-weight:bold">useStereo</span>: <span style="color:rgb(0,0,128);font-weight:bold">true</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">useCamera</span>: <span style="color:rgb(0,0,128);font-weight:bold">true</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">useVideo</span>: <span style="color:rgb(0,0,128);font-weight:bold">true</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">useMic</span>: <span style="color:rgb(0,0,128);font-weight:bold">true</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">callee_id_name</span>: <span style="color:rgb(0,128,0);font-weight:bold">"answer ponit"</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">callee_id_number</span>: <span style="color:rgb(69,131,131)">ext<br></span><span style="color:rgb(69,131,131)"> </span>});<br> };<br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">hangupCall</span>() {<br> <span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">hangup</span>();<br> };<br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">muteCall</span>() {<br> <span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">setMute</span>(<span style="color:rgb(0,128,0);font-weight:bold">"off"</span>);<br> };<br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">unmuteCall</span>() {<br> <span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">setMute</span>(<span style="color:rgb(0,128,0);font-weight:bold">"on"</span>);<br> };<br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">muteVideoCall</span>() {<br> <span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">setVideoMute</span>(<span style="color:rgb(0,128,0);font-weight:bold">"off"</span>);<br> };<br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">unmuteVideoCall</span>() {<br> <span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">setVideoMute</span>(<span style="color:rgb(0,128,0);font-weight:bold">"on"</span>);<br> };<br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">muteUnmuteCall</span>() {<br> <span style="color:rgb(69,131,131)">currentCall</span>.mute(<span style="color:rgb(0,128,0);font-weight:bold">"toggle"</span>);<br> };<br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">holdCall</span>() {<br> <span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">hold</span>();<br> };<br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">unholdCall</span>() {<br> <span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">unhold</span>();<br> };<br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">transferCall</span>() {<br> <span style="color:rgb(69,131,131)">destinationNumber </span>= <span style="color:rgb(122,122,67)">prompt</span>(<span style="color:rgb(0,128,0);font-weight:bold">"Insert transfer destination number"</span>);<br> <span style="color:rgb(0,0,128);font-weight:bold">if</span>(<span style="color:rgb(69,131,131)">destinationNumber</span>) {<br> <span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">transfer</span>(<span style="color:rgb(69,131,131)">destinationNumber</span>);<br> }<br> };<br><br> <span style="color:rgb(69,131,131)">vertoCallbacks </span>= {<br> <span style="color:rgb(102,14,122);font-weight:bold">onWSLogin</span>: <span style="font-style:italic">onWSLogin</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">onWSClose</span>: <span style="font-style:italic">onWSClose</span>,<br> <span style="color:rgb(102,14,122);font-weight:bold">onDialogState</span>: <span style="font-style:italic">onDialogState<br></span><span style="font-style:italic"> </span>};<br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">onWSLogin</span>(verto, success) {<br> <span style="color:rgb(102,14,122);font-weight:bold">console</span>.<span style="color:rgb(122,122,67)">log</span>(<span style="color:rgb(0,128,0);font-weight:bold">'onWSLogin'</span>, success, verto);<br> };<br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">onWSClose</span>(verto, success) {<br> <span style="color:rgb(102,14,122);font-weight:bold">console</span>.<span style="color:rgb(122,122,67)">log</span>(<span style="color:rgb(0,128,0);font-weight:bold">'onWSClose'</span>, success);<br> };<br><br> <span style="color:rgb(0,0,128);font-weight:bold">function </span><span style="font-style:italic">onDialogState</span>(dialog) {<br> <span style="color:rgb(102,14,122);font-weight:bold">console</span>.debug(<span style="color:rgb(0,128,0);font-weight:bold">'onDialogState'</span>, dialog);<br><br> <span style="color:rgb(0,0,128);font-weight:bold">if</span>(!<span style="color:rgb(69,131,131)">currentCall</span>) {<br> <span style="color:rgb(69,131,131)">currentCall </span>= dialog;<br> }<br><br> <span style="color:rgb(0,0,128);font-weight:bold">if </span>(<span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">state</span>.<span style="color:rgb(122,122,67)">name </span>== <span style="color:rgb(0,128,0);font-weight:bold">'ringing'</span>) {<br> <span style="color:rgb(102,14,122);font-weight:bold">console</span>.<span style="color:rgb(122,122,67)">warn</span>(<span style="color:rgb(0,128,0);font-weight:bold">'onDialogState ringing'</span>, <span style="color:rgb(69,131,131)">currentCall</span>);<br> }<br><br> <span style="color:rgb(0,0,128);font-weight:bold">if </span>(<span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">state</span>.<span style="color:rgb(122,122,67)">name </span>== <span style="color:rgb(0,128,0);font-weight:bold">'new'</span>) {<br> <span style="color:rgb(102,14,122);font-weight:bold">console</span>.<span style="color:rgb(122,122,67)">warn</span>(<span style="color:rgb(0,128,0);font-weight:bold">'Someone is calling you, new!'</span>);<br> }<br><br> <span style="color:rgb(0,0,128);font-weight:bold">if </span>(<span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">state</span>.<span style="color:rgb(122,122,67)">name </span>== <span style="color:rgb(0,128,0);font-weight:bold">'requesting'</span>) {<br> <span style="color:rgb(102,14,122);font-weight:bold">console</span>.<span style="color:rgb(122,122,67)">warn</span>(<span style="color:rgb(0,128,0);font-weight:bold">'Someone is calling you, requesting!'</span>);<br> }<br><br> <span style="color:rgb(0,0,128);font-weight:bold">if </span>(<span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">state</span>.<span style="color:rgb(122,122,67)">name </span>== <span style="color:rgb(0,128,0);font-weight:bold">'recovering'</span>) {<br> <span style="color:rgb(102,14,122);font-weight:bold">console</span>.<span style="color:rgb(122,122,67)">warn</span>(<span style="color:rgb(0,128,0);font-weight:bold">'Someone is calling you, recovering!'</span>);<br> }<br><br> <span style="color:rgb(0,0,128);font-weight:bold">if </span>(<span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">state</span>.<span style="color:rgb(122,122,67)">name </span>== <span style="color:rgb(0,128,0);font-weight:bold">'active'</span>) {<br> <span style="color:rgb(128,128,128);font-style:italic">//$scope.offLocalVideo();<br></span><span style="color:rgb(128,128,128);font-style:italic"> </span><span style="color:rgb(102,14,122);font-weight:bold">console</span>.<span style="color:rgb(122,122,67)">warn</span>(<span style="color:rgb(0,128,0);font-weight:bold">'Someone is calling you, active!'</span>);<br> }<br><br> <span style="color:rgb(0,0,128);font-weight:bold">if </span>(<span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">state</span>.<span style="color:rgb(122,122,67)">name </span>== <span style="color:rgb(0,128,0);font-weight:bold">'held'</span>) {<br> <span style="color:rgb(102,14,122);font-weight:bold">console</span>.<span style="color:rgb(122,122,67)">warn</span>(<span style="color:rgb(0,128,0);font-weight:bold">'Someone is calling you, held!'</span>);<br> }<br><br> <span style="color:rgb(0,0,128);font-weight:bold">if </span>(<span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">state</span>.<span style="color:rgb(122,122,67)">name </span>== <span style="color:rgb(0,128,0);font-weight:bold">'purge'</span>) {<br> <span style="color:rgb(102,14,122);font-weight:bold">console</span>.<span style="color:rgb(122,122,67)">warn</span>(<span style="color:rgb(0,128,0);font-weight:bold">'Someone is calling you, purge!'</span>);<br> }<br><br> <span style="color:rgb(0,0,128);font-weight:bold">if </span>(<span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">state</span>.<span style="color:rgb(122,122,67)">name </span>== <span style="color:rgb(0,128,0);font-weight:bold">'early'</span>) {<br> <span style="color:rgb(102,14,122);font-weight:bold">console</span>.<span style="color:rgb(122,122,67)">warn</span>(<span style="color:rgb(0,128,0);font-weight:bold">'Someone is calling you, early!'</span>);<br> }<br><br> <span style="color:rgb(0,0,128);font-weight:bold">if </span>(<span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">state</span>.<span style="color:rgb(122,122,67)">name </span>== <span style="color:rgb(0,128,0);font-weight:bold">'answering'</span>) {<br> <span style="color:rgb(102,14,122);font-weight:bold">console</span>.<span style="color:rgb(122,122,67)">warn</span>(<span style="color:rgb(0,128,0);font-weight:bold">'Someone is calling you, answering!'</span>);<br> }<br><br> <span style="color:rgb(0,0,128);font-weight:bold">if </span>(<span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">state</span>.<span style="color:rgb(122,122,67)">name </span>== <span style="color:rgb(0,128,0);font-weight:bold">'hangup'</span>) {<br> <span style="color:rgb(128,128,128);font-style:italic">//$scope.resetCall();<br></span><span style="color:rgb(128,128,128);font-style:italic"><br></span><span style="color:rgb(128,128,128);font-style:italic"> </span><span style="color:rgb(102,14,122);font-weight:bold">console</span>.<span style="color:rgb(122,122,67)">warn</span>(<span style="color:rgb(0,128,0);font-weight:bold">'Someone is calling you, hangup!'</span>);<br> <span style="color:rgb(128,128,128);font-style:italic">//$scope.resetCall();<br></span><span style="color:rgb(128,128,128);font-style:italic"> //console.log("sreamLocalVideo.getVideoTracks()", sreamLocalVideo.getVideoTracks()[0].stop());<br></span><span style="color:rgb(128,128,128);font-style:italic"> //sreamLocalVideo.src=null;<br></span><span style="color:rgb(128,128,128);font-style:italic"> </span>}<br><br> <span style="color:rgb(0,0,128);font-weight:bold">if </span>(<span style="color:rgb(69,131,131)">currentCall</span>.<span style="color:rgb(122,122,67)">state</span>.<span style="color:rgb(122,122,67)">name </span>== <span style="color:rgb(0,128,0);font-weight:bold">'destroy'</span>) {<br> <span style="color:rgb(102,14,122);font-weight:bold">console</span>.<span style="color:rgb(122,122,67)">warn</span>(<span style="color:rgb(0,128,0);font-weight:bold">'Someone is calling you, destroy!'</span>);<br> }<br> }<br>})();<br><br></pre><div><div><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><font face="arial,helvetica,sans-serif">T.S.U Azlain Saavedra<br></font></div><font face="arial,helvetica,sans-serif">Movil: +58 04142528099<br></font><div><font face="arial, helvetica, sans-serif">Skype: azlain.saavedra</font></div></div></div></div></div>
</div></div></div>