[Asterisk-Users] RFC Follow Me Find Me script

Andrew D Kirch trelane at trelane.net
Fri Mar 10 14:08:16 MST 2006


This is a follow/find me script that I can't quite get to work, asterisk 
wont save forward/${calleridnum} to AstDB... any comments or thoughts on 
how to make this work or change it to work differently are appreciated.  
The voice prompts to go with all playback/background extensions are 
commented appropriately.  I hope this code is of use to some of you and 
any help with a perfected version is of course appreciated.
[Forward]
        exten => s,1,Playback(forward/extension-forwarding)
   ;Extension Forwarding
        exten => s,2,GotoIf($[${CALLERIDNUM}<300]?s,5)
   ;since 1xx is the pattern match for internal extensions anything less 
than 300 has to be internal so we already know that that is the 
extension they are wanting to forward
        exten => s,3,Read(CALLERIDNUM,foward/please-ent-exten,3)
    ;if it's not have the user enter their 3 digit enternal extension
    ;please enter the extension you want to forward
        exten => s,4,SayNumber(${CALLERIDNUM})
        exten => s,5,Background(forward/extension-fwd-menu)
 ;to hear your current extension forward options press 1, to forward 
your phone press 2, to cancel your forwarding press 3


        exten => 1,1,Set(FORWARD=${DB(forward/${CALLERIDNUM})})
        exten => 1,2,NoOp(FORWARD is ${FORWARD})
        exten => 1,3,GotoIf($[${FORWARD}>0]?100,3)
        exten => 1,4,Playback(forward/your-ext-not-forward)
    ;your extension is not currently forwarded
        exten => 1,5,Goto(Forward,s,5)
    ;back to main menu
        exten => 100,1,Playback(forward/your-ext-forward)
        exten => 100,2,SayDigits(${FORWARD})
    ;your extension is currently forwarded to <extension>
        exten => 100,3,Goto(Forward,s,5)
   ;back to main menu

        exten => 2,1,Read(FORWARD,forward/please-ent-exten)
        exten => 2,2,NoOp(FORWARD is ${FORWARD})
        exten => 2,3,Set($ { DB( forward/${CALLERIDNUM} ) = ${FORWARD} } )
        exten => 2,4,NoOp(forward/${CALLERIDNUM} is ${ 
DB(forward/${CALLERIDNUM} ) } )
        exten => 2,5,Playback(forward/your-ext-forward-saved)
    ;your extension forward has been saved
        exten => 2,6,Goto(Forward,s,5)

        exten => 3,1,DBdel(forward/${CALLERIDNUM})
        exten => 3,2,PlayBack(forward/exten-forward-cancel)
    ; your extension forward has been deleted.
        exten => 3,3,Goto(Forward,s,1)




More information about the asterisk-users mailing list