Follow-me


#1

Hi, I am trying to implement follow-me functionality that requires person answering the call to press a button on the keypad to tell asterisk that the call has been answered by a person rather than voicemail, I have input the following lines in my config files and incoming calls are distributed as per the follow me numbers programmed but the need to input confirmation when answering does not work, the call is simply put through with full both way audio.

Any help on this would be much appreciated.

[default]
exten => _9999XXXXXXXXXX,1,Dial(IAX2/“identifier”/${EXTEN:4},40,M(screen))
exten => _9999XXXXXXXXXX,2,Hangup

[macro-screen]
exten => s,1,Wait(1)
exten => s,n,Background(press-1-to-be-connected-to-the-caller)
exten => s,n,Set(TIMEOUT(response=5))
exten => 1,1,NoOp(Caller accepted) ; Do not set MACRO_RESULT to anything to connect the caller
exten => i,1,Set(MACRO_RESULT=CONTINUE)
exten => t,1,Set(MACRO_RESULT=CONTINUE)

[findme]
exten => s,1,Playback(please-hold-while-we-connect-you)
exten => s,n,Dial(LOCAL/9999${findme1}&LOCAL/9999${findme2}&LOCAL/9999${findme3},40,m)


#2

I also need to be able to do the same thing.


#3

After also looking at forums.digium.com/viewtopic.php?t=5872 and using both sets of idea I have been able to come up with something which I found would work:

[quote]; This is an example Follow me script. We first dial the first number to see
; if they are there and will take the call
;exten => 1001,1,Dial(${HOME},20,mM(findme))
; Called either timed out or the person hung up during instruction
;exten => 1001,2,Dial(${TC1},20,mM(findme))
; The above caller did not want it
;exten => 1001,3,Dial(${TC2},20,mM(findme))
[/quote]

[quote][macro-findme]
exten => s,1,wait(1)
exten => s,2,Set(TIMEOUT(response=10))
exten => s,3,Set(TIMEOUT(digit=5))
exten => s,4,Set(MACRO_RESULT=BUSY)
exten => s,5,Playback(press-1-followed-by-#-to-accept-call-press-#-to-reject)
exten => s,6,Read(NUMBER,5)
; press ‘1#’ to accept the call and ‘#’ to reject
exten => s,7,Gotoif($[ ${NUMBER} = 1]:8?20)
exten => s,8,Set(MACRO_RESULT=CONTINUE)

; if it makes it to this step that means we want to accept the call
exten => s,20,Set(MACRO_RESULT=)
[/quote]

If the person call dials ‘1#’ the call is bridged and both sides are able to talk. If they hang-up or dials anything else the current call is dropped and the next number is dialed.