Yes I know , most of them are read-only but I don’t want to change them just access them . and still the question is why the noop can access and the set can’t.
I didn’t understand the question properly. The problem is I read the question, and not the context, and answered why Set could not assign that field, whereas the actual code is assigning BILLIKHARE, not the CDR function.
If the code has been cut and pasted accurately, this doesn’t make sense, as the dialplan interpreter has no idea which application will get called at the point where the variable is substituted, and the function evaluator only knows the channel. The function is definitely being substituted. If it weren’t matched, the result would be an empty string, not “0”.
The only thing I can think of that would cause this anomaly is if the code is being executed at a point when the value is changing. As such, I think it would be necessary to see priority 1, and also what caused the extension to start running in that context.
Please repost your dialplan snippet and console log in 'Preformatted tags'
I have this snippet:
; billsec
same = n, wait(5)
same = n, verbose(as CDR variable ${CDR(billsec)})
same = n, set(BILLIKHARE=${CDR(billsec)})
same = n, verbose(as my variable ${BILLIKHARE})
same = n, hangup()
And it generates this console log:
-- Executing [*@newline:6] Wait("SIP/poly-77a1-000001ca", "5") in new stack
> 0x691a4468 -- Strict RTP learning complete - Locking on source address 192.168.0.139:2252
-- Executing [*@newline:7] Verbose("SIP/poly-77a1-000001ca", "as CDR variable 5") in new stack
as CDR variable 5
-- Executing [*@newline:8] Set("SIP/poly-77a1-000001ca", "BILLIKHARE=5") in new stack
-- Executing [*@newline:9] Verbose("SIP/poly-77a1-000001ca", "as my variable 5") in new stack
as my variable 5
-- Executing [*@newline:10] Hangup("SIP/poly-77a1-000001ca", "") in new stack
I use ${CDR(billsec)}) variable at end of the call in hangup extension and it works fine. so I decide to use it for logging in blind transferred calls in the context “from-internal-xfer-temp” calls transfered from a queue, here is loaded PBX dial plan :
CLI> dialplan show from-internal-xfer-temp
[ Context ‘from-internal-xfer-temp’ created by ‘pbx_config’ ]
How does execution of from-internal-xfer-temp get started. This is not a context that has any special meaning to Asterisk. I suspect you are using a GUI, in which case you need to get support from the community for that GUI.
Yes, you 're right we use FreePBX. As I said “from-internal-xfer-temp” context used for transferred calls from queues by setting TRANSFER_CONTEXT global variable.