Author Topic: "If" based on variable  (Read 1362 times)

marco74

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
    • View Profile
"If" based on variable
« on: June 23, 2012, 08:26:26 PM »
Hi,

Is it possible to create an "If" block based on a variable?

In one flow (a configuration menu) I'd like to change a setting using the an Asterisk Command "Set(DB(settings/continue)=Y)". In another flow I'd like to make a decision based on the setting. I'll read the variable using Set(CONTINUE=${DB(settings/continue)}). So with an IF block (or switch) like IF ${CONTINUE} equal "Y" ...... I can change the flow.

Marco.

Sebastian

  • Askozia Staff
  • Hero Member
  • *
  • Posts: 1136
  • Karma: 43
    • View Profile
Re: "If" based on variable
« Reply #1 on: June 27, 2012, 09:50:20 AM »
Currently you can only choose whatever you find in the drop down menu.

However, we are thinking about adding more options to the if module in 2.2.

Sebastian 

marco74

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
    • View Profile
Re: "If" based on variable
« Reply #2 on: June 27, 2012, 07:50:25 PM »
However, we are thinking about adding more options to the if module in 2.2.

That would be very nice :-)

johanpbx

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: "If" based on variable
« Reply #3 on: April 21, 2017, 01:09:23 PM »
it this now implemented in 5.2 ???

goseph

  • Hero Member
  • *****
  • Posts: 818
  • Karma: 31
    • View Profile
Re: "If" based on variable
« Reply #4 on: April 21, 2017, 02:31:58 PM »

johanpbx

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: "If" based on variable
« Reply #5 on: April 23, 2017, 06:12:42 PM »
Goseph dear friend,

You're the man... thanks a lot for the tip.

A strange thing is that the ifgoto manual is not working at all when condition is DB(PATHSWITCH/0000***000000**) ==equal 0
I had to use DB(PATHSWITCH/0000***000000**) ==equal 1 and reverse the outcome from green to red and from red to green....
So with the ==equal 0 it is not working ????
took me a while to find that bug...
but now it is working (more or less).

Still  a question.  In order to change the pathswitch from 0 to 1 or reverse I call the number "0000***000000**" with the option dailnumber... although this is working I always get a hangup afterwards.???  I am not sure if i can just set the PATSWITCH/.... value just like that because there is also a parameter /CustomDevstate/pathswitch0000***000000** that can be set to INUSE or NOT_INUSE ????  And I'm not sure if the BLF are set correctly... that's why I for the the time being just call the number... (this updates the BLF correctly)
Are there better solutions???

Thanks
Johan