[Home]

Summary:ASTERISK-02775: [PATCH] app_vmoutcall
Reporter:Jeffrey C. Ollie (jcollie)Labels:
Date Opened:2004-11-10 01:20:43.000-0600Date Closed:2011-06-07 14:05:03
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 2824-sounds.tar
( 1) vmoutcall-0.4.diff.txt
Description:This is a new app that implements the bounty described here:

http://www.voip-info.org/tiki-index.php?page=Asterisk+bounty+outcall+notification+application

In essense, the application will monitor selected voice mail
boxes and make outgoing calls when there are new messages in the INBOX.
Comments:By: Jeffrey C. Ollie (jcollie) 2004-11-10 13:36:38.000-0600

BTW, there should be a disclaimer on file with Digium.

By: Mark Spencer (markster) 2004-11-10 15:54:40.000-0600

There appears to be a lot of duplication here from other parts of the code.  Can we just make some of those private functions public (and give them ast_* names) to avoid redundancy?

By: Jeffrey C. Ollie (jcollie) 2004-11-10 16:14:48.000-0600

Mark, I plan on submtting a patch that exposes the timing code, except that I wanted to do that as a separate patch/bug.  I just copied the code that I needed so that I could get this app running/tested.  I hope to get the other patch submitted in a day or so.

By: Jeffrey C. Ollie (jcollie) 2004-11-11 16:17:50.000-0600

I've put up patch 0002839, which if accepted, will mean that I can eliminate the reduntant code from this patch.

By: Jeffrey C. Ollie (jcollie) 2004-11-12 00:27:10.000-0600

Updated patch to remove timing code that was copied from pbx.c since patch 0002839 was merged into CVS.

By: sohosys (sohosys) 2004-11-12 09:53:47.000-0600

Does this mean that this patch needs to be used with CVS head after 11/12/2004?

By: Jeffrey C. Ollie (jcollie) 2004-11-12 09:57:26.000-0600

Yes, you need CVS >= 2004-11-12

By: twisted (twisted) 2004-11-17 23:10:38.000-0600

Excellent idea, however there are a few bits of this that don't really make sense.  

1) why do we not free our first config that we open?

2) Instead of doing all of this through the dialplan (ie, reading the box name, number of messages, etc), why don't we just register another application to handle it?  

3) could this be added into app_voicemail?  if not, I really don't see why this is considered an app_, rather, it should be a res, but ultimately, it SHOULD be something that is handled within app_voicemail, IMHO.

That's all I have for now...

By: Jeffrey C. Ollie (jcollie) 2004-11-18 00:05:04.000-0600

> 1) why do we not free our first config that we open?

It's a bug...  I'll fix ASAP and upload a new patch.

> 2) Instead of doing all of this through the dialplan (ie, reading the box
> name, number of messages, etc), why don't we just register another
> application to handle it?

Playing the outgoing message to the user is done through the dialplan for flexibility.  A special application to handle playing the ougoing message would ultimately be less flexible unless I developed my own script language but what would the point of that be?

> 3) could this be added into app_voicemail? if not, I really don't see why
> this is considered an app_, rather, it should be a res, but ultimately,
> it SHOULD be something that is handled within app_voicemail, IMHO.

It could be added to app_voicemail relatively easily.  However, if app_vmoutcall remains a separate module you wouldn't have to load it if you didn't need/want that functionality, thus saving memory.  Also, unless you wanted to keep separate config files, you'd add some complexity to voicemail.conf.

app_ vs. res_ doesn't really matter to me.  If the consensus is res_ I'll update the code.

By: Jeffrey C. Ollie (jcollie) 2004-11-18 15:59:37.000-0600

Uploaded a new version that deletes the old config when it loads a new config.

By: Andrew Kohlsmith (akohlsmith) 2004-11-24 08:00:22.000-0600

