A while back I have asked the developers if it is possible to have the Voicemail Operator extension enabled for each tenant. I was told that you guys will check if it is possible.
Right now, the dialplan looks like this:
[sub-vm](+)
exten => o,1,NoOp(Calling to operator)
same => n,Goto(ext-queues,100,1)
same => n,Hangup()
I came up with the following dial plan and I think it will work:
[sub-vm](+)
exten => o,1,NoOp(Calling to operator)
same => n,GotoIf($[${DB_EXISTS(${TENANT_PATH}/voicemail/operator)}]?${DB((${TENANT_PATH}/voicemail/operator))}:error)
same => n,Hangup()
same => n(error),Playback(error-message)
same => n,Goto(sub-vm,s,1) ;Or whatever the context to go back to the voicemail menu
What this does, it tries to find an operator extension in the asterisk DB. If it finds it, then it goes to that destination, if it cannot find it, then it plays an error message and goes back to voicemail.
Here’s how the DB would look like.
[root@pbx1 ~]# asterisk -x"database show" | grep "voicemail/operator"
/21134sdfsgf00001/voicemail/operator : T21_ext-queues,100,1
/21134sdfsgf00002/voicemail/operator : T44_cos-all,101,1