Skip to content

Instantly share code, notes, and snippets.

@elcontrastador
Created September 29, 2011 06:08
Show Gist options
  • Save elcontrastador/1250091 to your computer and use it in GitHub Desktop.
Save elcontrastador/1250091 to your computer and use it in GitHub Desktop.
[oneif_net_confbridge]
exten => start,1,Answer()
same => n,Wait(0.5)
; same => n,SayText(Conference bridge administrator login)
; same => n,SayText(After the beep. Please enter your administrator PIN followed by the pound sign))
same => n,Playback(beep)
same => n,Read(ADMINPIN,,,,3,5)
same => n,Verbose(ADMINPIN => ${ADMINPIN})
same => n,Verbose(${DB(ONEIF_NET/CONF_ADMIN_PIN/${ADMINPIN})})
same => n,GotoIf($[${DB(ONEIF_NET/CONF_ADMIN_PIN)}=${ADMINPIN}]?valid:invalid)
same => n(invalid),Playback(conf-errormenu)
same => n,Playback(vm-goodbye)
same => n,Hangup()
same => n(valid),Goto(oneif_net_confbridge_admin,start,1)
[oneif_net_confbridge_admin]
exten => start,1,Set(ATTEMPTS=0)
same => n(begin),Read(CONFROOM,conf-getconfno,,,3,10)
same => n,GotoIf(${DB_EXISTS(ONEIF_NET_CONFROOM/${CONFROOM})}?yes:no)
same => n(no),Playback(conf-errormenu)
same => n,SayText(Valid conference rooms are numbered between 300 and 302)
same => n,Set(ATTEMPTS=$[${ATTEMPTS}+1])
same => n,GotoIf($[${ATTEMPTS}<3]?begin:exit)
same => n(exit),Playback(vm-goodbye)
same => n,Hangup()
same => n(yes),Playback(auth-thankyou)
; same => n,Goto(oneif_net_confbridge_pin_menu,start,1)
same => n,Read(CONFPIN,conf-getpin,,,3,10) same => n,GotoIf($[${DB(ONEIF_NET_CONFROOM/${CONFROOM})}=${CONFPIN}]?match:nomatch)
same => n(match),Playback(auth-thankyou)
same => n,Set(CHANNEL(musicclass)=oneif_net)
same => n,Set(CONFBRIDGE_JOIN_SOUND=en/confbridge-join)
same => n,Set(CONFBRIDGE_LEAVE_SOUND=en/confbridge-leave)
same => n,ConfBridge(${ROOM},acsM(oneif_net))
same => n(nomatch),Goto(11)
exten => h,SayText(Deleting Key)
same => n,Verbose(0,${DB_DELETE(ONEIF_NET_CONFROOM/${CONFROOM})})
same => n,Hangup()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment