[asterisk-bugs] [JIRA] (ASTERISK-26954) Queue agi variable not returning
Richard Mudgett (JIRA)
noreply at issues.asterisk.org
Fri Apr 21 09:56:57 CDT 2017
[ https://issues.asterisk.org/jira/browse/ASTERISK-26954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=236631#comment-236631 ]
Richard Mudgett commented on ASTERISK-26954:
--------------------------------------------
This is not a bug.
# Channel variable inheritance happens *only* when a channel is created by another channel.
# The {{1.py}} AGI script runs on the *caller* channel after the *called* channel answers but before they are bridged.
# The *c* option has the *caller* channel *continue* in dialplan at the next location when the *called* channel hangs up first.
# The *F* option has the *called* channel *start* executing in dialplan at the next location when the *caller* channel hangs up first.
Your {{1.py}} AGI script is setting the channel variable on the *caller* channel *after* the *called* channel is created and answered. Under these conditions you cannot expect the *called* channel to have that channel variable set on it.
> Queue agi variable not returning
> --------------------------------
>
> Key: ASTERISK-26954
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-26954
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Applications/app_queue
> Affects Versions: 13.13.1
> Environment: Debian GNU/Linux 8.7 (jessie)
> Linux co-ats 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30) x86_64 GNU/Linux
> Reporter: Aydar Kamalov
>
> Hello, not sure it's a bug.
> I have queue with agi scipt. When I call to queue and then hangup, I can't get variable set in agi script.
> But if agent hangup variable is available in dialplan.
> extensions.conf
> {noformat}
> [test]
> exten => _X.,1,Answer()
> same => n,Queue(it-support,cF,,,,1.py)
> same => n,NoOp(TEST: TICKET_ID ${TEST})
> same => n,Hangup
> {noformat}
> 1.py
> {noformat}
> #!/usr/bin/env python
> from asterisk.agi import *
> agi = AGI()
> agi.set_variable("_TEST", "123456")
> {noformat}
> If caller hangup:
> {noformat}
> <SIP/be-00000000>AGI Rx << SET VARIABLE "_TEST" "123456"
> -- Executing [9656 at test:5] NoOp("SIP/00132-00000002", "TEST: TICKET_ID ") in new stack
> {noformat}
> If agent hangup:
> {noformat}
> <SIP/bee-00000007>AGI Rx << SET VARIABLE "_TEST" "123456"
> -- Executing [9656 at test:5] NoOp("SIP/beeline-00000007", "TEST: TICKET_ID 123456") in new stack
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list