Asterisk cmd FollowMe

FollowMe

Synopsis

Find-Me/Follow-Me application
Introduced with Asterisk 1.4, see patch 5574

Description

FollowMe(followmeid|options):
FollowMe(followmeid,options): (1.6)

This application performs Find-Me/Follow-Me functionality for the caller as defined in the profile matching the <followmeid> parameter in followme.conf. If the specified <followmeid> profile doesn't exist in followme.conf, execution will be returned to the dialplan and call execution will continue at the next priority.
Forked (=simultaneous) dialing of multiple numbers in the same step is supported with this application if you'd like to dial multiple numbers in the same followme step. Use the '&' operator for that purpose.

Options:
s - Playback the incoming status message prior to starting the follow-me step(s)
a - Record the caller's name so it can be announced to the callee on each step
n - Playback the unreachable status message if we've run out of steps to reach the
or the callee has elected not to be reachable.

Note that every change in followme.conf must be activated with a "module reload app_followme.so" on the Asterisk CLI.

Details

Scenario

  • Call comes in, outside caller dials "100"
  • Desk phone for user Joe rings. No answer
  • Joe's house phone rings.
  • Joe's wife picks up and hears a voice "Please press any key to accept a call for extension 100."
  • Joe's wife hangs up.
  • Joe's cell phone rings.
  • Joe picks up and hears a voice "Please press any key to accept a call for extension 100."
  • Joe presses 1 and says "Hello this is Joe".

Alternately, in the penultimate step
  • Cell voice mail picks up.
  • Voice says "Please press any key to accept a call for extension 100". No keys pressed since it's a voice mail
  • Call is routed to Asterisk voicemail.

The a follow-me number to call is specified in followme.conf. You can specify as many of these numbers as you like. They will be dialed in the order that you specify them in the config file OR as specified with the order field on the number prompt. Therefore forked (parallel) dialing of multiple numbers in the same step is supported.

From the field

Quote: "In my experience and reading, feature codes and cell phones (mobile phones) don’t play well together.  DTMF processing is usually way less than 100% reliable in this setup."

Enhanced usage

Often people want to force their 'follow me' to simply be on or off. So, when it's on, it doesn't ring their desk phone at all, just goes straight to cell/etc. When it's off, it only goes to desk phone, and nowhere else. You can achieve this via extensions.conf by setting a DB key to turn it off and setting a DB key again to turn it back on.

Set the extensions that enable it and disable follow-me via a featuremap in features.conf, and then you just needed to include => followme in the context where you want to be able to enable/disable the functionality and it would work.

FollowMe and Realtime

Asterisk 1.6 comes with dynamic Realtime enabled FollowMe. There is also an Asterisk 1.4 backport available for FollowMe() with Realtime support. See patch 13295.

Example

Example 1

extensions.conf:

exten => _4411,1,Answer
exten => _4411,2,Dial(SIP/${EXTEN},12,t)
exten => _4411,3,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?:4:5)
exten => _4411,4,Followme(${EXTEN})
exten => _4411,5,VoiceMail(u${EXTEN})
exten => _4411,6,Hangup

followme.conf:

[4411]
context => default
number => 4410,30
number => 4420,30

Example 2:

extensions.conf:

exten => 1111,1,Dial(...)
exten => 1111,n,FollowMe(default) ; does this really work?
exten => 1111,n,Hangup

exten => 2222,1,Dial(...)
exten => 2222,n,FollowMe(4444)
exten => 2222,n,Wait(1)
exten => 2222,n,Playback(beep)
exten => 2222,n,Goto(1)

exten => 3333,1,Dial(...)
exten => 3333,n,FollowMe(JohnDoe|san)
exten => 3333,n,Goto(4444,1)

exten => 4444,1,Dial(...)
exten => 4444,n,FollowMe(${EXTEN}|s)
exten => 4444,n,Voicemail(JohnDoe)
exten => 4444,n,Hangup

followme.conf:

[default]
music => default
context => default
number => 1234
number => 5678

[4444]
music => default
context => default
number => 1965751234,5
number => 17182025678,20
number => 1234
number => 5678

[JohnDoe]
number => 09876&210,40,2 ; then call both 09876 and 210 for 40 seconds
number => 543,30,1 ; dial this first for 30 seconds

Example 3: Follow-me without using app_follow me


