[asterisk-users] CDR custom variable on second call leg - via originate or .call file
Tiago Geada
tiago.geada at gmail.com
Fri Jun 27 13:30:03 CDT 2014
Is there something I can do regarding this issue?
On 16 June 2014 11:39, Tiago Geada <tiago.geada at gmail.com> 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 <mjordan at digium.com> wrote:
>
>>
>>
>>
>> On Wed, Jun 11, 2014 at 9:10 AM, Tiago Geada <tiago.geada at gmail.com>
>> 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:
>>
>> <snip>
>>
>>
>>>
>>>>
>>>>
>>>>
>>>> ## test call file
>>>>
>>>>
>>>>
>>>> Channel: Local/queue at 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 at 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 at TiagoGeada;2
>> Local/queue at TiagoGeada;1 Local/932485427 at outbound;1
>> Local/932485457 at 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140627/b4176db4/attachment.html>
More information about the asterisk-users
mailing list