Ticket #3512 (new Feature Requests)

Opened 3 years ago

Last modified 2 years ago

Voicemail toggle like Follow-Me

Reported by: francesco_r Assigned to:
Priority: minor Milestone: Undetermined
Component: Voicemail Version: 2.5-branch
Keywords: Cc: vgster
Confirmation: Unreviewed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

This is not a true patch, but a starting point. I'll try to post later a complete patch included the php missing parts for the FreePBX page and User Portal.

Many users don't want the voicemail but want to access to the User Portal to see the call logs and set the Follow-me. Now this is not possible. So i have implemented a voicemail toggle, so a user can enable/disable the voicemail like the Follow-me. In this manner during the setup of a PBX the administrator can enable the voicemail to all extensions but is no activated by default. If a user want a voicemail can enable it by dialing *19 (for example).
This is my temporary implementation. In extensions_custom.conf add:

[from-internal-custom]
include => ext-voicemail-toggle

[ext-voicemail-toggle]
exten => *19,1,Goto(app-voicemail-toggle,s,1)

[app-voicemail-toggle]
exten => s,1,Answer
exten => s,n,Wait(1)
exten => s,n,Macro(user-callerid,)
exten => s,n,GotoIf($["${DB(AMPUSER/${AMPUSER}/voicemaildeactivated)}" = "YES"]?activate)
exten => s,n,GotoIf($["${DB(AMPUSER/${AMPUSER}/voicemaildeactivated)}" = "NO"]?deactivate:end)
exten => s,n(deactivate),Set(DB(AMPUSER/${AMPUSER}/voicemaildeactivated)=YES)
exten => s,n,Playback(service&de-activated)
exten => s,n(end),Macro(hangupcall,)
exten => s,n(activate),Set(DB(AMPUSER/${AMPUSER}/voicemaildeactivated)=NO)
exten => s,n,Playback(service&activated)
exten => s,n,Macro(hangupcall,)

Modify [macro-exten-vm] in extensions.conf and add after exten => s,n,Set(RingGroupMethod?=none) this:

exten => s,n,GotoIf($["${DB(AMPUSER/${AMPUSER}/voicemaildeactivated)}"="YES"]?vmdeactivated:vmactivated)
exten => s,n(vmactivated),Set(VMBOX=${ARG1})
exten => s,n,Goto(continue)
exten => s,n(vmdeactivated),Set(VMBOX=novm)
exten => s,n(continue),NoOp

Remember to remove the line "exten => s,n,Set(VMBOX=${ARG1})"

Change History

08/24/09 00:36:43 changed by p_lindheimer

  • owner deleted.
  • component changed from - choose - to Voicemail.
  • milestone changed from 2.6 to 2.7.

02/27/10 14:56:46 changed by p_lindheimer

  • cc set to vgster.

duplicate of #2098 leaving this open since more content

02/28/10 09:56:46 changed by p_lindheimer

  • milestone changed from Cut Line to 2.8.

03/17/10 00:50:19 changed by p_lindheimer

  • type changed from Patches to Feature Requests.

05/11/10 12:32:43 changed by TSM

I have a twist on the above, one problem i see with above is that RT is still honoured which can be annoying for some Ive done similar but its a 1 liner to clear RT out if DB novm is set, this though is more of a temp disable all VM and CFU/CFB which can be usefull for some.

Reason i went down this route was so that i did not have to stick the call in a loop to keep it ringing as each time the dial stopped/started it counted as another call on the users phone.

The statement could be extended to check for a callforward and if so it leaves RT set, but another check would have to be added after the CFU/CFB checks have been done to make sure that it does not go onto VM.

extensions.conf - [macro-exten-vm]

Just above

exten => s,n,Macro(record-enable,${EXTTOCALL},IN)
exten => s,n,Macro(dial,${RT},${DIAL_OPTIONS},${EXTTOCALL})

insert

exten => s,n,Set(VMBOX_OFF=${DB(NOVM/${EXTTOCALL})})
exten => s,n,Set(RT=${IF($["${VMBOX_OFF}" == "true"] & $["${VMBOX}"!="novm"]?"":${RT})})

extensions_custom.conf

[from-internal-custom]
...
...
include => app-novm-toggle

[app-novm-toggle]
include => app-novm-toggle-custom
exten => *96,1,Answer
exten => *96,n,Wait(1)
exten => *96,n,Macro(user-callerid,)
exten => *96,n,GotoIf($["${DB(NOVM/${AMPUSER})}" == ""]?activate:deactivate)
exten => *96,n(activate),Set(DB(NOVM/${AMPUSER})=true)
exten => *96,n(hook_on),Playback(vm-login&de-activated)
exten => *96,n,Macro(hangupcall,)
exten => *96,n(deactivate),dbDel(NOVM/${AMPUSER})
exten => *96,n(hook_off),Playback(vm-login&activated)
exten => *96,n,Macro(hangupcall,)

This will cause the call to just ring without timing out which is more like a normal phone system.

05/20/10 19:17:05 changed by p_lindheimer

  • milestone changed from 2.8 to Cut Line.

deferring this since to do properly it also needs an ARI component of which there is no patch here to help with that.