; in priority 2, you'll want to replace Zap/1 with the person you want to have called by the system
; you'll also want to change the voicemail context on priority 104, if you're using something besides "default"
[incoming]
exten => 300,1,Answer()
exten => 300,2,Dial(Zap/1,30,grM(call-screening^${CALLERIDNUM}^${CONTEXT}^${EXTEN}^${PRIORITY}))
exten => 300,3,Hangup()
exten => 300,103,NoOp(${EXTEN}::${PRIORITY})
exten => 300,104,VoiceMail(u${EXTEN}@default)
exten => 300,105,Hangup()
exten => t,1,Playback(connection-timed-out)
exten => t,2,Playback(goodbye)
exten => t,3,Hangup()

; You may want to replace priorities two through five with a single recording saying
; "You have a call from", as the current implementation is a bit choppy. You could
; also replace the "1-yes-2-no" file in priority 7 to something more appropriate
[macro-call-screening]
exten => s,1,NoOp(${ARG2}::${ARG3}::${ARG4}::)
exten => s,2,Playback(vm-youhave)
exten => s,3,Playback(letters/a)
exten => s,4,Playback(call)
exten => s,5,Playback(from)
exten => s,6,SayDigits(${ARG1})
exten => s,7,Read(ACCEPTCALL|1-yes-2-no|1) ; (repeatoptions)
exten => s,8,GotoIf($["${ACCEPTCALL}" = ""] ?t,1)
exten => s,9,GotoIf($[${ACCEPTCALL} = 2] ?s,11)
exten => s,10,GotoIf($[${ACCEPTCALL} = 1] ?s,14:s,2)
exten => s,11,Set(NEWPRIORITY=$[${ARG4} + 101])
exten => s,12,Set(MACRO_RESULT=GOTO:${ARG2}^${ARG3}^${NEWPRIORITY})
exten => s,13,Goto(s,16);
exten => s,14,Playback(auth-thankyou)
exten => s,15,Set(MACRO_RESULT=)
exten => s,16,NoOp(End of macro)
exten => t,1,Playback(connection-timed-out)
exten => t,2,Goto(s,2)



See also



Go back to Asterisk

FollowMe

Synopsis

Find-Me/Follow-Me application
Introduced with Asterisk 1.4, see patch 5574

Description

FollowMe(followmeid|options):
FollowMe(followmeid,options): (1.6)

This application performs Find-Me/Follow-Me functionality for the caller as defined in the profile matching the <followmeid> parameter in followme.conf. If the specified <followmeid> profile doesn't exist in followme.conf, execution will be returned to the dialplan and call execution will continue at the next priority.
Forked (=simultaneous) dialing of multiple numbers in the same step is supported with this application if you'd like to dial multiple numbers in the same followme step. Use the '&' operator for that purpose.

Options:
s - Playback the incoming status message prior to starting the follow-me step(s)
a - Record the caller's name so it can be announced to the callee on each step
n - Playback the unreachable status message if we've run out of steps to reach the
or the callee has elected not to be reachable.

Note that every change in followme.conf must be activated with a "module reload app_followme.so" on the Asterisk CLI.

Details

Scenario

  • Call comes in, outside caller dials "100"
  • Desk phone for user Joe rings. No answer
  • Joe's house phone rings.
  • Joe's wife picks up and hears a voice "Please press any key to accept a call for extension 100."
  • Joe's wife hangs up.
  • Joe's cell phone rings.
  • Joe picks up and hears a voice "Please press any key to accept a call for extension 100."
  • Joe presses 1 and says "Hello this is Joe".

Alternately, in the penultimate step
  • Cell voice mail picks up.
  • Voice says "Please press any key to accept a call for extension 100". No keys pressed since it's a voice mail
  • Call is routed to Asterisk voicemail.

The a follow-me number to call is specified in followme.conf. You can specify as many of these numbers as you like. They will be dialed in the order that you specify them in the config file OR as specified with the order field on the number prompt. Therefore forked (parallel) dialing of multiple numbers in the same step is supported.

From the field

Quote: "In my experience and reading, feature codes and cell phones (mobile phones) don’t play well together.  DTMF processing is usually way less than 100% reliable in this setup."

Enhanced usage

Often people want to force their 'follow me' to simply be on or off. So, when it's on, it doesn't ring their desk phone at all, just goes straight to cell/etc. When it's off, it only goes to desk phone, and nowhere else. You can achieve this via extensions.conf by setting a DB key to turn it off and setting a DB key again to turn it back on.

