<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (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:Cambria;
        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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Cambria","serif";
        color:#000066;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">Hello list,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">I&#8217;m trying to populate my CDR logs with values which are available after the call has started (e.g. signalling IP of remote user, media IP, codec etc.). While CHANNEL function give
 me all I need for the incoming leg (leg A), I can&#8217;t get the relevant values for the outgoing channel. I&#8217;ve tried using the option &#8216;U&#8217; with my dial command (execute subroutine for called channel after called channel answered but before the call is bridged).
 While this throws the correct information to the console it does not populate the CDRs accordingly.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">Note: Asterisk ver is 1.8.7.1 and CDR&#8217;s are written to MySQL with adaptive ODBC and the table therein contains the relevant fields.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">This is the console with &#8216;very-verbose&#8217; output for the &#8216;Dial&#8217; application where office_Admin2, IP 192.168.20.222, is calling office_ServerRoom, IP 192.168.20.226. My comments added
 prefixed by ** and on separate line:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">** channel here is source channel: SIP/office_Admin2-00000015<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:31]&nbsp;&nbsp;&nbsp;&nbsp; -- Executing [316@InternalDP:5] Dial(&quot;SIP/office_Admin2-00000015&quot;, &quot;SIP/office_ServerRoom,,FgU(jump2SetVar)&quot;) in new stack<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:31]&nbsp;&nbsp; == Using UDPTL CoS mark 5<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:31]&nbsp;&nbsp; == Using SIP RTP CoS mark 5<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:31]&nbsp;&nbsp;&nbsp;&nbsp; -- Called SIP/office_ServerRoom<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:31]&nbsp;&nbsp;&nbsp;&nbsp; -- SIP/office_ServerRoom-00000016 is ringing<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:31]&nbsp;&nbsp;&nbsp;&nbsp; -- SIP/office_ServerRoom-00000016 is ringing<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:33]&nbsp;&nbsp;&nbsp;&nbsp; -- SIP/office_ServerRoom-00000016 answered SIP/office_Admin2-00000015<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">** from here the channel is the destination channel: SIP/office_ServerRoom-00000016<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:33]&nbsp;&nbsp;&nbsp;&nbsp; -- Executing [s@jump2SetVar:1] Gosub(&quot;SIP/office_ServerRoom-00000016&quot;, &quot;SetVar,postdial,1&quot;) in new stack<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">** This is how I obtain channel information:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">** exten =&gt; postdial,1,Set(CDR(chanoutsigip)=${CHANNEL(peerip)}:${SIPPEER(${CHANNEL(peername)},port)})<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">** same =&gt; n,Set(CDR(chanoutmediaip)=${CHANNEL(rtpdest,audio)})<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">** same =&gt; n,Set(CDR(chanoutcodec)=${CHANNEL(audionativeformat)})<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:33]&nbsp;&nbsp;&nbsp;&nbsp; -- Executing [postdial@SetVar:1] Set(&quot;SIP/office_ServerRoom-00000016&quot;, &quot;CDR(chanoutsigip)=192.168.20.226:5065&quot;) in new stack<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:33]&nbsp;&nbsp;&nbsp;&nbsp; -- Executing [postdial@SetVar:2] Set(&quot;SIP/office_ServerRoom-00000016&quot;, &quot;CDR(chanoutmediaip)=192.168.20.226:23008&quot;) in new stack<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:33]&nbsp;&nbsp;&nbsp;&nbsp; -- Executing [postdial@SetVar:3] Set(&quot;SIP/office_ServerRoom-00000016&quot;, &quot;CDR(chanoutcodec)=g729&quot;) in new stack<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:33]&nbsp;&nbsp;&nbsp;&nbsp; -- Executing [postdial@SetVar:4] Goto(&quot;SIP/office_ServerRoom-00000016&quot;, &quot;endsub,1&quot;) in new stack<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:33]&nbsp;&nbsp;&nbsp;&nbsp; -- Goto (SetVar,endsub,1)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:33]&nbsp;&nbsp;&nbsp;&nbsp; -- Executing [endsub@SetVar:1] Return(&quot;SIP/office_ServerRoom-00000016&quot;, &quot;&quot;) in new stack<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:33]&nbsp;&nbsp;&nbsp;&nbsp; -- Executing [s@jump2SetVar:2] Return(&quot;SIP/office_ServerRoom-00000016&quot;, &quot;&quot;) in new stack<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:33]&nbsp;&nbsp;&nbsp;&nbsp; -- Executing [s@app_dial_gosub_virtual_context:1] NoOp(&quot;SIP/office_ServerRoom-00000016&quot;, &quot;&quot;) in new stack<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:33]&nbsp;&nbsp;&nbsp;&nbsp; -- Auto fallthrough, channel 'SIP/office_ServerRoom-00000016' status is 'UNKNOWN'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">[Dec&nbsp; 1 12:14:33]&nbsp;&nbsp;&nbsp;&nbsp; -- Remotely bridging SIP/office_Admin2-00000015 and SIP/office_ServerRoom-00000016<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">When call is terminated the relevant fields in the database for CDR(chanoutsigip), CDR(chanoutmediaip) and CDR(chanoutcodec) are populated with their default values (typically blank
 or &#8216;-----&#8216;) and NOT with the values above.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">Am I doing something wrong or is there a different way to populate CDR&#8217;s with info from called channel (leg B)?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">Thank you for your replies&#8230;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#000066">Harel<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">This electronic message and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the named addressee you should not disseminate
 or distribute a copy of this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could
 be intercepted, corrupted, lost, destroyed, arrive late or incomplete.<br>
Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments. The sender therefore does not accept
 liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.<br>
<br>
EasyCall Ltd<br>
</font>
</body>
</html>