Chet W. Stevens
2012-Jun-11 15:34 UTC
[asterisk-users] Get voicemail box password from dialplan?
I would like to be able to use the dialing extension's voicemail box password to authenticate or as a PIN code in the dialplan. Is there a best method for doing this? I could use AGI scripting but I was hoping there was a built-in dialplan means for doing this. I have used VMAuthenticate but I would like more flexibility than what this offers. Also, related to this question; is there a "best" or recommended method to determine the dialing extensions voice mail box? I have been using variations of ${CUT(CHANNEL,-,1)} which does work but I just have to be aware of how I name my devices. Thank you for your help. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120611/7a3bca3e/attachment.htm>
John Kiniston
2012-Jun-11 16:25 UTC
[asterisk-users] Get voicemail box password from dialplan?
On Mon, Jun 11, 2012 at 8:34 AM, Chet W. Stevens <cwstevens at interact.ccsd.net> wrote:> Also, related to this question; is there a "best" or recommended method to > determine the dialing extensions voice mail box? I have been using > variations of ${CUT(CHANNEL,-,1)} which does work but I just have to be > aware of how I name my devices.I use the following method to get the mailbox for a peer under 1.4: exten => *98,n,Set(peer=${SIPCHANINFO(peername)}) ; Get the peer exten => *98,n,Set(mailbox=${SIPPEER(${peer},mailbox)}); Get the mailbox I dont know about it being the best or recommended method but I've yet to have it break on me. -- A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. ---Heinlein
Kevin P. Fleming
2012-Jun-11 18:28 UTC
[asterisk-users] Get voicemail box password from dialplan?
On 06/11/2012 10:34 AM, Chet W. Stevens wrote:> I would like to be able to use the dialing extension's voicemail box > password to authenticate or as a PIN code in the dialplan. Is there a > best method for doing this? I could use AGI scripting but I was hoping > there was a built-in dialplan means for doing this. I have used > VMAuthenticate but I would like more flexibility than what this offersWhat do you need that VMAuthenticate does not offer? -- Kevin P. Fleming Digium, Inc. | Director of Software Technologies Jabber: kfleming at digium.com | SIP: kpfleming at digium.com | Skype: kpfleming 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at www.digium.com & www.asterisk.org
Chet W. Stevens
2012-Jun-12 17:44 UTC
[asterisk-users] Get voicemail box password from dialplan?
VMAuthenticate works but I didn't find it to have the type of control that I was looking for such as using custom prompts separate from the voice mail prompts, controling how many times the user is prompted, etc. I was able to come up with the exact solution I was looking for combined with John Kiniston's suggestion for determining the dialing extension's mailbox: exten => 1234,1,Answer() same => n,Set(peer=${SIPCHANINFO(peername)}) same => n,Set(mailbox=${SIPPEER(${peer},mailbox)}) same => n,GotoIf(${MAILBOX_EXISTS(${mailbox})}?vmpass:hangup) same => n(vmpass),Set(vmpass=${CUT(AST_CONFIG(voicemail.conf,default,${mailbox}),\,,1)}) same => n,NoOp(${vmpass}) same => n(hangup),Hangup() Thank you everyone for your help! Chet Stevens asterisk-users at lists.digium.com writes:>On 06/11/2012 10:34 AM, Chet W. Stevens wrote: >> I would like to be able to use the dialing extension's voicemail box >> password to authenticate or as a PIN code in the dialplan. Is there a >> best method for doing this? I could use AGI scripting but I was hoping >> there was a built-in dialplan means for doing this. I have used >> VMAuthenticate but I would like more flexibility than what this offers > >What do you need that VMAuthenticate does not offer? > >-- >Kevin P. Fleming >Digium, Inc. | Director of Software Technologies >Jabber: kfleming at digium.com | SIP: kpfleming at digium.com | Skype: kpfleming >445 Jan Davis Drive NW - Huntsville, AL 35806 - USA >Check us out at www.digium.com & www.asterisk.org-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120612/0f49e68b/attachment.htm>