Will this app work even when the caller leaving the message does not hit # and 1 to accept the message?  This is one of the biggest shortcomings of *'s voicemail at this time (not being able to do anything with the saved message unless the user hits # and 1)

By: Jeffrey C. Ollie (jcollie) 2004-11-24 09:08:03.000-0600

> Will this app work even when the caller leaving the message does not hit #
> and 1 to accept the message? This is one of the biggest shortcomings of *'s
> voicemail at this time (not being able to do anything with the saved message
> unless the user hits # and 1)

Yes, the app will periodically check configured mailboxes and does not rely on caller doing anything.  Check and notification intervals are highly configurable.

By: chuljin (chuljin) 2004-12-06 15:40:57.000-0600

URL may better be:

http://www.voip-info.org/tiki-index.php?page=Asterisk+bounty+outcall+notification+application

By: brc007 (brc007) 2004-12-07 02:08:29.000-0600

*poke poke*... Ready for CVS? Has anybody been testing this? If so please leave a comment if it's working for you.

--Housekeeping

By: ltropiano (ltropiano) 2004-12-07 07:04:55.000-0600

I've been using this in our test setup, seems to work as advertised.  Our production system is running 1.0.3 so we haven't had a lot of runtime in the production world.

By: sohosys (sohosys) 2004-12-07 09:11:57.000-0600

Working fine, been using it for the last month

By: mochouinard (mochouinard) 2004-12-07 09:59:49.000-0600

It working for me too.
Only thing that Im not sure it available, is that, I can put multiple dialled party. For example, the voicemail system call all  the IT people cell phone 1 by one. and loop until someone answered. I dont have time to look at the code, but you think this can be added if it not already there ?

By: Jeffrey C. Ollie (jcollie) 2004-12-07 10:44:05.000-0600

> Only thing that Im not sure it available, is that, I can put multiple
> dialled party. For example, the voicemail system call all the IT people
> cell phone 1 by one. and loop until someone answered. I dont have time
> to look at the code, but you think this can be added if it not already
> there ?

I haven't thought it completely through, but I think that there are two ways you could accomplish what you want:

1. by having vmoutcall send the call to a queue
2. by having vmoutcall send the call to Local/s@it-staff-rr where

[it-staff-rr]

exten => s,1,Dial(Zap/g1/5551212,20)
exten => s,2,Dial(Zap/g1/5551213,20)
exten => s,3,Dial(Zap/g1/5551214,20)
exten => s,4,Congestion

etc.

By: mochouinard (mochouinard) 2004-12-07 11:42:42.000-0600

Answered and taken the voicemail, not just answered, since call can drop into voicemail on the cell phone (except using my DialConfirm app).  or it coulve have already being taken into the voicemail before it dialled everyone

By: Jeffrey C. Ollie (jcollie) 2004-12-07 14:55:58.000-0600

> Answered and taken the voicemail, not just answered, since call can drop
> into voicemail on the cell phone (except using my DialConfirm app). or
> it coulve have already being taken into the voicemail before it dialled
> everyone

That's why it'd probably be better to use a queue with agents because they can be set up to acknowledege a call.  You'd also need to modify the script that plays the message so that it also will loop or wait for an acknowledgement.

Or yes, use your DialConfirm app.

By: mochouinard (mochouinard) 2004-12-08 18:22:07.000-0600

I got 2 project going, but I'll look to support the posibility to have the app handle itself the call, instead of sending it to the dialling queue.  So the app could stop calling fast if the voicemail being taken or not, and beable to add more features if posible.

By: Jeffrey C. Ollie (jcollie) 2004-12-10 13:57:06.000-0600

> I'll look to support the posibility to have the app handle itself the
> call, instead of sending it to the dialling queue. So the app could stop
> calling fast if the voicemail being taken or not, and beable to add more
> features if posible.

I'd rather see the DialConfirm functionality added to pbx_spool.  I don't think that we really want to have two separate systems manage separate outgoing call queues.

By: mochouinard (mochouinard) 2004-12-11 19:19:44.000-0600

Oh one thing to add, beable to detect that the dialled party is dropping into the voicemail box, I had the problem that the mailbox called me, so it keep adding new voicemail, and dialling ;)

