[asterisk-users] callback on busy

Danny Nicholas danny at debsinc.com
Thu Jul 26 10:29:48 CDT 2012


The "inherent" problem with this is that it either requires a "brute force"
solution or a "queue and call" solution.  The "brute Force" solution would
be something like this:

[callee-is-busy]

Exten => s,1,playback(callbackmsg)

Exten => s,n,wait(3)

Exten => s,n,playback(vm-goodbye)

Exten => s,n,hangup()

Exten => 5,1,agi(writecallback.sh,$(CALLERID(num)},${EXTEN})

Exten => 5,n,playback(vm-goodbye)

Exten => 5,n,hangup()

Exten => I,1,playback(invalid-selection)

Exten => I,n,goto(callee-is-busy,s,1)

 

Writecallback.sh

#!/bin/sh

Echo "Channel: DAHDI/g1/$1" > retcall.txt

Echo "CallerID: $2" >> retcall.txt

Echo "Maxtries: 50" >> retcall.txt

Echo "WaitTime: 60" >> retcall.txt

Echo "retryTime: 15" >> retcall.txt

Echo "Context: default" >> retcall.txt

Mv retcall.txt /var/spool/asterisk/outgoing

 

The "queue and call" solution would involve using a shell to monitor the
extension using AMI or asterisk -rx "core show channels verbose" to see when
the line became available, then launching the call using the
writecallback.sh above.

 

Here is a link to a "wait for available" solution -
http://www.voip-info.org/wiki/view/Asterisk+tips+campon

 

From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of pepesz
Sent: Thursday, July 26, 2012 8:03 AM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] callback on busy

 

Dear all,

I know the topic comes back like boomerang, but I did not find a nice
solution.
Does someone has/knows how to achieve "call back on busy" otherwise called
camping?
If one is calling the extension and it is busy, then caller should get
something like "Press 5 to request call back" and after the previous call is
finished the system should:
1) call caller
2) dial callee

or something similar ;)

This topic comes back so many times - I'm wonder if there is already a
function for that implemented in asterisk (my current one is 10.5)
Thanks in advance. 

pepesz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120726/b35dbfc2/attachment-0001.htm>


More information about the asterisk-users mailing list