Re: [asterisk-users] CDR custom variable on second call leg - via originate or .call file
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 wrote: > > > > On Fri, Jun 27, 2014 at 1:30 PM, Tiago Geada > wrote: > >> Is there something I can do regarding this issue? >> > > Have you looked at these wiki pages? > https://wiki.asterisk.org/wiki/display/AST/Asterisk+Call+Files > The setvar parameter may help here. > > https://wiki.asterisk.org/wiki/display/AST/Variable+Inheritance > > Richard > > > -- > _ > -- 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
Re: [asterisk-users] CDR custom variable on second call leg - via originate or .call file
On Fri, Jun 27, 2014 at 1:30 PM, Tiago Geada wrote: > Is there something I can do regarding this issue? > Have you looked at these wiki pages? https://wiki.asterisk.org/wiki/display/AST/Asterisk+Call+Files The setvar parameter may help here. https://wiki.asterisk.org/wiki/display/AST/Variable+Inheritance Richard -- _ -- 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
Re: [asterisk-users] CDR custom variable on second call leg - via originate or .call file
Is there something I can do regarding this issue? On 16 June 2014 11:39, Tiago Geada wrote: > 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 wrote: > >> >> >> >> On Wed, Jun 11, 2014 at 9:10 AM, Tiago Geada >> wrote: >> >>> 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: >> >> >> >> >>> ## 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 >>> >> 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". >> >> >> >>> ## 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(); } >> 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 >> >> -- >> _ >> -- 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
Re: [asterisk-users] CDR custom variable on second call leg - via originate or .call file
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 wrote: > > > > On Wed, Jun 11, 2014 at 9:10 AM, Tiago Geada > wrote: > >> 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: > > > > >> >>> >>> >>> >>> ## 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 >>> >>> >>> >>> >>> >> > 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". > > > >> >>> >>> >>> >>> ## 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(); >>> >>> } >>> >>> >>> > 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 > > -- > _ > -- 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
Re: [asterisk-users] CDR custom variable on second call leg - via originate or .call file
On Wed, Jun 11, 2014 at 9:10 AM, Tiago Geada wrote: > 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: > >> >> >> >> ## 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 >> >> >> >> >> > 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". > >> >> >> >> ## 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(); >> >> } >> >> >> 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 -- _ -- 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
Re: [asterisk-users] CDR custom variable on second call leg - via originate or .call file
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 wrote: > Using Set(MASTER_CHANNEL(CDR(remoteUid))=foo); might do what you want > > > > *From:* asterisk-users-boun...@lists.digium.com [mailto: > asterisk-users-boun...@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 >Set channel variable to > > > > > > On 10 June 2014 16:39, Tiago Geada 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 > > > > -- > _ > -- 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
Re: [asterisk-users] CDR custom variable on second call leg - via originate or .call file
Using Set(MASTER_CHANNEL(CDR(remoteUid))=foo); might do what you want From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@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 Set channel variable to On 10 June 2014 16:39, Tiago Geada mailto:tiago.ge...@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 -- _ -- 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
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 Set channel variable to On 10 June 2014 16:39, Tiago Geada 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 > -- _ -- 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