By: Olle Johansson (oej) 2004-12-27 15:58:50.000-0600

Any updates?

---housekeeping

By: twisted (twisted) 2005-01-01 22:16:24.000-0600

>Playing the outgoing message to the user is done through the dialplan for >flexibility. A special application to handle playing the ougoing message would >ultimately be less flexible unless I developed my own script language but what >would the point of that be?

That's a good point - dualy noted.

>It could be added to app_voicemail relatively easily. However, if app_vmoutcall >remains a separate module you wouldn't have to load it if you didn't need/want >that functionality, thus saving memory. Also, unless you wanted to keep
>separate config files, you'd add some complexity to voicemail.conf.

I see.  That works for me too, but can we, by default, make this app noload in the modules.conf.sample as well?   Also, Please add the proper header to the source file. see app_skel.c for appropriate header.  

Otherwise, looks okay to me.

By: twisted (twisted) 2005-01-01 22:17:02.000-0600

Placing in ack status for further review/testing before changing to cvs ready.

By: sohosys (sohosys) 2005-01-02 09:08:33.000-0600

CVS Please! this app works as intended, has been in production in multiple systems since 11/20/2004 and provides a valuable feature without interferring with other functionality.

By: Andrew Kohlsmith (akohlsmith) 2005-01-02 19:16:48.000-0600

Maybe I'm just stupid, but could we have some more documentation in the app's "show application vmoutcall" than the smart-assed one-liner that's in there now?  How do you call apps periodically, and how do you set up how often the period is?

This is the exact kind of problem that makes working with Asterisk so frustrating at times -- the implementor knows what s/he did but nobody else does.

By: sohosys (sohosys) 2005-01-02 19:25:11.000-0600

akohlsmith, the the sample vmoutcall.conf has a fair amount of documentation in it, have you looked at it?

By: Andrew Kohlsmith (akohlsmith) 2005-01-02 19:32:19.000-0600

Yup I looked at the sample config -- it does *not* tell you how to call it from the dialplan, it only gives an example of an outcall context.  e.g. there is no "exten => something,1,vmoutcall()" anywhere to show how to actually use it.

I assume because it's *app_*vmoutcall that it needs to be called in the dialplan somewhere, otherwise it'd be a res_vmoutcall, right?

"Periodically call Voice Mail users to remind them of new messages."

That's a goddamned cop-out.  That's like

int i;                   // variable i

This is a fairly complex app -- mention the config file name and a little more detail about how the app actually functions so I can get the jist of it.  I mean "show application vmoutcall" -> "periodically call voicemail users to remind them of new messages" -- no shit, Sherlock, I deduced as much from the name of the application.  :-)  Even the patch itself includes the (context) text:

; 'show application <command>' will show details of how you
; use that particular application in this file, the dial plan.

the "show application" output given in the patch does *not* fit this at all.  Mark made the app help mandatory, don't skimp on it please.

By: sohosys (sohosys) 2005-01-02 21:00:25.000-0600

akolsmith, here is the config section from the sample vmoutcall.conf, you do not "call" the app, you configure extensions in the conf file that are to be checked and notified at the intervals specified during the times specified, it runs on a timer when * is loaded.

The basic functionality is to monitor the voicemail file structure for messages in the new mail folder for extrensions that are specified in vmoutcall.conf. when a new message is found during the timer based scan a call file is dropped in the call queue, the callfile content is based on the config file.

While the help is lacking, you should lighten up on the profanity, this is not the place for it. If you would like some more information on using this feature ask, don't complain.

