VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
SWheeler at usinternet... Guest
|
Posted: Mon Jul 21, 2014 4:59 pm Post subject: [asterisk-users] Call Identifier Logging |
|
|
Hello,
I am working on upgrading from Asterisk 1.8 to Asterisk 11.6. One of the features we are excited for is Call Identifier Logging. However, it doesn't appear that this new Call ID is accessible from the dial plan. Ideally we would like to store this Call ID in the CDR. Does anyone know if this is possible?
I could do something like this, but it seems like a terrible hack:
same => n,Set(CALLID=${SHELL(asterisk -rx "core show channel ${CHANNEL}" | grep ' Call Identifer' | egrep -o 'C-[0-9a-f]+')})
Also as a side note, in the core show channel output ' Identifier' is misspelt as ' Identifer'
Steven Wheeler |
|
Back to top |
|
|
rafaelsnsa at gmail.com Guest
|
Posted: Tue Jul 22, 2014 12:44 pm Post subject: [asterisk-users] Call Identifier Logging |
|
|
Hi
I tried this in ael:
_000. => {
Proceeding();
callident = "${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}";
NoOp(${callident}});
Dial(Motif/google/+${EXTEN:3}@voice.google.com ([email]EXTEN%3A3%7D@voice.google.com[/email]),,r);
hangup;
}
And worked perfectly.
It would be interesting, the developer team add a variable to channel with this data.
Att,Rafael dos Santos Saraiva
[/url]
2014-07-21 18:59 GMT-03:00 Steven Wheeler <SWheeler@usinternet.com (SWheeler@usinternet.com)>:
Quote: |
Hello,
I am working on upgrading from Asterisk 1.8 to Asterisk 11.6. One of the features we are excited for is [url=https://wiki.asterisk.org/wiki/display/AST/Call+Identifier+Logging]Call Identifier Logging. However, it doesn't appear that this new Call ID is accessible from the dial plan. Ideally we would like to store this Call ID in the CDR. Does anyone know if this is possible?
I could do something like this, but it seems like a terrible hack:
same => n,Set(CALLID=${SHELL(asterisk -rx "core show channel ${CHANNEL}" | grep ' Call Identifer' | egrep -o 'C-[0-9a-f]+')})
Also as a side note, in the core show channel output ' Identifier' is misspelt as ' Identifer'
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
|
|
|
Back to top |
|
|
EWieling at nyigc.com Guest
|
Posted: Tue Jul 22, 2014 12:46 pm Post subject: [asterisk-users] Call Identifier Logging |
|
|
Making LinkedID available in the dialplan would also be useful.
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Rafael dos Santos Saraiva
Sent: Tuesday, July 22, 2014 1:44 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Call Identifier Logging
Hi
I tried this in ael:
_000. => {
Proceeding();
callident = "${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}";
NoOp(${callident}});
Dial(Motif/google/+${EXTEN:3}@voice.google.com ([email]EXTEN%3A3%7D@voice.google.com[/email]),,r);
hangup;
}
And worked perfectly.
It would be interesting, the developer team add a variable to channel with this data.
Att,
Rafael dos Santos Saraiva
[/url]
2014-07-21 18:59 GMT-03:00 Steven Wheeler <SWheeler@usinternet.com (SWheeler@usinternet.com)>:
Hello,
I am working on upgrading from Asterisk 1.8 to Asterisk 11.6. One of the features we are excited for is [url=https://wiki.asterisk.org/wiki/display/AST/Call+Identifier+Logging]Call Identifier Logging. However, it doesn't appear that this new Call ID is accessible from the dial plan. Ideally we would like to store this Call ID in the CDR. Does anyone know if this is possible?
I could do something like this, but it seems like a terrible hack:
same => n,Set(CALLID=${SHELL(asterisk -rx "core show channel ${CHANNEL}" | grep ' Call Identifer' | egrep -o 'C-[0-9a-f]+')})
Also as a side note, in the core show channel output ' Identifier' is misspelt as ' Identifer'
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 |
|
Back to top |
|
|
rmudgett at digium.com Guest
|
Posted: Tue Jul 22, 2014 12:56 pm Post subject: [asterisk-users] Call Identifier Logging |
|
|
On Tue, Jul 22, 2014 at 12:45 PM, Eric Wieling <EWieling@nyigc.com (EWieling@nyigc.com)> wrote:
Quote: |
Making LinkedID available in the dialplan would also be useful.
|
LinkedID is already available in the dialplan: CHANNEL(linkedid)
Richard |
|
Back to top |
|
|
EWieling at nyigc.com Guest
|
Posted: Tue Jul 22, 2014 1:02 pm Post subject: [asterisk-users] Call Identifier Logging |
|
|
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 ~]#
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Richard Mudgett
Sent: Tuesday, July 22, 2014 1:56 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Call Identifier Logging
On Tue, Jul 22, 2014 at 12:45 PM, Eric Wieling <EWieling@nyigc.com (EWieling@nyigc.com)> wrote:
Making LinkedID available in the dialplan would also be useful.
LinkedID is already available in the dialplan: CHANNEL(linkedid)
Richard |
|
Back to top |
|
|
SWheeler at usinternet... Guest
|
Posted: Tue Jul 22, 2014 1:08 pm Post subject: [asterisk-users] Call Identifier Logging |
|
|
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 |
|
Back to top |
|
|
EWieling at nyigc.com Guest
|
Posted: Tue Jul 22, 2014 1:14 pm Post subject: [asterisk-users] Call Identifier Logging |
|
|
Where is this documented?
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Steven Wheeler
Sent: Tuesday, July 22, 2014 2:08 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Call Identifier Logging
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 |
|
Back to top |
|
|
rafaelsnsa at gmail.com Guest
|
Posted: Tue Jul 22, 2014 1:16 pm Post subject: [asterisk-users] Call Identifier Logging |
|
|
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
[/url]
2014-07-22 15:08 GMT-03:00 Steven Wheeler <SWheeler@usinternet.com (SWheeler@usinternet.com)>:
Quote: |
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 [url=http://www.api-digital.com]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
|
|
|
Back to top |
|
|
SWheeler at usinternet... Guest
|
Posted: Tue Jul 22, 2014 1:24 pm Post subject: [asterisk-users] Call Identifier Logging |
|
|
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
Where is this documented?
It does not appear to be documented. However, there is a reference in the Asterisk: The Definitive Guide.
Steven Wheeler |
|
Back to top |
|
|
SWheeler at usinternet... Guest
|
Posted: Tue Jul 22, 2014 1:26 pm Post subject: [asterisk-users] Call Identifier Logging |
|
|
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
This isn't a suitable long term solution as it requires launching several external processes just to gain access to an internal variable. It is also likely to create bugs in the future if someone changes the output of that command. For instance if they fix the typo in "Call Identifer".
Steven Wheeler |
|
Back to top |
|
|
asterisk.org at sedwar... Guest
|
Posted: Tue Jul 22, 2014 2:22 pm Post subject: [asterisk-users] Call Identifier Logging |
|
|
On Tue, 22 Jul 2014, Steven Wheeler wrote:
Quote: | 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}";
|
Not really interested in this topic, but invoking 6 processes seems a bit
excessive
How about something like:
asterisk -rx "core show channel SIP/spa841-00000003"\
| awk '/Call Identifer/ {gsub(/[][]/,""); print $3}'
Of course, a dialplan function would be best.
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards@sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
--
_____________________________________________________________________
-- 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 |
|
Back to top |
|
|
asterisk.org at sedwar... Guest
|
Posted: Tue Jul 22, 2014 2:29 pm Post subject: [asterisk-users] Call Identifier Logging |
|
|
On Tue, 22 Jul 2014, Steve Edwards wrote:
Quote: | How about something like:
asterisk -rx "core show channel SIP/spa841-00000003"\
| awk '/Call Identifer/ {gsub(/[][]/,""); print $3}'
|
Or:
asterisk -rx "core show channel SIP/spa841-00000003"\
| awk -F'[][]' '/Call Identifer/ {print $2}'
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards@sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
--
_____________________________________________________________________
-- 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 |
|
Back to top |
|
|
mjordan at digium.com Guest
|
Posted: Tue Jul 22, 2014 2:42 pm Post subject: [asterisk-users] Call Identifier Logging |
|
|
On Tue, Jul 22, 2014 at 2:29 PM, Steve Edwards
<asterisk.org@sedwards.com> wrote:
Quote: | On Tue, 22 Jul 2014, Steve Edwards wrote:
Quote: | How about something like:
asterisk -rx "core show channel SIP/spa841-00000003"\
| awk '/Call Identifer/ {gsub(/[][]/,""); print $3}'
|
Or:
asterisk -rx "core show channel SIP/spa841-00000003"\
| awk -F'[][]' '/Call Identifer/ {print $2}'
|
This is one of those features that is embarrassingly simple and yet,
unfortunately, was overlooked.
Ideally, it'd be in the CHANNEL function.
If anyone is curious, the accessor function you want is
ast_channel_callid. It returns the callid ref bumped, so you do have
to make sure you decrement the ref count using ast_callid_unref. You
can print the callid to the CHANNEL function's buffer using
ast_callid_strnprint.
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
--
_____________________________________________________________________
-- 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 |
|
Back to top |
|
|
rafaelsnsa at gmail.com Guest
|
Posted: Tue Jul 22, 2014 2:45 pm Post subject: [asterisk-users] Call Identifier Logging |
|
|
Really, a dialplan function would be best. I too don't like of an idea of using a external process to get internal variables, but when necessary...
Att,Rafael dos Santos Saraiva
[/url]
2014-07-22 16:29 GMT-03:00 Steve Edwards <asterisk.org@sedwards.com (asterisk.org@sedwards.com)>:
Quote: | On Tue, 22 Jul 2014, Steve Edwards wrote:
Quote: | How about something like:
asterisk -rx "core show channel SIP/spa841-00000003"\
| awk '/Call Identifer/ {gsub(/[][]/,""); print $3}'
|
Or:
asterisk -rx "core show channel SIP/spa841-00000003"\
| awk -F'[][]' '/Call Identifer/ {print $2}'
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards@sedwards.com (sedwards@sedwards.com) Voice: [url=tel:%2B1-760-468-3867]+1-760-468-3867 PST
Newline Fax: [url=tel:%2B1-760-731-3000]+1-760-731-3000[/url]
--
_____________________________________________________________________
-- 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
|
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|