Fwd Ext When Employee Leaves Company

FreePBX 14.0.1.36 (official Distro) on Asterisk 13

In our old implementation of Asterisk stand-alone (v 1.8), when an employee would leave the company, we would just change their extension to dial someone else’s extension in the dialplan so that it looked something like this:

Employee assigned ext 338 leaves & we fwd phone to their manager who has ext 332:

exten => 338,1(lbl_3xx-extensions_11),Gosub(oneline,s,1(SIP/332,332))

;Dial an extension for 20 seconds, then drop to voicemail
[oneline]

exten => s,1,GotoIf(${ARG2}?:lbl_macro-oneline_0)
exten => s,n,Dial(${ARG1},20,rtT)
exten => s,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?lbl_macro-oneline_1:)
exten => s,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?lbl_macro-oneline_1:)
exten => s,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?lbl_macro-oneline_2:)
exten => s,n(lbl_macro-oneline_1),VoiceMail(${ARG2}@default,u)
exten => s,n,Hangup()
exten => s,n(lbl_macro-oneline_2),VoiceMail(${ARG2}@default,b)
exten => s,n,Hangup()
exten => s,n(lbl_macro-oneline_0),Dial(${ARG1},20,rtT)

[macro-oneline]

exten => s,1,Gosub(oneline,s,1(${ARG1},${ARG2}))

I’ve researched this a bit and haven’t found a way yet to do the same thing. We haven’t opened up the UCP to our users yet (just went live with this new server yesterday), but if that’s the best way we can do that. Any recommendations would be much appreciated!

Here’s the thing, it really depends on the company protocol… sometimes even an employee leaves, the new employee will still have the old extension.
But in some cases where each employee gets a brand new extension. We’ll delete and re-create the old extension as a virtual extension and in advances settings set the destination to which ever extension will be getting this old employees calls.

Dial *72 then 332 from extension 338 perhaps?

Thanks @PitzKey – Just to clarify exactly where this is, for posterity, here are the steps I did:

  1. Delete old extension (which also deletes the VM box)
  2. Apply Config
  3. Create new Virtual Extension (I left VM disabled)
  4. Under Find Me/Follow Me:
  5. set it to Enabled
  6. set Follow-Me List to the ext you want to “fwd” to
  7. Under “Destinations” → No Answer → set it to Voicemail of the user you’re fwding to

Mileage on this solution may vary, but it worked for me. Thanks again!

@dicko - Thanks for the info there. I just tested that and it appears to work, too. Is this done in Asterisk? Where can I “see” this in the GUI so I can undo it?

feature codes

dial *73 from extension 332

Thanks! That did the trick. Here’s a reference for those like me who didn’t know this existed:

https://wiki.freepbx.org/display/FPG/User+Control+Panel-Feature+Codes

…better yet, in the FreePBX GUI: Admin -> Feature Codes

Most of them have VM to email which is being converted as a shared mailbox once an employee leaves, so anyone can access it anytime they want to lookup something or to find old Voicemails. Either way, you can make a copy of the Voicemail folder before deleting.

No need for that.

Just do this →

… To the extension you want it to ring to.

2 Likes

Ah! I was suspicious that there was a simpler way, but what I did appeared to be working. I will change to your recommendation. Thanks!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.