Dialplan Explanation

superhombre
Joined: Tue 12 of Jan, 2016

Re: Dialplan Explanation

Posted:Wed 18 of Oct, 2017 (14:25 UTC)
ok, in this context, when **7277 is dialed...
priority 1 sets a value to PWISSET to the value of DB(pw/$CALLERID(num))
2 is a noop that simply displays that in the console
3 checks if PWISSET = nothing and goes to 102 if it does and 10 if not.
10 plays messegae that password is inncorrect and 11 returns to 1
102 accepts a new password of 4 digits into variable NEWPWD while playing a recording named vm-newpasswrd
103 sets the DB(pw/CALLERID(num)) to the new password
104 plays the recording vm-passchanged
1054 hangs up

when 0800 is dialed priority 1 sets NEEDPW to db(PW/$callerid(num))
2 is a no op- does nothing except displays it on console
3 is no op
4 sets DST to EXTEN
5 is NO OP
6 checks if NEEDPW = "" and goes to 102 if yes and 100 if not
100 accepts 4 digits and sets PINN to what is entered wile playing back the recording vm-password
101 goes to EXTEN,102 if PINN = NEEDPW and 10 if not
102 dials out via dahdi

This plan does seem somewhat depreciated however.
mrg33
Joined: Sun 14 of May, 2017

Dialplan Explanation

Posted:Sun 14 of May, 2017 (15:42 UTC)
Guys can someone please assist in explaining this dialplan:
;;set/unset/change pin
exten => **7277,1,set(PWISSET=${DB(pw/${CALLERID(num)})})
exten => **7277,n,noop(${PWISSET})
exten => **7277,n,gotoif($"${PWISSET}" = ""?102:100)
exten => **7277,100,read(PININCHANGE|vm-password|4)
exten => **7277,101,gotoif($"${PININCHANGE}" = "${PWISSET}"?102:10)
exten => **7277,102,read(NEWPWD|vm-newpassword|4)
exten => **7277,103,set(DB(pw/${CALLERID(num)})=${NEWPWD})
exten => **7277,104,playback(vm-passchanged)
exten => **7277,1054,hangup()
exten => **7277,10,Playback(vm-incorrect)
exten => **7277,11,goto(1)


exten => _0800-1.,1,set(NEEDPW=${DB(pw/${CALLERID(num)})})
exten => _0800-1.,n,noop(Caller ${CALLERID(num)})
exten => _0800-1.,n,noop(Password ${NEEDPW})
exten => _0800-1.,n,set(DST=${EXTEN})
exten => _0800-1.,n,noop(Destination ${DST})
exten => _0800-1.,n,gotoif($"${NEEDPW}" = ""?102:100)
exten => _0800-1.,100,read(PININ|vm-password|4)
exten => _0800-1.,101,gotoif($"${PININ}" = "${NEEDPW}"?${EXTEN},102:${EXTEN},10)
exten => _0800-1.,102,dial(dahdi/g1/${EXTEN});;telkom toll free
exten => _0800-1.,10,Playback(vm-incorrect)
exten => _0800-1.,11,goto(100)