All pastes #355211 Raw Edit

Someone

public text v1 · immutable
·published 2007-02-14 10:49 UTC
rendered paste body
exten => _**21X.,1,Set(DB(users/${CALLERID(num))=${EXTEN:4}) ;Set the value to be forwarded to, user dials **21+ number to be ;forwarded to

exten => _**21X.,2,Answer()
exten => _**21X.,3,Playback(vm-goodbye)

exten => ##21,1,DB_DELETE(users/${CALLERID(num)}); kill forwarding, MUST be done from user phone(Calleridbased)


exten => 240,1,GotoIf($[${DB_EXISTS(users/240)}=1]?2:3)) ;if value exist, it will be and extension, so we go to goto(extension)
;exten => 240,2,Set(${DB_RESULT}=DB(users/${CALLERID(num)})) ;if not we call client
exten => 240,2,Goto(${DB_RESULT})
exten => 240,3,NoOp(${DB_RESULT})
exten => 240,4,Dial(Sip/local,,WwtT)