The following settings control the frequency that mailboxes are
; checked and notifications are sent out.
;
;  check_interval - time in seconds between checks for new voicemail - default 60
;  notify_interval - minimum time in seconds between outgoing calls - default 3600
;  random_interval - short random interval added to notify interval so that
;                   a large batch of calls don't go out at once - default 60
;
;
; To permit outgoing calls only during specific times, "allow_calls"
; and "deny_calls" parameters should be specified.  Outgoing calls
; will be permitted if any "allow_calls" parameter matches and no
; "deny_calls" parameter matches.  The "allow_calls" and "deny_calls"
; parameters are checked in order until one matches.  If the
; individual mailbox section does not contain any "allow_calls" or
; "deny_calls" parameters the section for the voicemail context and
; the general section will be checked in a similar manner.  If no
; parameters are found outgoing calls are permitted.
;
;  allow_calls = *|*|*|*
;  deny_calls = *|*|*|*

By: Andrew Kohlsmith (akohlsmith) 2005-01-02 21:18:43.000-0600

Didn't think I was being all that profane, but I apologize to any who were offended.

if the program is not called from the dialplan, should it be called app_vmoutcall?  This is what had me confused -- it looked like it was an "automatic" thing yet it had an app_ name.

Are there any other app_ programs which are *not* called from the dialplan?  If not, I would humbly suggest this be named res_vmoutcall -- it's not an app, per se.

By: robf (robf) 2005-01-07 16:15:08.000-0600

I've attached the requested audio prompts.

By: drmac (drmac) 2005-01-28 11:35:22.000-0600

I like this as a feature I can give to customers. However, the ability to set the account code for the SIP user whose box the app is reporting on needs to be present.

For example, John Doe just got a new VM. He has it setup to call his cell (which is long distance) to remind him that he has a new VM. vmoutcall should query some database to get John's notification number, call that number and present the options. If its an LD number to call, it needs to be billable using John's SIP phone's account code.

Can this be done?

By: Jeffrey C. Ollie (jcollie) 2005-01-28 15:26:49.000-0600

> It needs to be billable using John's SIP phone's account code. Can this be done?

The outgoing call is completely scripted in the dial plan so it should be possible.

By: twisted (twisted) 2005-02-13 01:52:08.000-0600

I'm going to bring this up again - You gave an answer before that made sense, but, now that I look back at it, I'm confused again.  

Why can't we use the routines that are already in app_voicemail to handle this?  We have code to handle dialout already in the voicemail app, as well as the routines to check for new voicemail.  I honestly think this code needs to be integrated into app_voicemail, with the ability to disable the functionality with a voicemail.conf config flag (ie, vmoutcall=on)...

By: Olle Johansson (oej) 2005-03-17 05:49:50.000-0600

See bug ASTERISK-2492 for discussions about a general api function for placing calls from Asterisk - I am still in favour of that architecture.

By: nick (nick) 2005-04-08 20:58:21

Any progress on this bug? An updade is needed to keep it open.

Housekeeping

By: Michael Jerris (mikej) 2005-05-23 21:56:59

Okay, bringing this one back up.  This should not be called an app_ as that indicates it runs from the dialplan.  Lets get some real discussion if this belongs in a seperate module or in app_voicemail.  I tend to think that a more module voicemail app is better, as it is already a monster.  Can we get this updated for some code review and get a comment on the design from markster.

By: Jeffrey C. Ollie (jcollie) 2005-05-23 23:09:05

MikeJ, I'm with you on moving this to res_, as far as actually doing the work, I had been waiting for kpfleming's event system to appear so that I could port the vmoutcall to that.

By: Michael Jerris (mikej) 2005-05-23 23:11:53

The impression I get is that it could still be some time for the event system, and certainly after 1.2.  Do we want to get this in now, or suspend it until after the event system is in?

By: Michael Jerris (mikej) 2005-06-23 14:59:47

I will take the total lack of response as this one needs to be suspended.  :)Please bring this one back up when you\it are ready to proceed.  Thanks.