VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
tiago.geada at gmail.com Guest
|
Posted: Tue Jun 10, 2014 9:39 am Post subject: [asterisk-users] CDR custom variable on second call leg - vi |
|
|
Hi
We have the following test .call file and test dialplan:
I can't set a custom CDR var to a value on one channel leg, and another value on the connected channel leg?
Is there a way I can woraround this issue?
## test call file
Channel: Local/queue@TiagoGeada
CallerID: teste-geada:0:210332450:
MaxRetries: 0
RetryTime: 1
WaitTime: 8640
Account: teste-geada
Context: TiagoGeada
Extension: outbound
Archive: Yes
## dialplan
queue => {
Set(CDR(remoteUid)=foo);
Queue(TiagoGeada,t,,,100);
Hangup();
}
outbound => {
//NoCDR();
//ForkCDR(vdD);
//ResetCDR(v);
Set(CDR(remoteUid,r)=bar);
Dial(Local/932485457@outbound,,gT);
Hangup();
} |
|
Back to top |
|
|
mikael at wiraya.com Guest
|
Posted: Tue Jun 10, 2014 10:18 am Post subject: [asterisk-users] CDR custom variable on second call leg - vi |
|
|
As far as I know, only way to set variables on another channel would be:
asterisk -rx "core show help dialplan set chanvar"
Usage: dialplan set chanvar <channel> <varname> <value>
Set channel variable <varname> to <value>
On 10 June 2014 16:39, Tiago Geada <tiago.geada@gmail.com (tiago.geada@gmail.com)> wrote:
Quote: | Hi
We have the following test .call file and test dialplan:
I can't set a custom CDR var to a value on one channel leg, and another value on the connected channel leg?
Is there a way I can woraround this issue?
## test call file
Channel: Local/queue@TiagoGeada
CallerID: teste-geada:0:210332450:
MaxRetries: 0
RetryTime: 1
WaitTime: 8640
Account: teste-geada
Context: TiagoGeada
Extension: outbound
Archive: Yes
## dialplan
queue => {
Set(CDR(remoteUid)=foo);
Queue(TiagoGeada,t,,,100);
Hangup();
}
outbound => {
//NoCDR();
//ForkCDR(vdD);
//ResetCDR(v);
Set(CDR(remoteUid,r)=bar);
Dial(Local/932485457@outbound,,gT);
Hangup();
}
--
_____________________________________________________________________
-- 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 Jun 10, 2014 10:25 am Post subject: [asterisk-users] CDR custom variable on second call leg - vi |
|
|
Using Set(MASTER_CHANNEL(CDR(remoteUid))=foo); might do what you want
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Mikael Fredin
Sent: Tuesday, June 10, 2014 11:18 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] CDR custom variable on second call leg - via originate or .call file
As far as I know, only way to set variables on another channel would be:
asterisk -rx "core show help dialplan set chanvar"
Usage: dialplan set chanvar <channel> <varname> <value>
Set channel variable <varname> to <value>
On 10 June 2014 16:39, Tiago Geada <tiago.geada@gmail.com (tiago.geada@gmail.com)> wrote:
Hi
We have the following test .call file and test dialplan:
I can't set a custom CDR var to a value on one channel leg, and another value on the connected channel leg?
Is there a way I can woraround this issue?
## test call file
Channel: Local/queue@TiagoGeada
CallerID: teste-geada:0:210332450:
MaxRetries: 0
RetryTime: 1
WaitTime: 8640
Account: teste-geada
Context: TiagoGeada
Extension: outbound
Archive: Yes
## dialplan
queue => {
Set(CDR(remoteUid)=foo);
Queue(TiagoGeada,t,,,100);
Hangup();
}
outbound => {
//NoCDR();
//ForkCDR(vdD);
//ResetCDR(v);
Set(CDR(remoteUid,r)=bar);
Dial(Local/932485457@outbound,,gT);
Hangup();
}
--
_____________________________________________________________________
-- 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 |
|
|
tiago.geada at gmail.com Guest
|
Posted: Wed Jun 11, 2014 9:11 am Post subject: [asterisk-users] CDR custom variable on second call leg - vi |
|
|
Hi,
Let me append some extra info
cdr variable foo, shows on database, but value 'bar' doens't
its not even shown in the insert query
I tried with master_channel but no change
On 10 June 2014 16:25, Eric Wieling <EWieling@nyigc.com (EWieling@nyigc.com)> wrote:
Quote: |
Using Set(MASTER_CHANNEL(CDR(remoteUid))=foo); might do what you want
From: asterisk-users-bounces@lists.digium.com (asterisk-users-bounces@lists.digium.com) [mailto:asterisk-users-bounces@lists.digium.com (asterisk-users-bounces@lists.digium.com)] On Behalf Of Mikael Fredin
Sent: Tuesday, June 10, 2014 11:18 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] CDR custom variable on second call leg - via originate or .call file
As far as I know, only way to set variables on another channel would be:
asterisk -rx "core show help dialplan set chanvar"
Usage: dialplan set chanvar <channel> <varname> <value>
Set channel variable <varname> to <value>
On 10 June 2014 16:39, Tiago Geada <tiago.geada@gmail.com (tiago.geada@gmail.com)> wrote:
Hi
We have the following test .call file and test dialplan:
I can't set a custom CDR var to a value on one channel leg, and another value on the connected channel leg?
Is there a way I can woraround this issue?
## test call file
Channel: Local/queue@TiagoGeada
CallerID: teste-geada:0:[url=tel:210332450]210332450[/url]:
MaxRetries: 0
RetryTime: 1
WaitTime: 8640
Account: teste-geada
Context: TiagoGeada
Extension: outbound
Archive: Yes
## dialplan
queue => {
Set(CDR(remoteUid)=foo);
Queue(TiagoGeada,t,,,100);
Hangup();
}
outbound => {
//NoCDR();
//ForkCDR(vdD);
//ResetCDR(v);
Set(CDR(remoteUid,r)=bar);
Dial(Local/[url=tel:932485457]932485457[/url]@outbound,,gT);
Hangup();
}
--
_____________________________________________________________________
-- 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
--
_____________________________________________________________________
-- 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: Wed Jun 11, 2014 1:25 pm Post subject: [asterisk-users] CDR custom variable on second call leg - vi |
|
|
On Wed, Jun 11, 2014 at 9:10 AM, Tiago Geada <tiago.geada@gmail.com (tiago.geada@gmail.com)> wrote:
Quote: | Hi,
Let me append some extra info
cdr variable foo, shows on database, but value 'bar' doens't
its not even shown in the insert query
I tried with master_channel but no change
|
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.
You have the following call file:
<snip>
Quote: | Quote: |
## test call file
Channel: Local/queue@TiagoGeada
CallerID: teste-geada:0:[url=tel:210332450]210332450[/url]:
MaxRetries: 0
RetryTime: 1
WaitTime: 8640
Account: teste-geada
Context: TiagoGeada
Extension: outbound
Archive: Yes
|
|
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.
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".
Quote: | Quote: |
## dialplan
queue => {
Set(CDR(remoteUid)=foo);
Queue(TiagoGeada,t,,,100);
Hangup();
}
outbound => {
//NoCDR();
//ForkCDR(vdD);
//ResetCDR(v);
Set(CDR(remoteUid,r)=bar);
Dial(Local/[url=tel:932485457]932485457[/url]@outbound,,gT);
Hangup();
}
|
|
Looking at your Dialplan for the outbound extension, you dial yet another Local channel. I would expect this to result in 3 CDR entries:
Source Channel Destination Channel
Local/queue@TiagoGeada;2
Local/queue@TiagoGeada;1 Local/932485427@outbound;1
Local/932485457@outbound;2
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).
--
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 |
|
Back to top |
|
|
tiago.geada at gmail.com Guest
|
Posted: Mon Jun 16, 2014 5:39 am Post subject: [asterisk-users] CDR custom variable on second call leg - vi |
|
|
Hi,
Thank you for your explanation about channel halds .. These .call files are always different from other calls.
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.
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.
The CDR bit with remoteUid=foo is OK, the bit that should have remoteUid=bar is not
On 11 June 2014 19:24, Matthew Jordan <mjordan@digium.com (mjordan@digium.com)> wrote:
Quote: |
On Wed, Jun 11, 2014 at 9:10 AM, Tiago Geada <tiago.geada@gmail.com (tiago.geada@gmail.com)> wrote:
Quote: | Hi,
Let me append some extra info
cdr variable foo, shows on database, but value 'bar' doens't
its not even shown in the insert query
I tried with master_channel but no change
|
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.
You have the following call file:
<snip>
Quote: | Quote: |
## test call file
Channel: Local/queue@TiagoGeada
CallerID: teste-geada:0:[url=tel:210332450]210332450[/url]:
MaxRetries: 0
RetryTime: 1
WaitTime: 8640
Account: teste-geada
Context: TiagoGeada
Extension: outbound
Archive: Yes
|
|
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.
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".
Quote: | Quote: |
## dialplan
queue => {
Set(CDR(remoteUid)=foo);
Queue(TiagoGeada,t,,,100);
Hangup();
}
outbound => {
//NoCDR();
//ForkCDR(vdD);
//ResetCDR(v);
Set(CDR(remoteUid,r)=bar);
Dial(Local/[url=tel:932485457]932485457[/url]@outbound,,gT);
Hangup();
}
|
|
Looking at your Dialplan for the outbound extension, you dial yet another Local channel. I would expect this to result in 3 CDR entries:
Source Channel Destination Channel
Local/queue@TiagoGeada;2
Local/queue@TiagoGeada;1 Local/[url=tel:932485427]932485427[/url]@outbound;1
Local/[url=tel:932485457]932485457[/url]@outbound;2
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).
--
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 |
|
|
tiago.geada at gmail.com Guest
|
Posted: Fri Jun 27, 2014 1:30 pm Post subject: [asterisk-users] CDR custom variable on second call leg - vi |
|
|
Is there something I can do regarding this issue?
On 16 June 2014 11:39, Tiago Geada <tiago.geada@gmail.com (tiago.geada@gmail.com)> wrote:
Quote: | Hi,
Thank you for your explanation about channel halds .. These .call files are always different from other calls.
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.
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.
The CDR bit with remoteUid=foo is OK, the bit that should have remoteUid=bar is not
On 11 June 2014 19:24, Matthew Jordan <mjordan@digium.com (mjordan@digium.com)> wrote:
Quote: |
On Wed, Jun 11, 2014 at 9:10 AM, Tiago Geada <tiago.geada@gmail.com (tiago.geada@gmail.com)> wrote:
Quote: | Hi,
Let me append some extra info
cdr variable foo, shows on database, but value 'bar' doens't
its not even shown in the insert query
I tried with master_channel but no change
|
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.
You have the following call file:
<snip>
Quote: | Quote: |
## test call file
Channel: Local/queue@TiagoGeada
CallerID: teste-geada:0:[url=tel:210332450]210332450[/url]:
MaxRetries: 0
RetryTime: 1
WaitTime: 8640
Account: teste-geada
Context: TiagoGeada
Extension: outbound
Archive: Yes
|
|
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.
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".
Quote: | Quote: |
## dialplan
queue => {
Set(CDR(remoteUid)=foo);
Queue(TiagoGeada,t,,,100);
Hangup();
}
outbound => {
//NoCDR();
//ForkCDR(vdD);
//ResetCDR(v);
Set(CDR(remoteUid,r)=bar);
Dial(Local/[url=tel:932485457]932485457[/url]@outbound,,gT);
Hangup();
}
|
|
Looking at your Dialplan for the outbound extension, you dial yet another Local channel. I would expect this to result in 3 CDR entries:
Source Channel Destination Channel
Local/queue@TiagoGeada;2
Local/queue@TiagoGeada;1 Local/[url=tel:932485427]932485427[/url]@outbound;1
Local/[url=tel:932485457]932485457[/url]@outbound;2
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).
--
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 |
|
|
rmudgett at digium.com Guest
|
|
Back to top |
|
|
tiago.geada at gmail.com Guest
|
Posted: Sun Jul 06, 2014 1:13 pm Post subject: [asterisk-users] CDR custom variable on second call leg - vi |
|
|
Hi Richard.
I looked at both pages, yes.
My goal is to have a flag on the cdr database records when the call is not yet connected to the second leg.
So, the "Channel" argument takes a call to a portion of dialplan that will try several steps. And at those steps the custom variable will be set to 'foo'
When answered, the "Context" and "Extension" argument take the call trough another piece of dialplan that will have that its CDR entries with the custom variable set to 'bar'
Just like on the example stated!
However, only 'foo' gets written!
On 27 June 2014 21:16, Richard Mudgett <rmudgett@digium.com (rmudgett@digium.com)> wrote:
|
|
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
|