[asterisk-bugs] [JIRA] (ASTERISK-22620) GotoIf in 'h' extension works incorrectly

Michael L. Young (JIRA) noreply at issues.asterisk.org
Thu Oct 3 15:55:03 CDT 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-22620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=210760#comment-210760 ] 

Michael L. Young commented on ASTERISK-22620:
---------------------------------------------

How about removing the quotes around the variables?

{noformat}
GotoIf($[${TIMER}>=${ALERT_TIMEOUT}]?alert:cont)
{noformat}
                
> GotoIf in 'h' extension works incorrectly
> -----------------------------------------
>
>                 Key: ASTERISK-22620
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22620
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_dial
>    Affects Versions: 1.8.23.1
>            Reporter: newborn
>
> i'm comparing two values - TIMER and ALERT_TIMEOUT in 'h' extension.
> GotoIf works only if second value is equal 1.
> Otherwise does not works.
> {noformat}
>     Set(TIMER=${CDR(duration)})
>     NoOp(${ALERT_TIMEOUT})
>     GotoIf($["${TIMER}">="${ALERT_TIMEOUT}"]?alert:cont)
> {noformat}
> result is:
> {noformat}
>     -- Executing [h at calltest-lync_group_check:2] Set("SIP/lyncserv01-00000002", "TIMER=10") in new stack
>     -- Executing [h at calltest-lync_group_check:3] NoOp("SIP/lyncserv01-00000002", "9") in new stack
>     -- Executing [h at calltest-lync_group_check:4] GotoIf("SIP/lyncserv01-00000002", "0?alert:cont") in new stack
> {noformat}
> As you can see, 10 is greater than 9, the app `thinks` not.
> in case if ALERT_TIMEOUT=1:
> {noformat}
>     -- Executing [h at calltest-lync_group_check:2] Set("SIP/lyncserv01-00000003", "TIMER=11") in new stack
>     -- Executing [h at calltest-lync_group_check:3] NoOp("SIP/lyncserv01-00000003", "1") in new stack
>     -- Executing [h at calltest-lync_group_check:4] GotoIf("SIP/lyncserv01-00000003", "1?alert:cont") in new stack
> {noformat}
> it's a major bug.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list