Setting voicemail_greeting_number (before 'answer'?)

Status
Not open for further replies.

viiiwonder

Member
Sep 24, 2022
49
2
8
40
I recently became aware of voicemail_greeting_number (a channel variable for the purposes of specifying the greeting number to be played when transferred to a voicemail box). It would solve a situation we have where an office would like to use a single common mailbox, but have a different greeting played depending on the state of a call flow.

We already use call flows commonly to either:
Day = Transfer to ring group > RG is either answered or times out and goes to voicemail of 198
Night = Transfer straight to voicemail of 199

So, currently, day and night voicemails are handled separately.

There is no IVR in use, so the other solution on the forum for putting IVR actions in for setting the variable don't really apply.

What I've been trying to do is create two new dial plan entries:
vm199g1
1701896499352.png

and vm199g2
1701896549459.png

The flow looks as such:
1701896912344.png

The day mode works as expected - phones in the ring group right, and timeout destination of vm199g1 plays the expected greeting.

My issue is that whenever I call in when the flow is set to 'night mode', I get 404 unavailable:
WARNING [inbound routes] 404 not found [ip that is in ACL allow]
Ultimately, I believe this to be happening because the call isn't technically getting answered before it's transferred to vm199g2, and that dialplan entry requires a match on the inbound phone number. Because it makes it all the way through to my custom dialplan prior to being 'answered', I think the 'destination number' is still evaluating as the DID that was dialed.

Anyone have any suggestions or perhaps a better way to accomplish this?
 

viiiwonder

Member
Sep 24, 2022
49
2
8
40
FYI, this boiled down to an error with my destination_number expression. I changed them from regex to just explicitly be the dial plan name/number, and all started to work as expected...
 
Status
Not open for further replies.