[Home]

Summary:ASTERISK-10273: [patch] Callback Application
Reporter:Yann JOUANIN (yannj)Labels:
Date Opened:2007-09-10 15:27:43Date Closed:2011-06-07 14:02:49
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/NewFeature
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_callback.c
Description:This is a Callback application, permit to play a message like :
"Your correspondant is busy to get callback press X "

If the X is pressed, on hangup Asterisk will call you back and then your correspondant
Comments:By: Yann JOUANIN (yannj) 2007-09-10 15:33:44

I found a problem, fixing that before uploading the new application

By: Yann JOUANIN (yannj) 2007-09-11 14:21:58

Added today the source code.
Problem was segmentation fault (strcpy => ast_copy_string)

By: Yann JOUANIN (yannj) 2007-09-11 15:10:29

In order to use it, you have to create a conf file : applications.conf

With the section : [callback]
and setup the callback touch (default is 5) : with touch=X

By: Russell Bryant (russell) 2007-09-11 15:51:02

There used to be a module in Asterisk that did something like this a long time ago.  However, it was removed in favor of using call files, as that is a much more flexible way of scheduling calls to be made.

Given that, I'm not sure this is something that we should merge.  However, I am open to opinions to try to persuade me otherwise.

By: Yann JOUANIN (yannj) 2007-09-11 16:46:54

Well, I am working for a big french company, this function is one of the most required by user on our PABX, when I asked if there was a opportunity to switch to open source VoIP with Asterisk , they said me that a requirement for Asterisk should be to be able to provide the most use features.

I agree with the fact that .call file are usefull and really flexible, I was doing this feature that way before, but talking with user and some guy on dev chan, they thought it would be more simple to provide it with a unique application. Perhaps it could also make the performance better on high density trafic.

Regards,
Yann

By: Michiel van Baak (mvanbaak) 2007-09-12 02:00:24

I really like to have this as an application in asterisk.
That way you dont have to write callfiles from the dialplan or use macro's to read the astdb.
Like yannj noted this same functionality is default on landlines in The Netherlands as well and having this as default functionality makes it easier to convince prospects about how nice asterisk is.

By: Eliel Sardanons (eliel) 2007-09-13 19:03:40

I don't know if this should or should not be merged, but creating a file for configuring just a digit (??). Maybe there is another way, like a parameter on the application, or a dialplan variable.

By: Yann JOUANIN (yannj) 2007-09-14 03:34:01

By default it use 5, but could also use a dialplan variable, if anyone have an opinion about the best way to do it (I don't think using a parameter in app call is a good one because mean when you want to change it you have to track anywhere in your dialplan).

By: Mark Michelson (mmichelson) 2007-09-14 09:32:37

I like the idea of setting a dialplan variable and using that as the callback number.

Perhaps a new option for Dial() could be used to support the callback number? That would save on having to merge an entire application into Asterisk and a configuration file for a single option as well.

My $0.02

By: Yann JOUANIN (yannj) 2007-09-14 13:15:13

Could be a good idea , calling Dial with an option like c(5) for callback available with touch 5.

Well that mean having to patch app_dial.c right?
Couldn't it be implemented in res_features.c?

By: Yann JOUANIN (yannj) 2007-09-15 15:53:09

I think it will not be possible to patch app_dial in order to add this function, indeed, the maximum number of option for app_dial.c has been reached.

Regarding to the variable used for callback touch, I think it could be directly given in like GetCallback(touch)

By: Jason Parker (jparker) 2007-11-02 16:55:48

The argument stuff in app_dial has been expanded to 64 bits.  This should be possible.

By: Yann JOUANIN (yannj) 2007-11-02 17:04:50

I will try to write it, is there an option number I can use?

By: Jason Parker (jparker) 2007-12-07 09:46:26.000-0600

Use the next available option.  If it needs to be changed before it gets committed - so be it.

By: Tilghman Lesher (tilghman) 2007-12-24 21:06:57.000-0600

I need a couple changes before I can commit this:

1) You should use devicestates to register a callback for an action to take when a particular device becomes available, then generate the call directly from this app.  It's troubling that this purports to provide callback functionality, yet is not self-starting.  Note that it's perfectly acceptable for this to require call spools and simply to generate the spool file, instead of directly generating the call internally.

2) The arguments should be more:
 a) the device to monitor (e.g. SIP/201)
 b) the device to callback (e.g. Zap/g1/12025551212)
 c) the extension to call when the callback answers (e.g. incoming,201,1)

3) The code does not correspond to the CODING-GUIDELINES document.  You'll need to update to those specifications, too.

4) I need the EXACT text of the prompt you would like to have recorded in both English and French (and Spanish, if you have a native speaker there), since these prompts will need to become part of the standard set.

By: Yann JOUANIN (yannj) 2007-12-25 05:30:41.000-0600

Ok I'll modify it.

By: Yann JOUANIN (yannj) 2008-01-08 02:11:55.000-0600

Corydon76 wrote : " You should use devicestates to register a callback for an action to take when a particular device becomes available"

Which way do you advise me to do that?

By: Tilghman Lesher (tilghman) 2008-01-08 15:01:24.000-0600

Please take a look at include/asterisk/event.h, and in particular, ast_event_subscribe().

By: bhrugu mehta (bhrugu) 2008-01-09 07:38:51.000-0600

you have added statically prompt file. if possible remove this.

By: Tilghman Lesher (tilghman) 2008-01-23 22:54:04.000-0600

yannj:  have you made any progress on this?

By: Yann JOUANIN (yannj) 2008-01-24 03:27:32.000-0600

Yes I started to recode it as an application (as you adviced me on the IRC)

By: Tilghman Lesher (tilghman) 2008-02-13 00:03:34.000-0600

I am suspending this issue while you are working on the new source file.  When it is ready, please reopen this issue and attach your patch.