[asterisk-users] Help with loop counting?

Phil Knighton phil.knighton at mjog.com
Wed Oct 24 05:59:15 CDT 2007


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 9999. 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]?9999,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 => 9999,1,Playback(softopt/som-debug)
exten => 9999,2,Hangup()
exten => i,1,Set(trips=$[${trips} + 1])
exten => i,2,Goto(s,7)
 
Cheers
 
Phil
 
Phil Knighton
Soft Option Technologies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071024/52cee8b3/attachment.htm 


More information about the asterisk-users mailing list