[Asterisk-Users] Help with simple callback application from newbie

Raf D'Halleweyn (list) list at noduck.net
Thu Apr 7 18:20:16 MST 2005


I use the attached AGI script (place it in your agi-bin directory). It
places a call file in asterisk's outgoing spool directory
(/var/spool/asterisk/outgoing) in my case.

The script is called with as argument the number to call back. Note that
if the call back number is 5 digits or less, it actually calls back the
original channel. That way I can also test the call back from a local
extension. If it is more than 5 digits it always calls back using my
broadvoice SIP account (you should change this).

The call back is initiated from a 'callback' extension in
extensions.conf after you hang up (so it uses DeadAGI). You should make
sure to perform the proper authentication before entering this exension:

[callback]
exten => s,1,Playback(call)
exten => s,2,Playback(ha/back)
exten => s,3,Playback(initiating)
exten => s,4,Wait(10)
exten => s,5,Hangup
exten => h,1,DeadAGI(callback,${CALLERID})

When calling back, the call starts in the 'calledback' extension. It
first announces the call back and then goes to some other extension (in
this case just a DTMF test):

[calledback]
exten => s,1,Wait(1)
exten => s,2,Playback(call)
exten => s,3,Playback(ha/back)
exten => s,4,Goto(testdtmf,s,1)

Improvements that I would like to make, but I don't know how:
-use the dialplan from extensions.conf to make the call back (instead of
always using broadvoice)
-'attended call back', for example when you try to initiate a call back
to a hotel guest.

Good luck,

Raf.

On Thu, 2005-04-07 at 09:55 -0700, Robert Goodyear wrote:
> On Apr 6, 2005, at 8:31 PM, CM Rahman Jr. wrote:
> 
> > I am looking for same type of solution. Anybody here can help?
> >
> > -----Original Message-----
> > From: asterisk-users-bounces at lists.digium.com
> > [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Herbert 
> > Chan
> > Sent: Wednesday, April 06, 2005 12:06 AM
> > To: asterisk-users at lists.digium.com
> > Subject: [Asterisk-Users] Help with simple callback application from 
> > newbie
> >
> > Hi there,
> >
> > I know that this has been covered many times with already but I still
> > can't seem to get it to work.  Basically, all I want to do is:
> >
> > 1) call the asterisk server from an external line
> > 2) Say punch in a particular extension number
> > 3) Asterisk then hangs up and calls me back based on my Caller ID or a
> > pre-determined number
> > 4) I'm then provided with a dialtone to make outgoing calls
> 
> Could you have an extension that prompts for a password, then proceeds 
> to (h)angup and begin a new DIAL which then drops you into DISA?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: callback
Type: application/x-perl
Size: 781 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20050407/692364d7/callback.bin


More information about the asterisk-users mailing list