[asterisk-bugs] [JIRA] (ASTERISK-28276) TESTTIME feature not working

granjerox (JIRA) noreply at issues.asterisk.org
Thu Feb 7 06:24:47 CST 2019


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

granjerox updated ASTERISK-28276:
---------------------------------

    Description: 
Can't get iftime nor gotoiftime to use a diferent datetime than systemtime.

{code}
Asterisk version
iospbx004*CLI> core show version 
Asterisk 13.22.0 built by root @ iospbx004 on a x86_64 running Linux on 2018-08-10 10:22:19 UTC
{code}

*DIALPLAN*
{code}
[test]
exten => s,1,NoOp(Time is ${STRFTIME()} - TESTTIME IS ${TESTTIME})
    same => n,NoOp(Test IFTIME DEC ${IFTIME(*,*,*,dec?ok:nok)})
    same => n,GotoIfTime(*,*,*,dec?decok:decnok)
        same => n(decok),NoOp(GotoIftime DEC - OK)
        same => n,Goto(feb)
        same => n(decnok),NoOp(GotoIftime DEC - NOK)

    same => n(feb),NoOp(Test IFTIME FEB ${IFTIME(*,*,*,feb?ok:nook)})
    same => n,GotoIfTime(*,*,*,feb?febok:febnook)
        same => n(febok),NoOp(GotoIftime FEB - OK)
        same => n,Goto(end)
        same => n(febnook),NoOp(GotoIftime FEB - NOK)
    same => n(end),Hangup

