<div dir="ltr"><div style="font-size:12.8px">Hi Anis,</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><span style="font-size:12.8px">The way I do it is using ESL interface, I use it to initiate the call and monitor events, in your case you can monitor events and extract variable information, upon that take action.</span></div><div style="font-size:12.8px"><span style="font-size:12.8px"><br></span></div><div style="font-size:12.8px"><span style="font-size:12.8px">For example:</span></div><div style="font-size:12.8px"><pre style="font-family:menlo;font-size:9pt"><pre style="font-family:menlo;font-size:9pt"><pre style="color:rgb(0,0,0);font-family:menlo;font-size:9pt"><pre style="font-family:menlo;font-size:9pt">events = <span style="color:rgb(0,128,0);font-weight:bold">&quot;BACKGROUND_JOB &quot; </span>\<br>         <span style="color:rgb(0,128,0);font-weight:bold">&quot;DETECTED_TONE &quot; </span>\<br>         <span style="color:rgb(0,128,0);font-weight:bold">&quot;CHANNEL_OUTGOING &quot; </span>\<br>         <span style="color:rgb(0,128,0);font-weight:bold">&quot;CHANNEL_CREATE &quot; </span>\<br>         <span style="color:rgb(0,128,0);font-weight:bold">&quot;CHANNEL_ANSWER &quot; </span>\<br>         <span style="color:rgb(0,128,0);font-weight:bold">&quot;CHANNEL_PROGRESS_MEDIA &quot; </span>\<br>         <span style="color:rgb(0,128,0);font-weight:bold">&quot;RECORD_START &quot; </span>\<br>         <span style="color:rgb(0,128,0);font-weight:bold">&quot;CHANNEL_HANGUP &quot; </span>\<br>         <span style="color:rgb(0,128,0);font-weight:bold">&quot;CHAN_NOT_IMPLEMENTED &quot;</span></pre></pre><pre style="color:rgb(0,0,0);font-family:menlo;font-size:9pt"><span style="color:rgb(148,85,141)">self</span>.connection.events(<span style="color:rgb(0,128,0);font-weight:bold">&quot;plain&quot;</span>, events)</pre><pre style="color:rgb(0,0,0);font-family:menlo;font-size:9pt"><pre style="font-family:menlo;font-size:9pt">ev_name = reply.getHeader(<span style="color:rgb(0,128,0);font-weight:bold">&#39;Event-Name&#39;</span>)</pre><pre style="font-family:menlo;font-size:9pt">Filter in the event where you get your transfer information and filter by call channel...</pre></pre><pre style="color:rgb(0,0,0);font-family:menlo;font-size:9pt"><pre style="font-family:menlo;font-size:9pt"><span style="color:rgb(0,0,128);font-weight:bold">if </span><span style="color:rgb(148,85,141)">self</span>.call.uuid == reply.getHeader(<span style="color:rgb(0,128,0);font-weight:bold">&quot;Channel-Call-UUID&quot;</span>):</pre></pre></pre><pre style="font-family:menlo;font-size:9pt"><font color="#000000">  variable_</font><span style="font-size:9pt"><font color="#000000">variable_transfer_time</font></span><font color="#000000" style="font-size:9pt"> = reply.getHeader(</font><span style="font-size:9pt;color:rgb(0,128,0);font-weight:bold">&#39;</span><font color="#38761d" style="font-size:9pt"><b>variable_transfer_time</b></font><span style="font-size:9pt;color:rgb(0,128,0);font-weight:bold">&#39;</span><font color="#000000" style="font-size:9pt">)</font><br></pre><pre style="font-family:menlo;font-size:9pt"><font color="#000000" style="font-size:9pt">  if </font><font color="#000000" style="font-size:9pt">variable_</font><span style="font-size:9pt"><font color="#000000">variable_transfer_time:</font></span></pre><pre style="font-family:menlo;font-size:9pt"><span style="font-size:9pt"><font color="#000000">     writedb(&#39;transfer_time&#39;,</font></span><font color="#000000" style="font-size:9pt"> variable_</font><span style="font-size:9pt"><font color="#000000">variable_transfer_time</font></span>)</pre><pre style="font-family:menlo;font-size:9pt"><font color="#000000">  </font></pre><pre style="font-family:menlo;font-size:9pt"><font color="#000000">Take action like write into DB, file, etc..</font></pre><pre style="font-family:menlo;font-size:9pt">Hope it helps</pre><pre style="color:rgb(0,0,0);font-family:menlo;font-size:9pt">You can ping me offline for more details.</pre><pre style="color:rgb(0,0,0);font-family:menlo;font-size:9pt"><br></pre><pre style="color:rgb(0,0,0);font-family:menlo;font-size:9pt">-Gonzalo</pre><pre style="color:rgb(0,0,0);font-family:menlo;font-size:9pt"><br></pre></pre></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 8, 2016 at 2:29 PM, Anis Bedhiafi <span dir="ltr">&lt;<a href="mailto:anis.bedhiafi@e-volut.io" target="_blank">anis.bedhiafi@e-volut.io</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello<div><br></div><div>I am working on application using Freeswitch and SIP.js in which I need to detect if the call is being transferred.</div><div><br></div><div>The Sip.js application is actually an outbound dialer in which I load a list of phone numbers to call.</div><div><br></div><div>The application starts by calling people.</div><div><br></div><div>It is interesting to detect voicemail boxes. For that I am using mod_avmd.</div><div><br></div><div>My problem is when the other end transfers the call, the sip.js client should know that the current call is being transferred.</div><div><br></div><div>Is there a way that the original caller (sip.js client) knows that the call is being transferred?</div><div><br></div><div>I was looking at all the channel variables and I found that the RDNIS variable and the transfer_time variable are filled up when there is a transfer. </div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Is there a way to listen to the channel variables during the call and detect any change? Or is there a better way I can do it?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Thank you for any suggestion.</span></div><span class="HOEnZb"><font color="#888888"><div><br></div><div><span style="font-size:12.8px">Anis Bedhiafi</span></div></font></span></div>
<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>