[asterisk-users] Call Identifier Logging

Rafael dos Santos Saraiva rafaelsnsa at gmail.com
Tue Jul 22 13:16:28 CDT 2014


Try this:
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}";


Att,
*Rafael dos Santos Saraiva*
<http://br.linkedin.com/pub/rafael-saraiva/52/aab/230>


2014-07-22 15:08 GMT-03:00 Steven Wheeler <SWheeler at usinternet.com>:

>  Making LinkedID available in the dialplan would also be useful.
>
> LinkedID is already available in the dialplan: CHANNEL(linkedid)
>
> Which version was that added?  I don’t see it on my 11.10.0
>
>
>
> [daffy-01 ~]# asterisk -rx "core show function CHANNEL" | grep -i link
>
> [daffy-01 ~]#
>
>
>
>
>
> According to funcs/func_channel.c
>
>     468         else if (!strcasecmp(data, "linkedid")) {
>
>     469                 ast_channel_lock(chan);
>
>     470                 if (ast_strlen_zero(ast_channel_linkedid(chan))) {
>
>     471                         /* fall back on the channel's uniqueid if
> linkedid is unset */
>
>     472                         ast_copy_string(buf,
> ast_channel_uniqueid(chan), len);
>
>     473                 }
>
>     474                 else {
>
>     475                         ast_copy_string(buf,
> ast_channel_linkedid(chan), len);
>
>     476                 }
>
>     477                 ast_channel_unlock(chan);
>
>
>
> While useful, that doesn't solve the problem of being able to store the
> channel's logging identifier in CDR.
>
>
>
> *Steven Wheeler*
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140722/57dc9ed4/attachment.html>


More information about the asterisk-users mailing list