[Asterisk-Users] callback on busy

Andrew Thompson asteriskuser at aktzero.com
Fri Feb 4 15:54:16 MST 2005


Bartosz Jozwiak wrote:
> Hello everybody,
> 
> I would like to implement "callback" function.
> When I call a person and his extension is busy I can press, for example, 5
> and get a callback when his phone is not busy anymore.
> 
> When I create a call file and copy it to spool call folder
> asterisk makes a call. One problem is that when extension is still busy
> my phone rings and I get busy tone of the person who I am trying to reach.
> 
> Is there another way to do it ? Or do I need to check first if channel 
> is free or
> still busy ? Can anybody give me some hints ?

Are you passing the Dial line in your .call file?

Try building a context that has your logic in it, and directing the call 
file to it, after setting some appropriate parameters.

You should be able to discern from Dial() why you can't get ahold of the 
other party. Once you do, test for that case as a part of your logic. If 
the case still exists, write a new .call file and exit. If the case no 
longer exists, connect to the original caller and be done. (Assuming you 
are not on the phone now, as well!)

Seems like I read that you could date a .call file a little bit of time 
in the future and asterisk would wait to run it until then. This would 
be a way for you to buy some time between tries. If I'm just making this 
up, use cron to straighten it out.

-- 
Andrew Thompson
http://aktzero.com/
http://dev.asteriskdocs.org/



More information about the asterisk-users mailing list