<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#000066">Is there something I can do regarding this issue?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 16 June 2014 11:39, Tiago Geada <span dir="ltr"><<a href="mailto:tiago.geada@gmail.com" target="_blank">tiago.geada@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#000066">Hi,</div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#000066"><br></div>
<div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#000066">Thank you for your explanation about channel halds .. These .call files are always different from other calls.</div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#000066">
<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#000066">Well I would like some custom var to have a piece of information while it is queuing, and another piece of information, once answered in queue, thus just before dialing to context outbound.</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#000066"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#000066">the outbound cdr bit, is fine. I'm now interested in the - Context,Extension - or the ;1 half of the channel. Here I would like to set remoteUid=bar but although the Set() is there and shown in verbosity, the insert query doesn't take it in.</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#000066"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#000066">The CDR bit with remoteUid=foo is OK, the bit that should have remoteUid=bar is not</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#000066"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#000066"><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote"><div><div class="h5">On 11 June 2014 19:24, Matthew Jordan <span dir="ltr"><<a href="mailto:mjordan@digium.com" target="_blank">mjordan@digium.com</a>></span> wrote:<br></div></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div>On Wed, Jun 11, 2014 at 9:10 AM, Tiago Geada <span dir="ltr"><<a href="mailto:tiago.geada@gmail.com" target="_blank">tiago.geada@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:tahoma,sans-serif;font-size:small;color:rgb(0,0,102)">Hi,</div>
<div style="font-family:tahoma,sans-serif;font-size:small;color:rgb(0,0,102)"><br></div>
<div style="font-family:tahoma,sans-serif;font-size:small;color:rgb(0,0,102)">Let me append some extra info</div><div style="font-family:tahoma,sans-serif;font-size:small;color:rgb(0,0,102)">
<br></div><div style="font-family:tahoma,sans-serif;font-size:small;color:rgb(0,0,102)">cdr variable foo, shows on database, but value 'bar' doens't</div><div style="font-family:tahoma,sans-serif;font-size:small;color:rgb(0,0,102)">
<br></div><div style="font-family:tahoma,sans-serif;font-size:small;color:rgb(0,0,102)">its not even shown in the insert query</div><div style="font-family:tahoma,sans-serif;font-size:small;color:rgb(0,0,102)">
<br></div><div style="font-family:tahoma,sans-serif;font-size:small;color:rgb(0,0,102)">I tried with master_channel but no change</div></div><div><div><div class="gmail_extra"><br></div></div></div></blockquote>
</div><div><br><div>I think you need to be a bit more specific about what CDR records you're getting and what you'd like to have happen.<br><br></div>You have the following call file:<br><br></div><div><snip><br>
</div><div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div class="gmail_extra"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"></span><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div link="blue" vlink="purple" lang="EN-US"><div><div><div><div><div><div><div>
</div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"><u></u> <u></u></span></p>
</div><div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)">## test call file</span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div>
<div>
<p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)">Channel: Local/queue@TiagoGeada</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)">CallerID: teste-geada:0:<a href="tel:210332450" value="+351210332450" target="_blank">210332450</a>:</span><u></u><u></u></p>
</div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)">MaxRetries: 0</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)">RetryTime: 1</span><u></u><u></u></p>
</div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)">WaitTime: 8640</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)">Account: teste-geada</span><u></u><u></u></p>
</div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)">Context: TiagoGeada</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)">Extension: outbound</span><u></u><u></u></p>
</div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)">Archive: Yes</span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">
<u></u> </p></div></div></div></div></div></div></div></div></div></blockquote></div></div></div></div></blockquote><div><br></div></div><div>This will create a Local channel with two halves. The ;2 half will execute in the dialplan at TiagoGeada,queue,1 - the ;1 half will execute in the dialplan at TiagoGeada,outbound,1. The ;2 Local channel will execute first until it is Answered; once Answered, that will trigger the ;1 half to start execution. That will create two CDRs, one for each Local channel half.<br>
<br>MASTER_CHANNEL won't apply here, as MASTER_CHANNEL only applies to a Parent/Child relationship between channels, that is, when one channel has created another channel. This occurs when a channel dials another channel. The ;1 side didn't create the ;2 side, they are effectively two sides of the same "channel".<br>
<br> </div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-US"><div><div><div><div><div><div><div><div><p class="MsoNormal"><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div>
<div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)">## dialplan</span><u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"> queue => {</span><u></u><u></u></p></div>
<div>
<p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"> Set(CDR(remoteUid)=foo);</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"> Queue(TiagoGeada,t,,,100);</span><u></u><u></u></p>
</div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"> Hangup();</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"> }</span><u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"> outbound => {</span><u></u><u></u></p></div>
<div>
<p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"> //NoCDR();</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"> //ForkCDR(vdD);</span><u></u><u></u></p>
</div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"> //ResetCDR(v);</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"> Set(CDR(remoteUid,r)=bar);</span><u></u><u></u></p>
</div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"> Dial(Local/<a href="tel:932485457" value="+351932485457" target="_blank">932485457</a>@outbound,,gT);</span><u></u><u></u></p>
</div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"> Hangup();</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif";color:rgb(0,0,102)"> }</span><u></u><u></u></p>
</div></div></div><p class="MsoNormal"><br clear="all"></p></div></div></div></div></div></div></blockquote></div></div></div></div></blockquote></div></div><br></div><div class="gmail_extra">Looking at your Dialplan for the outbound extension, you dial yet another Local channel. I would expect this to result in 3 CDR entries:<br>
<span style="font-family:courier new,monospace"><br></span></div><div class="gmail_extra"><span style="font-family:courier new,monospace">Source Channel Destination Channel<br>Local/queue@TiagoGeada;2<br>
</span></div>
<div class="gmail_extra"><span style="font-family:courier new,monospace">Local/queue@TiagoGeada;1 Local/<a href="tel:932485427" value="+351932485427" target="_blank">932485427</a>@outbound;1<br></span></div><div class="gmail_extra">
<span style="font-family:courier new,monospace">Local/<a href="tel:932485457" value="+351932485457" target="_blank">932485457</a>@outbound;2</span><br>
<br></div><div class="gmail_extra">So, the question is, which CDR are you talking about? What value do you want where? Keep in mind that unless all channels are answered, they won't show up in your CDRs (unless you have unanswered=yes set in cdr.conf).<span><font color="#888888"><br>
<br>-- <br><div dir="ltr"><div>Matthew Jordan<br></div><div>Digium, Inc. | Engineering Manager</div><div>445 Jan Davis Drive NW - Huntsville, AL 35806 - USA</div><div>Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> & <a href="http://asterisk.org" target="_blank">http://asterisk.org</a></div>
</div>
</font></span></div></div>
<br></div></div><div class="">--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></div></blockquote></div><br></div>
</blockquote></div><br></div>