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})"