Set the extensions that enable it and disable follow-me via a featuremap in features.conf, and then you just needed to include => followme in the context where you want to be able to enable/disable the functionality and it would work.

FollowMe and Realtime

Asterisk 1.6 comes with dynamic Realtime enabled FollowMe. There is also an Asterisk 1.4 backport available for FollowMe() with Realtime support. See patch 13295.

Example

Example 1

extensions.conf:

exten => _4411,1,Answer
exten => _4411,2,Dial(SIP/${EXTEN},12,t)
exten => _4411,3,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?:4:5)
exten => _4411,4,Followme(${EXTEN})
exten => _4411,5,VoiceMail(u${EXTEN})
exten => _4411,6,Hangup

followme.conf:

[4411]
context => default
number => 4410,30
number => 4420,30

Example 2:

extensions.conf:

exten => 1111,1,Dial(...)
exten => 1111,n,FollowMe(default) ; does this really work?
exten => 1111,n,Hangup

exten => 2222,1,Dial(...)
exten => 2222,n,FollowMe(4444)
exten => 2222,n,Wait(1)
exten => 2222,n,Playback(beep)
exten => 2222,n,Goto(1)

exten => 3333,1,Dial(...)
exten => 3333,n,FollowMe(JohnDoe|san)
exten => 3333,n,Goto(4444,1)

exten => 4444,1,Dial(...)
exten => 4444,n,FollowMe(${EXTEN}|s)
exten => 4444,n,Voicemail(JohnDoe)
exten => 4444,n,Hangup

followme.conf:

[default]
music => default
context => default
number => 1234
number => 5678

[4444]
music => default
context => default
number => 1965751234,5
number => 17182025678,20
number => 1234
number => 5678

[JohnDoe]
number => 09876&210,40,2 ; then call both 09876 and 210 for 40 seconds
number => 543,30,1 ; dial this first for 30 seconds

Example 3: Follow-me without using app_follow me


; in priority 2, you'll want to replace Zap/1 with the person you want to have called by the system
; you'll also want to change the voicemail context on priority 104, if you're using something besides "default"
[incoming]
exten => 300,1,Answer()
exten => 300,2,Dial(Zap/1,30,grM(call-screening^${CALLERIDNUM}^${CONTEXT}^${EXTEN}^${PRIORITY}))
exten => 300,3,Hangup()
exten => 300,103,NoOp(${EXTEN}::${PRIORITY})
exten => 300,104,VoiceMail(u${EXTEN}@default)
exten => 300,105,Hangup()
exten => t,1,Playback(connection-timed-out)
exten => t,2,Playback(goodbye)
exten => t,3,Hangup()

; You may want to replace priorities two through five with a single recording saying
; "You have a call from", as the current implementation is a bit choppy. You could
; also replace the "1-yes-2-no" file in priority 7 to something more appropriate
[macro-call-screening]
exten => s,1,NoOp(${ARG2}::${ARG3}::${ARG4}::)
exten => s,2,Playback(vm-youhave)
exten => s,3,Playback(letters/a)
exten => s,4,Playback(call)
exten => s,5,Playback(from)
exten => s,6,SayDigits(${ARG1})
exten => s,7,Read(ACCEPTCALL|1-yes-2-no|1) ; (repeatoptions)
exten => s,8,GotoIf($["${ACCEPTCALL}" = ""] ?t,1)
exten => s,9,GotoIf($[${ACCEPTCALL} = 2] ?s,11)
exten => s,10,GotoIf($[${ACCEPTCALL} = 1] ?s,14:s,2)
exten => s,11,Set(NEWPRIORITY=$[${ARG4} + 101])
exten => s,12,Set(MACRO_RESULT=GOTO:${ARG2}^${ARG3}^${NEWPRIORITY})
exten => s,13,Goto(s,16);
exten => s,14,Playback(auth-thankyou)
exten => s,15,Set(MACRO_RESULT=)
exten => s,16,NoOp(End of macro)
exten => t,1,Playback(connection-timed-out)
exten => t,2,Goto(s,2)



See also



Go back to Asterisk

Created by: peletiah, Last modification: Fri 05 of Nov, 2010 (21:46 UTC) by JustRumours
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+