Hi, Is there a way to have a Do-While sort of loop, as opposed to a simple While? I have a condition that the loop depends on even for the first iteration, as it often happens in life. Regards, Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071130/2ceb78a2/attachment.htm
You can try something like this: exten => _X.,1,SET(condition=${RAND(1,2)}) exten => _X.,2,GotoIf($[${condition} = '1']?1:3) exten => _X.,3,SET(Result is 2) Regards, Ricardo Carvalho. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071130/5954635e/attachment.htm
here's a do-while loop - the contents of the loop are executed BEFORE the condition is tested. ------------------------------------------------------------------ labelA: do some loopy things if (we need to loop again) goto labelA: ------------------------------------------------------------------ to contrast that, here's a while loop: ------------------------------------------------------------------ labelA: if (we need to do the loop at all) { do some loopy things goto labelA: } ------------------------------------------------------------------ Sorry it's in some pseudocode that doesn't really represent a language at all. I can't produce asterisk's dialplan functions from memory yet! I'm sure that this will convert very simply though with minor work. "if" would become "GotoIf". For the archives, the usage of asterisk's While construct is found at http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+While Mojo Mike wrote:> Hi, > > Is there a way to have a Do-While sort of loop, as opposed to a simple > While? > > I have a condition that the loop depends on even for the first > iteration, as it often happens in life. > > Regards, > > Mike > ------------------------------------------------------------------------ > > _______________________________________________ > --Bandwidth and Colocation Provided by http://www.api-digital.com-- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
I am out of things to try on getting an X100P card to work. I have a P4 system with CentOS 5.1 installed (network install). After adding required packages I compiled (apparently successful) and installed Zaptel in anticipation of installing Asterisk. I simply cannot get the X100P card to be recognized. I have tried bios setting of PnPOS no and PnPOS yes, tried the card in different slots, disabled all the unused motherboard devices to free up interrupts, etc. The card works flawlessly in a CentOS 4.4 install on an old K6-2 motherboard. If I put an ethernet card in a PCI slot (in addition to the one on the motherboard), it is recognized and configured during boot so I assume the interrupt hardware is working on the mother board. I would really appreciate any suggestions of what I could try here. Thanks! -- Bob Smither <Smither at C-C-I.com>