Re: [asterisk-users] Help with loop counting?
Phil Knighton wrote: > exten => i,1,Set(trips=$[${trips} + 1]) > exten => i,2,Goto(s,7) i=invalid, t=timeout exten => t,1,Set(trips=$[${trips} + 1]) You'll also want to initialize ${trips} with a Set(trips=0) at the beginning of your routine. Doug -- Ben Franklin quote: "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety." ___ --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
Re: [asterisk-users] Help with loop counting?
Hi I believe that exten => s,7,GotoIf($[${trips}=4]?,8) the , should be : On 10/24/07, Phil Knighton <[EMAIL PROTECTED]> wrote: > > Hi > > I have a situation where I want to be able to count how many times a > caller goes round a loop of "Please hold...", "please continue to hold". I > have found an example on voip-info but I can't get it to work. Not sure if > I've got some syntax wrong somewhere? All that happens at the moment, is I > hit is the playback of "som-debug" at . Any ideas would be appreciated! > > extensions.conf: > > [so-mainmenu] > exten => s,1,Answer > exten => s,2,Set(trips=1) > exten => s,3,SetMusicOnHold(default) > exten => s,4,Set(TIMEOUT(digit)=5) > exten => s,5,Set(TIMEOUT(response)=10) > exten => s,6,Background(softopt/som-mainmenu) > exten => s,7,GotoIf($[${trips}=4]?,8) > exten => s,8,WaitExten(5) > exten => s,9,Wait(5) > exten => 1,1,Goto(so-sandm,s,1) > exten => 2,1,Goto(so-support,s,1) > exten => 3,1,Goto(so-accbill,s,1) > exten => 4,1,Goto(so-switchboard,s,1) > exten => 5,1,Goto(so-silentdial),s,1) > exten => s,10,Background(softopt/som-mainmenuretry) > exten => s,11,Wait(1) > exten => s,12,Background(softopt/som-mainmenuopts) > exten => s,13,Goto(s,7) > exten => ,1,Playback(softopt/som-debug) > exten => ,2,Hangup() > exten => i,1,Set(trips=$[${trips} + 1]) > exten => i,2,Goto(s,7) > > Cheers > > Phil > > Phil Knighton > Soft Option Technologies > > ___ > --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 > ___ --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
[asterisk-users] Help with loop counting?
Hi I have a situation where I want to be able to count how many times a caller goes round a loop of "Please hold...", "please continue to hold". I have found an example on voip-info but I can't get it to work. Not sure if I've got some syntax wrong somewhere? All that happens at the moment, is I hit is the playback of "som-debug" at . Any ideas would be appreciated! extensions.conf: [so-mainmenu] exten => s,1,Answer exten => s,2,Set(trips=1) exten => s,3,SetMusicOnHold(default) exten => s,4,Set(TIMEOUT(digit)=5) exten => s,5,Set(TIMEOUT(response)=10) exten => s,6,Background(softopt/som-mainmenu) exten => s,7,GotoIf($[${trips}=4]?,8) exten => s,8,WaitExten(5) exten => s,9,Wait(5) exten => 1,1,Goto(so-sandm,s,1) exten => 2,1,Goto(so-support,s,1) exten => 3,1,Goto(so-accbill,s,1) exten => 4,1,Goto(so-switchboard,s,1) exten => 5,1,Goto(so-silentdial),s,1) exten => s,10,Background(softopt/som-mainmenuretry) exten => s,11,Wait(1) exten => s,12,Background(softopt/som-mainmenuopts) exten => s,13,Goto(s,7) exten => ,1,Playback(softopt/som-debug) exten => ,2,Hangup() exten => i,1,Set(trips=$[${trips} + 1]) exten => i,2,Goto(s,7) Cheers Phil Phil Knighton Soft Option Technologies ___ --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