<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:&quot;Courier New&quot;">first receive call into to &quot;ringing&quot; event --&gt; answering --&gt; active --&gt; hangout --&gt; destroy</pre><br><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:&quot;Courier New&quot;">second receive call into to &quot;destroy&quot; event</pre>this is my code<br><br><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:&quot;Courier New&quot;">(<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">&quot;</span><span style="color:rgb(0,0,128);font-weight:bold">\\</span><span style="color:rgb(0,128,0);font-weight:bold">[&quot;</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">&quot;</span><span style="color:rgb(0,0,128);font-weight:bold">\\</span><span style="color:rgb(0,128,0);font-weight:bold">]&quot;</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">&quot;[</span><span style="color:rgb(0,0,128);font-weight:bold">\\</span><span style="color:rgb(0,128,0);font-weight:bold">?&amp;]&quot; </span>+ name + <span style="color:rgb(0,128,0);font-weight:bold">&quot;=([^&amp;#]*)&quot;</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">&quot;&quot; </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">&quot; &quot;</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">&quot;ext&quot;</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">&quot;pass&quot;</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">&quot;extension: &quot; </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">&#39;@<a href="http://conference2.cibersys.com">conference2.cibersys.com</a>&#39;</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">&#39;wss://<a href="http://conference2.cibersys.com:9061">conference2.cibersys.com:9061</a>&#39;</span>,<br>            <span style="color:rgb(102,14,122);font-weight:bold">ringFile</span>: <span style="color:rgb(0,128,0);font-weight:bold">&#39;sounds/bell_ring2.wav&#39;</span>,<br>            <span style="color:rgb(102,14,122);font-weight:bold">tag</span>: <span style="color:rgb(0,128,0);font-weight:bold">&#39;video-container&#39;</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">&quot;make-call&quot;</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">&quot;click&quot;</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">&quot;answer-call&quot;</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">&quot;click&quot;</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">&quot;hang-up-call&quot;</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">&quot;click&quot;</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">&quot;mute-call&quot;</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">&quot;click&quot;</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">&quot;unmute-call&quot;</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">&quot;click&quot;</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">&quot;mute-unmute-call&quot;</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">&quot;click&quot;</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">&quot;hold-call&quot;</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">&quot;click&quot;</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">&quot;unhold-call&quot;</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">&quot;click&quot;</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">&quot;transfer-call&quot;</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">&quot;click&quot;</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">&quot;muteVideo-call&quot;</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">&quot;click&quot;</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">&quot;unmuteVideo-call&quot;</span>).<span style="color:rgb(122,122,67)">addEventListener</span>(<span style="color:rgb(0,128,0);font-weight:bold">&quot;click&quot;</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">&quot;Insert destination number&quot;</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">&quot;Test Guy&quot;</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">&quot;default&quot;</span>,<br>                <span style="color:rgb(102,14,122);font-weight:bold">incomingBandwidth</span>: <span style="color:rgb(0,128,0);font-weight:bold">&quot;default&quot;</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&#39;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">&quot;&quot;</span>,<br>                    <span style="color:rgb(102,14,122);font-weight:bold">email</span>: <span style="color:rgb(0,128,0);font-weight:bold">&quot;<a href="mailto:test@test.com">test@test.com</a>&quot;<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">&quot;answer ponit&quot;</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">&quot;off&quot;</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">&quot;on&quot;</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">&quot;off&quot;</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">&quot;on&quot;</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">&quot;toggle&quot;</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">&quot;Insert transfer destination number&quot;</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">&#39;onWSLogin&#39;</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">&#39;onWSClose&#39;</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">&#39;onDialogState&#39;</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">&#39;ringing&#39;</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">&#39;onDialogState ringing&#39;</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">&#39;new&#39;</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">&#39;Someone is calling you, new!&#39;</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">&#39;requesting&#39;</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">&#39;Someone is calling you, requesting!&#39;</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">&#39;recovering&#39;</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">&#39;Someone is calling you, recovering!&#39;</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">&#39;active&#39;</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">&#39;Someone is calling you, active!&#39;</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">&#39;held&#39;</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">&#39;Someone is calling you, held!&#39;</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">&#39;purge&#39;</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">&#39;Someone is calling you, purge!&#39;</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">&#39;early&#39;</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">&#39;Someone is calling you, early!&#39;</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">&#39;answering&#39;</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">&#39;Someone is calling you, answering!&#39;</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">&#39;hangup&#39;</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">&#39;Someone is calling you, hangup!&#39;</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(&quot;sreamLocalVideo.getVideoTracks()&quot;, 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">&#39;destroy&#39;</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">&#39;Someone is calling you, destroy!&#39;</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>