<div dir="ltr">Try this:<br><div><span style="font-family:arial,sans-serif;font-size:13px">CDR(userfield) = "${SHELL(asterisk -rx "core show channel ${CHANNEL}" | grep "Call Identifer" | cut -d: -f2 | cut -d[ -f2 | cut -d] -f1 | cut -d\n -f1):0:-1}";</span><br>
</div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div><br></div>Att,<div><b>Rafael dos Santos Saraiva</b></div><div><div><a href="http://br.linkedin.com/pub/rafael-saraiva/52/aab/230" target="_blank"><img src="http://www.linkedin.com/img/webpromo/btn_liprofile_blue_80x15_pt_BR.png"></a><br>
</div></div></div></div>
<br><br><div class="gmail_quote">2014-07-22 15:08 GMT-03:00 Steven Wheeler <span dir="ltr"><<a href="mailto:SWheeler@usinternet.com" target="_blank">SWheeler@usinternet.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1f497d">Making LinkedID available in the dialplan would also be useful.</span><u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">LinkedID is already available in the dialplan: CHANNEL(linkedid)<u></u><u></u></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Which version was that added? I don’t see it on my 11.10.0<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1f497d">[daffy-01 ~]# asterisk -rx "core show function CHANNEL" | grep -i link<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1f497d">[daffy-01 ~]#<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">According to funcs/func_channel.c<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas"> 468 else if (!strcasecmp(data, "<span style="background:yellow">linkedid</span>")) {<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas"> 469 ast_channel_lock(chan);<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas"> 470 if (ast_strlen_zero(ast_channel_linkedid(chan))) {<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas"> 471 /* fall back on the channel's uniqueid if linkedid is unset */<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas"> 472 ast_copy_string(buf, ast_channel_uniqueid(chan), len);<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas"> 473 }<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas"> 474 else {<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas"> 475 ast_copy_string(buf, ast_channel_linkedid(chan), len);<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas"> 476 }<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas"> 477 ast_channel_unlock(chan);</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">While useful, that doesn't solve the problem of being able to store the channel's logging identifier in CDR.<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></span></p>
<span class="HOEnZb"><font color="#888888">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif";color:black">Steven Wheeler</span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u><u></u></span></p>
</font></span></div>
</div>
<br>--<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></blockquote></div><br></div>