[asterisk-bugs] [JIRA] (ASTERISK-26954) Queue agi variable not returning

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Fri Apr 21 09:37:57 CDT 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-26954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Mudgett updated ASTERISK-26954:
---------------------------------------

    Description: 
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}


  was:
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.
Bu 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}



> 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