Voicemail queue, or dynamic voicemail group

Currently I have a time condition with feature code that directs a call to one of two users voicemails, user A or user B. The voicemail is then emailed out to the users email address configured.

ie: time condition activated then call go to user A voicemail, time condition deactivated goes to B voicemail.

I use a feature code assigned to BLF button to activate/deactivate it. this give me an either-or option.

Is there a way to have like a voicemail queue so to speak, that can assign a user into it dynamically by feature code for blf button.

purpose: an after hours vm for the on-call manager whos on duty.
user A blf button to receive the vm or not
user B blf button to receive the vm or not

i saw voicemail blast which is halfway what i’m looking for, the second half would be a way to add user A and user B to the vm blast by using separate BLF buttons for each user.

Thank you

Neat question and something I’ve devoted some time to for my #FridayFun with FreePBX. Here’s a pretty good start to this problem

1 Like

Wow! Thanks!!
My turn for some #FridayFun !!!

1 Like

I am using 3 digit extension so I thought I could change the first part but am getting a busy signal and error in the logs when dialing the feature code. Does it require the use of 4 digit extension? Since its only a select group of people I could just create some extra unused 4 digit extension since everything goes to their email anyway.

The relevant log, i think: -

Executing [**55202@from-internal:2] Gosub("PJSIP/202-0000000c", "toggle-dynvm-ext,5202,1") in new stack

I changed this part:

[from-internal-custom]

; Create feature code previx with hints. Each extension can enable/disable vm group membership by dialing the
; feature code prefix to their extension number. If assigned to a BLF, the LED will indicate group membership. 
; An AstDB key is generated or deleted to indicate dyn vm blast group membership
exten => _**55XXX,hint,Custom:DYNVM_${EXTEN:3}     ; set up hint for 4 digit extensions and strip leading 4 digits
exten => _**55XXX,1,Noop(Entering user defined context from-internal-custom in extensions_custom.conf)
exten => _**55XXX,n,Gosub(toggle-dynvm-ext,${EXTEN:3},1)
exten => _**55XXX,n,hangup

full error:

 == Using SIP RTP Audio TOS bits 184
  == Using SIP RTP Audio TOS bits 184 in TCLASS field.
  == Using SIP RTP Audio CoS mark 5
    -- Executing [**55202@from-internal:1] NoOp("PJSIP/202-0000000c", "Entering user defined context from-internal-custom in extensions_custom.conf") in new stack
    -- Executing [**55202@from-internal:2] Gosub("PJSIP/202-0000000c", "toggle-dynvm-ext,5202,1") in new stack
    -- Executing [5202@toggle-dynvm-ext:1] NoOp("PJSIP/202-0000000c", "") in new stack
    -- Executing [5202@toggle-dynvm-ext:2] GotoIf("PJSIP/202-0000000c", "0?unset:set") in new stack
    -- Goto (toggle-dynvm-ext,5202,4)
    -- Executing [5202@toggle-dynvm-ext:4] Set("PJSIP/202-0000000c", "DEVICE_STATE(Custom:DYNVM_5202)=BUSY") in new stack
    -- Executing [5202@toggle-dynvm-ext:5] Set("PJSIP/202-0000000c", "DB(dynvm/5202)=1") in new stack
    -- Executing [5202@toggle-dynvm-ext:6] Return("PJSIP/202-0000000c", "") in new stack
    -- Executing [**55202@from-internal:3] Hangup("PJSIP/202-0000000c", "") in new stack
  == Spawn extension (from-internal, **55202, 3) exited non-zero on 'PJSIP/202-0000000c'
    -- Executing [h@from-internal:1] Macro("PJSIP/202-0000000c", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("PJSIP/202-0000000c", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("PJSIP/202-0000000c", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("PJSIP/202-0000000c", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/202-0000000c' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/202-0000000c'

Thank you again for helping me

Oops , posted in the wrong place

No, leave it as ${EXTEN:4} is the ‘**55’ bit to be stripped i.e. the first four ‘digits’, Your extensions are as you have changed it the ‘xxx’ rather than the ‘xxxx’ bit, a little extra to help you understand, ${EXTEN:-3} would match your ‘xxx’ extension. i.e. strip all but the last three digits.

2 Likes

Oh that makes perfect sense. Raw asterisk config isn’t so intimidating afer all :smiley:
That did it, it works! I learned a lot and was a lot of fun! Thank you very much.

It works, everything! Thank you very much! :smiley:

When toggling the feature code, instead of beeping or hanging up it goes busy until the call is timed out or hung up. Bare with me, i’m a total newb to asterisk raw config, on line 16, is hangup supposed to have parenthesis ()? I tried anyway but still goes busy.

A side note, If no extension is enabled in the group then the call drops after the vm recording plays. Makes sense. It might be a good idea for me to have a default always included extension in there somehow, incase somebody is having a case of the Mondays and forgets.

It still has rough edges, but I’ve updated the gist to include announcements now.

I added a comment to the gist showing where to hard code extensions to always include. String must start with an & char, separate multiple default vm boxes with additional & chars.

1 Like

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