[Home]

Summary:ASTERISK-14016: [patch] Add new command VMSayName()
Reporter:Graham Mainwaring (ghjm)Labels:
Date Opened:2009-04-27 00:29:15Date Closed:2010-03-02 12:22:10.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail/NewFeature
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 14973.patch
( 1) playnameof.patch
Description:This patch adds a new command, PlayNameOf, which plays the recorded name of a voicemail user. It also reports back to the diaplan whether it played the name or not.

This is intended for use in custom dialplan schemes like follow-me or conferencing or whatever, where it might be necessary to identify an extension to a caller. "Please hold while <name-of-user> is located" - that sort of thing.

If there's an easier way to do this, I didn't find it.
Comments:By: Sean Bright (seanbright) 2009-05-04 13:56:28

Thanks for the patch!

Unfortunately, 1.4 is feature frozen so we will need a patch against Asterisk Trunk (svn co http://svn.digium.com/svn/asterisk/trunk) in order to commit this.

By: Leif Madsen (lmadsen) 2009-06-10 12:58:43

This seems like something you could do in the dialplan already. How about something like...

exten => foo,n,Playback(please-hold-while)
exten => foo,n,Playback(/var/spool/asterisk/${VM_CONTEXT}/${VM_EXTENSION}/greet)
exten => foo,n,Playback(is-located)

Where you've set VM_CONTEXT and VM_EXTENSION to something useful :)

By: Mark Michelson (mmichelson) 2009-06-10 13:44:30

Both lmadsen and ghjm's methods fall short of what's necessary because they will not work if using ODBC or IMAP voicemail.

In trunk, there is a function in app_voicemail.c called 'sayname' which will retrieve the name file from whatever storage method is being used and play it. If you were to write a dialplan application which was simply a wrapper for the sayname function in app_voicemail, then that could be useful.

By: Leif Madsen (lmadsen) 2009-06-11 07:36:54

Additionally, I would change the name of the application to be:

VMSayName()

Since we have a few other VM...() dialplan applications.

By: Leif Madsen (lmadsen) 2009-07-13 10:24:03

I'm tempted to close this issue for now, with thanks for the submission, but request that you open a new issue with the requested additions from mmichelson if you are able to get around to do that. I'm not sure the patch as-is will be able to go into Asterisk at this time. Requesting feedback from mmichelson.

By: Mark Michelson (mmichelson) 2009-07-13 10:55:05

Uploaded 14973.patch for testing. Give it a shot.

EDIT: Oh, and I used the suggestion of "VMSayName" as the app name.



By: Graham Mainwaring (ghjm) 2010-01-19 17:44:20.000-0600

Thanks for doing this - good to know this feature will still be available going forward. Wish I had more time to spend on this kind of thing!

By: Leif Madsen (lmadsen) 2010-01-19 18:30:03.000-0600

OK, I've tested this against file based voicemail. I don't have the infrastructure right now to test this against IMAP or ODBC storage (will have to set those up sometime in the future).

The one thing I noticed is that if you use VMSayName() without a name recorded, then the channel just hangs up. I'd thing it should just fall through to the next priority instead of dropping the channel.

Even more ideal would be that it should provide some sort of channel variable to let you know if it was able to play the file or not, so you can perform some action (such as playing a generic message) depending on whether the name was successfully played or not.

By: Graham Mainwaring (ghjm) 2010-01-19 23:03:53.000-0600

If there isn't a name recorded, I think the most generically useful thing for this command to do is to speak the digits of the mailbox number. If it can be worked out so the dialplan can decide, so much the better. But fundamentally, the "name" of an unnamed mailbox is its number.

By: Leif Madsen (lmadsen) 2010-01-21 10:57:15.000-0600

Well, normally if there is no name recorded, it says the letters of the mailbox name configured in voicemail.conf (that's what Directory() does) so I'd say that is likely the best alternative to a recorded name.

By: Digium Subversion (svnbot) 2010-03-02 12:22:07.000-0600

Repository: asterisk
Revision: 249889

U   trunk/CHANGES
U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r249889 | jpeeler | 2010-03-02 12:22:06 -0600 (Tue, 02 Mar 2010) | 11 lines

Add new application VMSayName for use with voicemail.

VMSayName that will play the recorded name of the voicemail user if it exists,
otherwise will play the mailbox number. A unit test has been written to verify
correct functionality called test_voicemail_vmsayname.

(closes issue ASTERISK-14016)
Reported by: ghjm

Review: https://reviewboard.asterisk.org/r/530/

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=249889