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

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Tue Oct 1 10:47:05 CDT 2013


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

Richard Mudgett updated ASTERISK-22620:
---------------------------------------

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


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

    Set(TIMER=${CDR(duration)})
    NoOp(${ALERT_TIMEOUT})
    GotoIf($["${TIMER}">="${ALERT_TIMEOUT}"]?alert:cont)


result is:

    -- 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


As you can see, 10 is greater than 9, the app `thinks` not.

in case if ALERT_TIMEOUT=1:

    -- 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

it's a major bug.


    
> 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