exten => Test1,1,NoOp(Time is ${STRFTIME()}")
    same => n,Set(__TESTTIME=2018-12-30 18:00:00 Europe/Madrid)
    same => n,Goto(s,1)
exten => Test2,1,NoOp(Time is ${STRFTIME()}")
    same => n,Set(__TESTTIME=2018-12-30,18:00:00,Europe/Madrid)
    same => n,Goto(s,1)
exten => Test3,1,NoOp(Time is ${STRFTIME()}")
    same => n,Set(TESTTIME(2018-12-30,18:00:00,Europe/Madrid)=TestTime)
    same => n,Goto(s,1)
exten => Test4,1,NoOp(Time is ${STRFTIME()}")
    same => n,Set(TESTTIME()=2018-12-30,18:00:00,Europe/Madrid)
    same => n,Goto(s,1)
{code}
* test 0: not using testtime - Expected consistent with real *
* Expected Result:
** IFTIME DEC nok
** GotoIftime DEC nok
** IFTIME FEB ok
** GotoIftime FEB ok
* Obtained Result:
** IFTIME DEC nok
** GotoIftime DEC nok
** IFTIME FEB ok
** GotoIftime FEB ok
{code}
iospbx004*CLI> originate local/s at test application wait 5
    -- Called s at test
    -- Executing [s at test:1] NoOp("Local/s at test-00000035;2", "Time is Thu Feb  7 12:53:34 2019 - TESTTIME IS ") in new stack
    -- Executing [s at test:2] NoOp("Local/s at test-00000035;2", "Test IFTIME DEC nok") in new stack
    -- Executing [s at test:3] GotoIfTime("Local/s at test-00000035;2", "*,*,*,dec?decok:decnok") in new stack
    -- Goto (test,s,6)
    -- Executing [s at test:6] NoOp("Local/s at test-00000035;2", "GotoIftime DEC - NOK") in new stack
    -- Executing [s at test:7] NoOp("Local/s at test-00000035;2", "Test IFTIME FEB ok") in new stack
    -- Executing [s at test:8] GotoIfTime("Local/s at test-00000035;2", "*,*,*,feb?febok:febnook") in new stack
    -- Goto (test,s,9)
    -- Executing [s at test:9] NoOp("Local/s at test-00000035;2", "GotoIftime FEB - OK") in new stack
    -- Executing [s at test:10] Goto("Local/s at test-00000035;2", "end") in new stack
    -- Goto (test,s,12)
    -- Executing [s at test:12] Hangup("Local/s at test-00000035;2", "") in new stack
  == Spawn extension (test, s, 12) exited non-zero on 'Local/s at test-00000035;2'
{code}

test 1: Setting TESTTIME Variable with spaces - Expected NOT consistent with real

Expected Result:
    - IFTIME DEC ok
    - GotoIftime DEC ok
    - IFTIME FEB nok
    - GotoIftime FEB nok
Obtained Result:
    - IFTIME DEC nok
    - GotoIftime DEC nok
    - IFTIME FEB ok
    - GotoIftime FEB nok

iospbx004*CLI> originate local/Test1 at test application wait 5
    -- Called Test1 at test
    -- Executing [Test1 at test:1] NoOp("Local/Test1 at test-00000036;2", "Time is Thu Feb  7 12:54:15 2019"") in new stack
    -- Executing [Test1 at test:2] Set("Local/Test1 at test-00000036;2", "__TESTTIME=2018-12-30 18:00:00 Europe/Madrid") in new stack
    -- Executing [Test1 at test:3] Goto("Local/Test1 at test-00000036;2", "s,1") in new stack
    -- Goto (test,s,1)
    -- Executing [s at test:1] NoOp("Local/Test1 at test-00000036;2", "Time is Thu Feb  7 12:54:15 2019 - TESTTIME IS 2018-12-30 18:00:00 Europe/Madrid") in new stack
    -- Executing [s at test:2] NoOp("Local/Test1 at test-00000036;2", "Test IFTIME DEC nok") in new stack
    -- Executing [s at test:3] GotoIfTime("Local/Test1 at test-00000036;2", "*,*,*,dec?decok:decnok") in new stack
    -- Goto (test,s,6)
    -- Executing [s at test:6] NoOp("Local/Test1 at test-00000036;2", "GotoIftime DEC - NOK") in new stack
    -- Executing [s at test:7] NoOp("Local/Test1 at test-00000036;2", "Test IFTIME FEB ok") in new stack
    -- Executing [s at test:8] GotoIfTime("Local/Test1 at test-00000036;2", "*,*,*,feb?febok:febnook") in new stack
    -- Goto (test,s,11)
    -- Executing [s at test:11] NoOp("Local/Test1 at test-00000036;2", "GotoIftime FEB - NOK") in new stack
    -- Executing [s at test:12] Hangup("Local/Test1 at test-00000036;2", "") in new stack
  == Spawn extension (test, s, 12) exited non-zero on 'Local/Test1 at test-00000036;2'

test 2: Setting TESTTIME Variable with comas - Expected NOT consistent with real

Expected Result:
    - IFTIME DEC ok
    - GotoIftime DEC ok
    - IFTIME FEB nok
    - GotoIftime FEB nok
Obtained Result:
    - IFTIME DEC nok
    - GotoIftime DEC nok
    - IFTIME FEB ok
    - GotoIftime FEB nok

iospbx004*CLI> originate local/Test2 at test application wait 5
    -- Called Test2 at test
    -- Executing [Test2 at test:1] NoOp("Local/Test2 at test-00000037;2", "Time is Thu Feb  7 12:54:18 2019"") in new stack
    -- Executing [Test2 at test:2] Set("Local/Test2 at test-00000037;2", "__TESTTIME=2018-12-30,18:00:00,Europe/Madrid") in new stack
    -- Executing [Test2 at test:3] Goto("Local/Test2 at test-00000037;2", "s,1") in new stack
    -- Goto (test,s,1)
    -- Executing [s at test:1] NoOp("Local/Test2 at test-00000037;2", "Time is Thu Feb  7 12:54:18 2019 - TESTTIME IS 2018-12-30,18:00:00,Europe/Madrid") in new stack
    -- Executing [s at test:2] NoOp("Local/Test2 at test-00000037;2", "Test IFTIME DEC nok") in new stack
    -- Executing [s at test:3] GotoIfTime("Local/Test2 at test-00000037;2", "*,*,*,dec?decok:decnok") in new stack
    -- Goto (test,s,6)
    -- Executing [s at test:6] NoOp("Local/Test2 at test-00000037;2", "GotoIftime DEC - NOK") in new stack
    -- Executing [s at test:7] NoOp("Local/Test2 at test-00000037;2", "Test IFTIME FEB ok") in new stack
    -- Executing [s at test:8] GotoIfTime("Local/Test2 at test-00000037;2", "*,*,*,feb?febok:febnook") in new stack
    -- Goto (test,s,11)
    -- Executing [s at test:11] NoOp("Local/Test2 at test-00000037;2", "GotoIftime FEB - NOK") in new stack
    -- Executing [s at test:12] Hangup("Local/Test2 at test-00000037;2", "") in new stack
  == Spawn extension (test, s, 12) exited non-zero on 'Local/Test2 at test-00000037;2'

test 3: Setting TESTTIME function by values - Expected NOT consistent with real
Expected Result:
    - IFTIME DEC ok
    - GotoIftime DEC ok
    - IFTIME FEB nok
    - GotoIftime FEB nok
Obtained Result:
    - IFTIME DEC nok
    - GotoIftime DEC nok
    - IFTIME FEB ok
    - GotoIftime FEB ok

iospbx004*CLI> originate local/Test3 at test application wait 5
    -- Called Test3 at test
    -- Executing [Test3 at test:1] NoOp("Local/Test3 at test-00000038;2", "Time is Thu Feb  7 12:54:21 2019"") in new stack
    -- Executing [Test3 at test:2] Set("Local/Test3 at test-00000038;2", "TESTTIME(2018-12-30,18:00:00,Europe/Madrid)=TestTime") in new stack
    -- Executing [Test3 at test:3] Goto("Local/Test3 at test-00000038;2", "s,1") in new stack
    -- Goto (test,s,1)
    -- Executing [s at test:1] NoOp("Local/Test3 at test-00000038;2", "Time is Thu Feb  7 12:54:21 2019 - TESTTIME IS ") in new stack
    -- Executing [s at test:2] NoOp("Local/Test3 at test-00000038;2", "Test IFTIME DEC nok") in new stack
    -- Executing [s at test:3] GotoIfTime("Local/Test3 at test-00000038;2", "*,*,*,dec?decok:decnok") in new stack
    -- Goto (test,s,6)
    -- Executing [s at test:6] NoOp("Local/Test3 at test-00000038;2", "GotoIftime DEC - NOK") in new stack
    -- Executing [s at test:7] NoOp("Local/Test3 at test-00000038;2", "Test IFTIME FEB ok") in new stack
    -- Executing [s at test:8] GotoIfTime("Local/Test3 at test-00000038;2", "*,*,*,feb?febok:febnook") in new stack
    -- Goto (test,s,9)
    -- Executing [s at test:9] NoOp("Local/Test3 at test-00000038;2", "GotoIftime FEB - OK") in new stack
    -- Executing [s at test:10] Goto("Local/Test3 at test-00000038;2", "end") in new stack
    -- Goto (test,s,12)
    -- Executing [s at test:12] Hangup("Local/Test3 at test-00000038;2", "") in new stack
  == Spawn extension (test, s, 12) exited non-zero on 'Local/Test3 at test-00000038;2'

test 4: Setting TESTTIME function by args - Expected NOT consistent with real

Expected Result:
    - IFTIME DEC ok
    - GotoIftime DEC ok
    - IFTIME FEB nok
    - GotoIftime FEB nok
Obtained Result:
    - IFTIME DEC nok
    - GotoIftime DEC nok
    - IFTIME FEB ok
    - GotoIftime FEB ok
iospbx004*CLI> originate local/Test4 at test application wait 5
    -- Called Test4 at test
    -- Executing [Test4 at test:1] NoOp("Local/Test4 at test-00000039;2", "Time is Thu Feb  7 12:54:24 2019"") in new stack
    -- Executing [Test4 at test:2] Set("Local/Test4 at test-00000039;2", "TESTTIME()=2018-12-30,18:00:00,Europe/Madrid") in new stack
    -- Executing [Test4 at test:3] Goto("Local/Test4 at test-00000039;2", "s,1") in new stack
    -- Goto (test,s,1)
    -- Executing [s at test:1] NoOp("Local/Test4 at test-00000039;2", "Time is Thu Feb  7 12:54:24 2019 - TESTTIME IS ") in new stack
    -- Executing [s at test:2] NoOp("Local/Test4 at test-00000039;2", "Test IFTIME DEC nok") in new stack
    -- Executing [s at test:3] GotoIfTime("Local/Test4 at test-00000039;2", "*,*,*,dec?decok:decnok") in new stack
    -- Goto (test,s,6)
    -- Executing [s at test:6] NoOp("Local/Test4 at test-00000039;2", "GotoIftime DEC - NOK") in new stack
    -- Executing [s at test:7] NoOp("Local/Test4 at test-00000039;2", "Test IFTIME FEB ok") in new stack
    -- Executing [s at test:8] GotoIfTime("Local/Test4 at test-00000039;2", "*,*,*,feb?febok:febnook") in new stack
    -- Goto (test,s,9)
    -- Executing [s at test:9] NoOp("Local/Test4 at test-00000039;2", "GotoIftime FEB - OK") in new stack
    -- Executing [s at test:10] Goto("Local/Test4 at test-00000039;2", "end") in new stack
    -- Goto (test,s,12)
    -- Executing [s at test:12] Hangup("Local/Test4 at test-00000039;2", "") in new stack
  == Spawn extension (test, s, 12) exited non-zero on 'Local/Test4 at test-00000039;2'

  was:
Can't get iftime nor gotoiftime to use a diferent datetime than systemtime.

{code}
Asterisk version
iospbx004*CLI> core show version 
Asterisk 13.22.0 built by root @ iospbx004 on a x86_64 running Linux on 2018-08-10 10:22:19 UTC
{code}

*DIALPLAN*
{code}
[test]
exten => s,1,NoOp(Time is ${STRFTIME()} - TESTTIME IS ${TESTTIME})
    same => n,NoOp(Test IFTIME DEC ${IFTIME(*,*,*,dec?ok:nok)})
    same => n,GotoIfTime(*,*,*,dec?decok:decnok)
        same => n(decok),NoOp(GotoIftime DEC - OK)
        same => n,Goto(feb)
        same => n(decnok),NoOp(GotoIftime DEC - NOK)

    same => n(feb),NoOp(Test IFTIME FEB ${IFTIME(*,*,*,feb?ok:nook)})
    same => n,GotoIfTime(*,*,*,feb?febok:febnook)
        same => n(febok),NoOp(GotoIftime FEB - OK)
        same => n,Goto(end)
        same => n(febnook),NoOp(GotoIftime FEB - NOK)
    same => n(end),Hangup

exten => Test1,1,NoOp(Time is ${STRFTIME()}")
    same => n,Set(__TESTTIME=2018-12-30 18:00:00 Europe/Madrid)
    same => n,Goto(s,1)
exten => Test2,1,NoOp(Time is ${STRFTIME()}")
    same => n,Set(__TESTTIME=2018-12-30,18:00:00,Europe/Madrid)
    same => n,Goto(s,1)
exten => Test3,1,NoOp(Time is ${STRFTIME()}")
    same => n,Set(TESTTIME(2018-12-30,18:00:00,Europe/Madrid)=TestTime)
    same => n,Goto(s,1)
exten => Test4,1,NoOp(Time is ${STRFTIME()}")
    same => n,Set(TESTTIME()=2018-12-30,18:00:00,Europe/Madrid)
    same => n,Goto(s,1)
{code}
* test 0: not using testtime - Expected consistent with real *
Expected Result:
    - IFTIME DEC nok
    - GotoIftime DEC nok
    - IFTIME FEB ok
    - GotoIftime FEB ok
Obtained Result:
    - IFTIME DEC nok
    - GotoIftime DEC nok
    - IFTIME FEB ok
    - GotoIftime FEB ok
{code}
iospbx004*CLI> originate local/s at test application wait 5
    -- Called s at test
    -- Executing [s at test:1] NoOp("Local/s at test-00000035;2", "Time is Thu Feb  7 12:53:34 2019 - TESTTIME IS ") in new stack
    -- Executing [s at test:2] NoOp("Local/s at test-00000035;2", "Test IFTIME DEC nok") in new stack
    -- Executing [s at test:3] GotoIfTime("Local/s at test-00000035;2", "*,*,*,dec?decok:decnok") in new stack
    -- Goto (test,s,6)
    -- Executing [s at test:6] NoOp("Local/s at test-00000035;2", "GotoIftime DEC - NOK") in new stack
    -- Executing [s at test:7] NoOp("Local/s at test-00000035;2", "Test IFTIME FEB ok") in new stack
    -- Executing [s at test:8] GotoIfTime("Local/s at test-00000035;2", "*,*,*,feb?febok:febnook") in new stack
    -- Goto (test,s,9)
    -- Executing [s at test:9] NoOp("Local/s at test-00000035;2", "GotoIftime FEB - OK") in new stack
    -- Executing [s at test:10] Goto("Local/s at test-00000035;2", "end") in new stack
    -- Goto (test,s,12)
    -- Executing [s at test:12] Hangup("Local/s at test-00000035;2", "") in new stack
  == Spawn extension (test, s, 12) exited non-zero on 'Local/s at test-00000035;2'
{code}

test 1: Setting TESTTIME Variable with spaces - Expected NOT consistent with real

Expected Result:
    - IFTIME DEC ok
    - GotoIftime DEC ok
    - IFTIME FEB nok
    - GotoIftime FEB nok
Obtained Result:
    - IFTIME DEC nok
    - GotoIftime DEC nok
    - IFTIME FEB ok
    - GotoIftime FEB nok

iospbx004*CLI> originate local/Test1 at test application wait 5
    -- Called Test1 at test
    -- Executing [Test1 at test:1] NoOp("Local/Test1 at test-00000036;2", "Time is Thu Feb  7 12:54:15 2019"") in new stack
    -- Executing [Test1 at test:2] Set("Local/Test1 at test-00000036;2", "__TESTTIME=2018-12-30 18:00:00 Europe/Madrid") in new stack
    -- Executing [Test1 at test:3] Goto("Local/Test1 at test-00000036;2", "s,1") in new stack
    -- Goto (test,s,1)
    -- Executing [s at test:1] NoOp("Local/Test1 at test-00000036;2", "Time is Thu Feb  7 12:54:15 2019 - TESTTIME IS 2018-12-30 18:00:00 Europe/Madrid") in new stack
    -- Executing [s at test:2] NoOp("Local/Test1 at test-00000036;2", "Test IFTIME DEC nok") in new stack
    -- Executing [s at test:3] GotoIfTime("Local/Test1 at test-00000036;2", "*,*,*,dec?decok:decnok") in new stack
    -- Goto (test,s,6)
    -- Executing [s at test:6] NoOp("Local/Test1 at test-00000036;2", "GotoIftime DEC - NOK") in new stack
    -- Executing [s at test:7] NoOp("Local/Test1 at test-00000036;2", "Test IFTIME FEB ok") in new stack
    -- Executing [s at test:8] GotoIfTime("Local/Test1 at test-00000036;2", "*,*,*,feb?febok:febnook") in new stack
    -- Goto (test,s,11)
    -- Executing [s at test:11] NoOp("Local/Test1 at test-00000036;2", "GotoIftime FEB - NOK") in new stack
    -- Executing [s at test:12] Hangup("Local/Test1 at test-00000036;2", "") in new stack
  == Spawn extension (test, s, 12) exited non-zero on 'Local/Test1 at test-00000036;2'

test 2: Setting TESTTIME Variable with comas - Expected NOT consistent with real

Expected Result:
    - IFTIME DEC ok
    - GotoIftime DEC ok
    - IFTIME FEB nok
    - GotoIftime FEB nok
Obtained Result:
    - IFTIME DEC nok
    - GotoIftime DEC nok
    - IFTIME FEB ok
    - GotoIftime FEB nok

iospbx004*CLI> originate local/Test2 at test application wait 5
    -- Called Test2 at test
    -- Executing [Test2 at test:1] NoOp("Local/Test2 at test-00000037;2", "Time is Thu Feb  7 12:54:18 2019"") in new stack
    -- Executing [Test2 at test:2] Set("Local/Test2 at test-00000037;2", "__TESTTIME=2018-12-30,18:00:00,Europe/Madrid") in new stack
    -- Executing [Test2 at test:3] Goto("Local/Test2 at test-00000037;2", "s,1") in new stack
    -- Goto (test,s,1)
    -- Executing [s at test:1] NoOp("Local/Test2 at test-00000037;2", "Time is Thu Feb  7 12:54:18 2019 - TESTTIME IS 2018-12-30,18:00:00,Europe/Madrid") in new stack
    -- Executing [s at test:2] NoOp("Local/Test2 at test-00000037;2", "Test IFTIME DEC nok") in new stack
    -- Executing [s at test:3] GotoIfTime("Local/Test2 at test-00000037;2", "*,*,*,dec?decok:decnok") in new stack
    -- Goto (test,s,6)
    -- Executing [s at test:6] NoOp("Local/Test2 at test-00000037;2", "GotoIftime DEC - NOK") in new stack
    -- Executing [s at test:7] NoOp("Local/Test2 at test-00000037;2", "Test IFTIME FEB ok") in new stack
    -- Executing [s at test:8] GotoIfTime("Local/Test2 at test-00000037;2", "*,*,*,feb?febok:febnook") in new stack
    -- Goto (test,s,11)
    -- Executing [s at test:11] NoOp("Local/Test2 at test-00000037;2", "GotoIftime FEB - NOK") in new stack
    -- Executing [s at test:12] Hangup("Local/Test2 at test-00000037;2", "") in new stack
  == Spawn extension (test, s, 12) exited non-zero on 'Local/Test2 at test-00000037;2'

test 3: Setting TESTTIME function by values - Expected NOT consistent with real
Expected Result:
    - IFTIME DEC ok
    - GotoIftime DEC ok
    - IFTIME FEB nok
    - GotoIftime FEB nok
Obtained Result:
    - IFTIME DEC nok
    - GotoIftime DEC nok
    - IFTIME FEB ok
    - GotoIftime FEB ok

iospbx004*CLI> originate local/Test3 at test application wait 5
    -- Called Test3 at test
    -- Executing [Test3 at test:1] NoOp("Local/Test3 at test-00000038;2", "Time is Thu Feb  7 12:54:21 2019"") in new stack
    -- Executing [Test3 at test:2] Set("Local/Test3 at test-00000038;2", "TESTTIME(2018-12-30,18:00:00,Europe/Madrid)=TestTime") in new stack
    -- Executing [Test3 at test:3] Goto("Local/Test3 at test-00000038;2", "s,1") in new stack
    -- Goto (test,s,1)
    -- Executing [s at test:1] NoOp("Local/Test3 at test-00000038;2", "Time is Thu Feb  7 12:54:21 2019 - TESTTIME IS ") in new stack
    -- Executing [s at test:2] NoOp("Local/Test3 at test-00000038;2", "Test IFTIME DEC nok") in new stack
    -- Executing [s at test:3] GotoIfTime("Local/Test3 at test-00000038;2", "*,*,*,dec?decok:decnok") in new stack
    -- Goto (test,s,6)
    -- Executing [s at test:6] NoOp("Local/Test3 at test-00000038;2", "GotoIftime DEC - NOK") in new stack
    -- Executing [s at test:7] NoOp("Local/Test3 at test-00000038;2", "Test IFTIME FEB ok") in new stack
    -- Executing [s at test:8] GotoIfTime("Local/Test3 at test-00000038;2", "*,*,*,feb?febok:febnook") in new stack
    -- Goto (test,s,9)
    -- Executing [s at test:9] NoOp("Local/Test3 at test-00000038;2", "GotoIftime FEB - OK") in new stack
    -- Executing [s at test:10] Goto("Local/Test3 at test-00000038;2", "end") in new stack
    -- Goto (test,s,12)
    -- Executing [s at test:12] Hangup("Local/Test3 at test-00000038;2", "") in new stack
  == Spawn extension (test, s, 12) exited non-zero on 'Local/Test3 at test-00000038;2'

test 4: Setting TESTTIME function by args - Expected NOT consistent with real

Expected Result:
    - IFTIME DEC ok
    - GotoIftime DEC ok
    - IFTIME FEB nok
    - GotoIftime FEB nok
Obtained Result:
    - IFTIME DEC nok
    - GotoIftime DEC nok
    - IFTIME FEB ok
    - GotoIftime FEB ok
iospbx004*CLI> originate local/Test4 at test application wait 5
    -- Called Test4 at test
    -- Executing [Test4 at test:1] NoOp("Local/Test4 at test-00000039;2", "Time is Thu Feb  7 12:54:24 2019"") in new stack
    -- Executing [Test4 at test:2] Set("Local/Test4 at test-00000039;2", "TESTTIME()=2018-12-30,18:00:00,Europe/Madrid") in new stack
    -- Executing [Test4 at test:3] Goto("Local/Test4 at test-00000039;2", "s,1") in new stack
    -- Goto (test,s,1)
    -- Executing [s at test:1] NoOp("Local/Test4 at test-00000039;2", "Time is Thu Feb  7 12:54:24 2019 - TESTTIME IS ") in new stack
    -- Executing [s at test:2] NoOp("Local/Test4 at test-00000039;2", "Test IFTIME DEC nok") in new stack
    -- Executing [s at test:3] GotoIfTime("Local/Test4 at test-00000039;2", "*,*,*,dec?decok:decnok") in new stack
    -- Goto (test,s,6)
    -- Executing [s at test:6] NoOp("Local/Test4 at test-00000039;2", "GotoIftime DEC - NOK") in new stack
    -- Executing [s at test:7] NoOp("Local/Test4 at test-00000039;2", "Test IFTIME FEB ok") in new stack
    -- Executing [s at test:8] GotoIfTime("Local/Test4 at test-00000039;2", "*,*,*,feb?febok:febnook") in new stack
    -- Goto (test,s,9)
    -- Executing [s at test:9] NoOp("Local/Test4 at test-00000039;2", "GotoIftime FEB - OK") in new stack
    -- Executing [s at test:10] Goto("Local/Test4 at test-00000039;2", "end") in new stack
    -- Goto (test,s,12)
    -- Executing [s at test:12] Hangup("Local/Test4 at test-00000039;2", "") in new stack
  == Spawn extension (test, s, 12) exited non-zero on 'Local/Test4 at test-00000039;2'


> TESTTIME feature not working
> ----------------------------
>
>                 Key: ASTERISK-28276
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28276
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: PBX/General
>    Affects Versions: 13.22.0
>         Environment: Ubuntu Linux
>            Reporter: granjerox
>
> Can't get iftime nor gotoiftime to use a diferent datetime than systemtime.
> {code}
> Asterisk version
> iospbx004*CLI> core show version 
> Asterisk 13.22.0 built by root @ iospbx004 on a x86_64 running Linux on 2018-08-10 10:22:19 UTC
> {code}
> *DIALPLAN*
> {code}
> [test]
> exten => s,1,NoOp(Time is ${STRFTIME()} - TESTTIME IS ${TESTTIME})
>     same => n,NoOp(Test IFTIME DEC ${IFTIME(*,*,*,dec?ok:nok)})
>     same => n,GotoIfTime(*,*,*,dec?decok:decnok)
>         same => n(decok),NoOp(GotoIftime DEC - OK)
>         same => n,Goto(feb)
>         same => n(decnok),NoOp(GotoIftime DEC - NOK)
>     same => n(feb),NoOp(Test IFTIME FEB ${IFTIME(*,*,*,feb?ok:nook)})
>     same => n,GotoIfTime(*,*,*,feb?febok:febnook)
>         same => n(febok),NoOp(GotoIftime FEB - OK)
>         same => n,Goto(end)
>         same => n(febnook),NoOp(GotoIftime FEB - NOK)
>     same => n(end),Hangup
> exten => Test1,1,NoOp(Time is ${STRFTIME()}")
>     same => n,Set(__TESTTIME=2018-12-30 18:00:00 Europe/Madrid)
>     same => n,Goto(s,1)
> exten => Test2,1,NoOp(Time is ${STRFTIME()}")
>     same => n,Set(__TESTTIME=2018-12-30,18:00:00,Europe/Madrid)
>     same => n,Goto(s,1)
> exten => Test3,1,NoOp(Time is ${STRFTIME()}")
>     same => n,Set(TESTTIME(2018-12-30,18:00:00,Europe/Madrid)=TestTime)
>     same => n,Goto(s,1)
> exten => Test4,1,NoOp(Time is ${STRFTIME()}")
>     same => n,Set(TESTTIME()=2018-12-30,18:00:00,Europe/Madrid)
>     same => n,Goto(s,1)
> {code}
> * test 0: not using testtime - Expected consistent with real *
> * Expected Result:
> ** IFTIME DEC nok
> ** GotoIftime DEC nok
> ** IFTIME FEB ok
> ** GotoIftime FEB ok
> * Obtained Result:
> ** IFTIME DEC nok
> ** GotoIftime DEC nok
> ** IFTIME FEB ok
> ** GotoIftime FEB ok
> {code}
> iospbx004*CLI> originate local/s at test application wait 5
>     -- Called s at test
>     -- Executing [s at test:1] NoOp("Local/s at test-00000035;2", "Time is Thu Feb  7 12:53:34 2019 - TESTTIME IS ") in new stack
>     -- Executing [s at test:2] NoOp("Local/s at test-00000035;2", "Test IFTIME DEC nok") in new stack
>     -- Executing [s at test:3] GotoIfTime("Local/s at test-00000035;2", "*,*,*,dec?decok:decnok") in new stack
>     -- Goto (test,s,6)
>     -- Executing [s at test:6] NoOp("Local/s at test-00000035;2", "GotoIftime DEC - NOK") in new stack
>     -- Executing [s at test:7] NoOp("Local/s at test-00000035;2", "Test IFTIME FEB ok") in new stack
>     -- Executing [s at test:8] GotoIfTime("Local/s at test-00000035;2", "*,*,*,feb?febok:febnook") in new stack
>     -- Goto (test,s,9)
>     -- Executing [s at test:9] NoOp("Local/s at test-00000035;2", "GotoIftime FEB - OK") in new stack
>     -- Executing [s at test:10] Goto("Local/s at test-00000035;2", "end") in new stack
>     -- Goto (test,s,12)
>     -- Executing [s at test:12] Hangup("Local/s at test-00000035;2", "") in new stack
>   == Spawn extension (test, s, 12) exited non-zero on 'Local/s at test-00000035;2'
> {code}
> test 1: Setting TESTTIME Variable with spaces - Expected NOT consistent with real
> Expected Result:
>     - IFTIME DEC ok
>     - GotoIftime DEC ok
>     - IFTIME FEB nok
>     - GotoIftime FEB nok
> Obtained Result:
>     - IFTIME DEC nok
>     - GotoIftime DEC nok
>     - IFTIME FEB ok
>     - GotoIftime FEB nok
> iospbx004*CLI> originate local/Test1 at test application wait 5
>     -- Called Test1 at test
>     -- Executing [Test1 at test:1] NoOp("Local/Test1 at test-00000036;2", "Time is Thu Feb  7 12:54:15 2019"") in new stack
>     -- Executing [Test1 at test:2] Set("Local/Test1 at test-00000036;2", "__TESTTIME=2018-12-30 18:00:00 Europe/Madrid") in new stack
>     -- Executing [Test1 at test:3] Goto("Local/Test1 at test-00000036;2", "s,1") in new stack
>     -- Goto (test,s,1)
>     -- Executing [s at test:1] NoOp("Local/Test1 at test-00000036;2", "Time is Thu Feb  7 12:54:15 2019 - TESTTIME IS 2018-12-30 18:00:00 Europe/Madrid") in new stack
>     -- Executing [s at test:2] NoOp("Local/Test1 at test-00000036;2", "Test IFTIME DEC nok") in new stack
>     -- Executing [s at test:3] GotoIfTime("Local/Test1 at test-00000036;2", "*,*,*,dec?decok:decnok") in new stack
>     -- Goto (test,s,6)
>     -- Executing [s at test:6] NoOp("Local/Test1 at test-00000036;2", "GotoIftime DEC - NOK") in new stack
>     -- Executing [s at test:7] NoOp("Local/Test1 at test-00000036;2", "Test IFTIME FEB ok") in new stack
>     -- Executing [s at test:8] GotoIfTime("Local/Test1 at test-00000036;2", "*,*,*,feb?febok:febnook") in new stack
>     -- Goto (test,s,11)
>     -- Executing [s at test:11] NoOp("Local/Test1 at test-00000036;2", "GotoIftime FEB - NOK") in new stack
>     -- Executing [s at test:12] Hangup("Local/Test1 at test-00000036;2", "") in new stack
>   == Spawn extension (test, s, 12) exited non-zero on 'Local/Test1 at test-00000036;2'
> test 2: Setting TESTTIME Variable with comas - Expected NOT consistent with real
> Expected Result:
>     - IFTIME DEC ok
>     - GotoIftime DEC ok
>     - IFTIME FEB nok
>     - GotoIftime FEB nok
> Obtained Result:
>     - IFTIME DEC nok
>     - GotoIftime DEC nok
>     - IFTIME FEB ok
>     - GotoIftime FEB nok
> iospbx004*CLI> originate local/Test2 at test application wait 5
>     -- Called Test2 at test
>     -- Executing [Test2 at test:1] NoOp("Local/Test2 at test-00000037;2", "Time is Thu Feb  7 12:54:18 2019"") in new stack
>     -- Executing [Test2 at test:2] Set("Local/Test2 at test-00000037;2", "__TESTTIME=2018-12-30,18:00:00,Europe/Madrid") in new stack
>     -- Executing [Test2 at test:3] Goto("Local/Test2 at test-00000037;2", "s,1") in new stack
>     -- Goto (test,s,1)
>     -- Executing [s at test:1] NoOp("Local/Test2 at test-00000037;2", "Time is Thu Feb  7 12:54:18 2019 - TESTTIME IS 2018-12-30,18:00:00,Europe/Madrid") in new stack
>     -- Executing [s at test:2] NoOp("Local/Test2 at test-00000037;2", "Test IFTIME DEC nok") in new stack
>     -- Executing [s at test:3] GotoIfTime("Local/Test2 at test-00000037;2", "*,*,*,dec?decok:decnok") in new stack
>     -- Goto (test,s,6)
>     -- Executing [s at test:6] NoOp("Local/Test2 at test-00000037;2", "GotoIftime DEC - NOK") in new stack
>     -- Executing [s at test:7] NoOp("Local/Test2 at test-00000037;2", "Test IFTIME FEB ok") in new stack
>     -- Executing [s at test:8] GotoIfTime("Local/Test2 at test-00000037;2", "*,*,*,feb?febok:febnook") in new stack
>     -- Goto (test,s,11)
>     -- Executing [s at test:11] NoOp("Local/Test2 at test-00000037;2", "GotoIftime FEB - NOK") in new stack
>     -- Executing [s at test:12] Hangup("Local/Test2 at test-00000037;2", "") in new stack
>   == Spawn extension (test, s, 12) exited non-zero on 'Local/Test2 at test-00000037;2'
> test 3: Setting TESTTIME function by values - Expected NOT consistent with real
> Expected Result:
>     - IFTIME DEC ok
>     - GotoIftime DEC ok
>     - IFTIME FEB nok
>     - GotoIftime FEB nok
> Obtained Result:
>     - IFTIME DEC nok
>     - GotoIftime DEC nok
>     - IFTIME FEB ok
>     - GotoIftime FEB ok
> iospbx004*CLI> originate local/Test3 at test application wait 5
>     -- Called Test3 at test
>     -- Executing [Test3 at test:1] NoOp("Local/Test3 at test-00000038;2", "Time is Thu Feb  7 12:54:21 2019"") in new stack
>     -- Executing [Test3 at test:2] Set("Local/Test3 at test-00000038;2", "TESTTIME(2018-12-30,18:00:00,Europe/Madrid)=TestTime") in new stack
>     -- Executing [Test3 at test:3] Goto("Local/Test3 at test-00000038;2", "s,1") in new stack
>     -- Goto (test,s,1)
>     -- Executing [s at test:1] NoOp("Local/Test3 at test-00000038;2", "Time is Thu Feb  7 12:54:21 2019 - TESTTIME IS ") in new stack
>     -- Executing [s at test:2] NoOp("Local/Test3 at test-00000038;2", "Test IFTIME DEC nok") in new stack
>     -- Executing [s at test:3] GotoIfTime("Local/Test3 at test-00000038;2", "*,*,*,dec?decok:decnok") in new stack
>     -- Goto (test,s,6)
>     -- Executing [s at test:6] NoOp("Local/Test3 at test-00000038;2", "GotoIftime DEC - NOK") in new stack
>     -- Executing [s at test:7] NoOp("Local/Test3 at test-00000038;2", "Test IFTIME FEB ok") in new stack
>     -- Executing [s at test:8] GotoIfTime("Local/Test3 at test-00000038;2", "*,*,*,feb?febok:febnook") in new stack
>     -- Goto (test,s,9)
>     -- Executing [s at test:9] NoOp("Local/Test3 at test-00000038;2", "GotoIftime FEB - OK") in new stack
>     -- Executing [s at test:10] Goto("Local/Test3 at test-00000038;2", "end") in new stack
>     -- Goto (test,s,12)
>     -- Executing [s at test:12] Hangup("Local/Test3 at test-00000038;2", "") in new stack
>   == Spawn extension (test, s, 12) exited non-zero on 'Local/Test3 at test-00000038;2'
> test 4: Setting TESTTIME function by args - Expected NOT consistent with real
> Expected Result:
>     - IFTIME DEC ok
>     - GotoIftime DEC ok
>     - IFTIME FEB nok
>     - GotoIftime FEB nok
> Obtained Result:
>     - IFTIME DEC nok
>     - GotoIftime DEC nok
>     - IFTIME FEB ok
>     - GotoIftime FEB ok
> iospbx004*CLI> originate local/Test4 at test application wait 5
>     -- Called Test4 at test
>     -- Executing [Test4 at test:1] NoOp("Local/Test4 at test-00000039;2", "Time is Thu Feb  7 12:54:24 2019"") in new stack
>     -- Executing [Test4 at test:2] Set("Local/Test4 at test-00000039;2", "TESTTIME()=2018-12-30,18:00:00,Europe/Madrid") in new stack
>     -- Executing [Test4 at test:3] Goto("Local/Test4 at test-00000039;2", "s,1") in new stack
>     -- Goto (test,s,1)
>     -- Executing [s at test:1] NoOp("Local/Test4 at test-00000039;2", "Time is Thu Feb  7 12:54:24 2019 - TESTTIME IS ") in new stack
>     -- Executing [s at test:2] NoOp("Local/Test4 at test-00000039;2", "Test IFTIME DEC nok") in new stack
>     -- Executing [s at test:3] GotoIfTime("Local/Test4 at test-00000039;2", "*,*,*,dec?decok:decnok") in new stack
>     -- Goto (test,s,6)
>     -- Executing [s at test:6] NoOp("Local/Test4 at test-00000039;2", "GotoIftime DEC - NOK") in new stack
>     -- Executing [s at test:7] NoOp("Local/Test4 at test-00000039;2", "Test IFTIME FEB ok") in new stack
>     -- Executing [s at test:8] GotoIfTime("Local/Test4 at test-00000039;2", "*,*,*,feb?febok:febnook") in new stack
>     -- Goto (test,s,9)
>     -- Executing [s at test:9] NoOp("Local/Test4 at test-00000039;2", "GotoIftime FEB - OK") in new stack
>     -- Executing [s at test:10] Goto("Local/Test4 at test-00000039;2", "end") in new stack
>     -- Goto (test,s,12)
>     -- Executing [s at test:12] Hangup("Local/Test4 at test-00000039;2", "") in new stack
>   == Spawn extension (test, s, 12) exited non-zero on 'Local/Test4 at test-00000039;2'



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list