disabling voicemail password prompt for multiple extentions?

Status
Not open for further replies.

nktech1135

Member
Dec 16, 2017
51
2
8
us
Hi all.
I want to do what was mentioned in this thread, but take it a step further.
I have grandstream gxp2160's and i have the programable keys set to dial *98ext. This prompts for a password. I need it to go straight to voicemail, for whatever extention was dialed even if it's not registered on the phone.
I set voicemail_authorized to true in the bottom section of vmain and it works for the registered extention but not for any others.
I thought there used to be something like skip_vm_password that could be set in a dialplan but can't find any reference to it on google.

Does anyone know how this could work?
 

ad5ou

Active Member
Jun 12, 2018
884
197
43
Similar to the example listed in your linked post but modify the regex to:
^\*98(\d{3})$ for 3 digit extensions.
Then set voicemail_id=$1
The regex will accept *98 plus any three digits then set the voicemail ID to the three captured digits.
 

nktech1135

Member
Dec 16, 2017
51
2
8
us
Similar to the example listed in your linked post but modify the regex to:
^\*98(\d{3})$ for 3 digit extensions.
Then set voicemail_id=$1
The regex will accept *98 plus any three digits then set the voicemail ID to the three captured digits.
I have the following in my dialplan.

<extension name="vmain" continue="false" uuid="3661082c-52dc-465a-afa5-c29bc78d408f">
<condition field="destination_number" expression="^vmain$|^\*4000$|^\*98$" break="never">
<action application="answer" data=""/>
<action application="sleep" data="1000"/>
<action application="set" data="voicemail_action=check"/>
<action application="set" data="voicemail_profile=default"/>
<action application="lua" data="app.lua voicemail"/>
</condition>
<condition field="destination_number" expression="^(vmain$|^\*4000$|^\*98)(\d{2,12})$">
<action application="answer" data=""/>
<action application="sleep" data="1000"/>
<action application="set" data="voicemail_action=check"/>
<action application="set" data="voicemail_id=$2"/>
<action application="set" data="voicemail_profile=default"/>
<action application="set" data="voicemail_authorized=true"/>
<action application="lua" data="app.lua voicemail"/>
</condition>
</extension>


This covers what your suggesting, doesn't it? Specifically, what's the difference between voicemail_id=$1 and voicemail_id=$2?

Thanks.
 

ad5ou

Active Member
Jun 12, 2018
884
197
43
I'm no pro with regex, but your dial plan will probably work.
The difference between $1 and $2 is the capture groups.
In your second condition, you have two sets of "()" in your case the $2 would be the 2-12 digits after *98
 

nktech1135

Member
Dec 16, 2017
51
2
8
us
I'm no pro with regex, but your dial plan will probably work.
The difference between $1 and $2 is the capture groups.
In your second condition, you have two sets of "()" in your case the $2 would be the 2-12 digits after *98
I'm on site with this customer today, and it looks like i have what i need if i set up multiple accounts on the phone.
He does want some password prompts where i thought he didn't.

Thanks.
 
Status
Not open for further replies.