<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hey Francesco,</p>
my guess is that you don't have to answer the a-Leg. Usually the
bridge application answers the a-Leg when the b-Leg answers.<br>
So your FXO card doesn't push an answer-event?<br>
<br>
Paul<br>
<br>
<div class="moz-cite-prefix">Am 05.04.2018 um 18:45 schrieb
Francesco Facco de Lagarda:<br>
</div>
<blockquote type="cite"
cite="mid:056701d3ccfd$782db550$68891ff0$@delagarda.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;
mso-fareast-language:IT;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;
mso-fareast-language:IT;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;
mso-fareast-language:EN-US;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">Thanks
Paul for you interest! Much appreciated.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">Almost
solved!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">Js
script called dialplan.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">I’m
using this code:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">if
(session.ready()) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">session.answer();<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var sessOut = new
Session("sofia/gateway/realtoneFXO/" + dialedNum +
"@192.168.0.216:5060");<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">if (sessOut.ready()) {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">
bridge(session, sessOut);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">sessOut.hangup();<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">session.hangup();<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var xml = new XML
("<xml>" + sessOut.generateXmlCdr() + "</xml>");<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var xmlCDR
= xml.getChild('cdr');<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var xmCallFlow
= xmlCDR.getChild('callflow');<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var xmTimes
= xmCallFlow.getChild('times');<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var created_time
=
parseInt(xmTimes.getChild('created_time').data);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var
profile_created_time =
parseInt(xmTimes.getChild('profile_created_time').data);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var progress_time
=
parseInt(xmTimes.getChild('progress_time').data);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var
progress_media_time =
parseInt(xmTimes.getChild('progress_media_time').data);
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var
answered_time =
parseInt(xmTimes.getChild('answered_time').data); <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var
bridged_time =
parseInt(xmTimes.getChild('bridged_time').data); <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var
last_hold_time =
parseInt(xmTimes.getChild('last_hold_time').data); <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var
hold_accum_time =
parseInt(xmTimes.getChild('hold_accum_time').data);
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var
hangup_time =
parseInt(xmTimes.getChild('hangup_time').data); <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var
resurrect_time =
parseInt(xmTimes.getChild('resurrect_time').data); <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var
transfer_time =
parseInt(xmTimes.getChild('transfer_time').data); <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="color:windowtext" lang="EN-US">var callLength =
(hangup_time - answered_time)/1000000;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">which
works fine BUT, as "sofia/gateway/realtoneFXO/" is on analog
line (FXO), it does not actually communicate the on-answer
properly, so the call length is the total length including
dialing, waiting for ring, ringing … and not just the
speaking time…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US">as
you see from these values, the answered_time and bridge_time
are identical!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><created_time>1522946076054074</created_time><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><profile_created_time>1522946076054074</profile_created_time><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><progress_time>0</progress_time><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><progress_media_time>0</progress_media_time><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><answered_time>1522946079154074</answered_time><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><bridged_time>1522946079154074</bridged_time><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><last_hold_time>0</last_hold_time><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><hold_accum_time>0</hold_accum_time><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><hangup_time>1522946095634072</hangup_time><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><resurrect_time>0</resurrect_time><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><transfer_time>0</transfer_time><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="color:windowtext;mso-fareast-language:IT"
lang="EN-US">From:</span></b><span
style="color:windowtext;mso-fareast-language:IT"
lang="EN-US"> FreeSWITCH-users
<a class="moz-txt-link-rfc2396E" href="mailto:freeswitch-users-bounces@lists.freeswitch.org"><freeswitch-users-bounces@lists.freeswitch.org></a> <b>On
Behalf Of </b>Paul Zillmann<br>
<b>Sent:</b> giovedì 5 aprile 2018 18:00<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
<b>Subject:</b> Re: [Freeswitch-users] cdr via
javascript<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p>nodeJS or Browser?<span style="mso-fareast-language:IT"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Am 05.04.2018 um 16:39 schrieb Francesco
Facco de Lagarda:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US">Is there any way I can
interrogate cdr data of a call that has finished via
javascript?<br>
I see no samples of cdr data with js.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Thanks</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">F</span><o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:IT"><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_________________________________________________________________________<o:p></o:p></pre>
<pre>Professional FreeSWITCH Consulting Services:<o:p></o:p></pre>
<pre><a href="mailto:consulting@freeswitch.org" moz-do-not-send="true">consulting@freeswitch.org</a><o:p></o:p></pre>
<pre><a href="http://www.freeswitchsolutions.com" moz-do-not-send="true">http://www.freeswitchsolutions.com</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Official FreeSWITCH Sites<o:p></o:p></pre>
<pre><a href="http://www.freeswitch.org" moz-do-not-send="true">http://www.freeswitch.org</a><o:p></o:p></pre>
<pre><a href="http://confluence.freeswitch.org" moz-do-not-send="true">http://confluence.freeswitch.org</a><o:p></o:p></pre>
<pre><a href="http://www.cluecon.com" moz-do-not-send="true">http://www.cluecon.com</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>FreeSWITCH-users mailing list<o:p></o:p></pre>
<pre><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" moz-do-not-send="true">FreeSWITCH-users@lists.freeswitch.org</a><o:p></o:p></pre>
<pre><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" moz-do-not-send="true">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><o:p></o:p></pre>
<pre>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" moz-do-not-send="true">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><o:p></o:p></pre>
<pre><a href="http://www.freeswitch.org" moz-do-not-send="true">http://www.freeswitch.org</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span style="mso-fareast-language:IT"><o:p> </o:p></span></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>
Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a></pre>
</blockquote>
<br>
</body>
</html>