[Asterisk-Users] Camp on?

Andrew Kohlsmith akohlsmith-asterisk at benshaw.com
Thu Apr 27 06:56:31 MST 2006


On Thursday 27 April 2006 07:52, Rich Adamson wrote:
> Not likely either form can truly be implemented in a agi script without
> significantly impacting other pbx functions.

I dunno... off the top of my head:

- improve upon the standard extension macro such that any Dial() uses 'g' 
option, and include an 'h' option in the context

- the macro will, upon Dial returning busy and detection of a local extension 
calling (done with variables) present a "press 5 to receive a callback when 
this user is free, or 1 to go to voicemail" or something similar.  If a 
callback's required, save the extension of the calling party to a DB and hang 
up (I'm describing non-staying-on-the-line camp-on).

- the macro will, upon the extension hanging up (using 'g' option), check the 
DB for a list of extensions waiting for callback and using a callout file, 
call the first one.

- the sip/zap/iax extension's normal context's 'h' extension will do the same.

- some housekeeping is required to keep the db clean but that's about it.

that's your basic camp-on.  while-you-wait campon isn't too different, and 
camp-on that calls you when they are around (i.e. they didn't answer but you 
want to know when they're back) is done similarly but when the monitored 
extension makes a call (done in the standard extension macro) or takes a call 
that is answered (standard extension looking at HANGUPCAUSE), it then 
"recognizes" that the person at the extension is there and the camp-on stuff 
above is activated.

Yes this is all highlevel hand-waving at this point but I don't see where it's 
really impacting the PBX all that much.  This can be done almost exclusively 
in the dialplan, without any AGIs or additional apps.  Maybe a cron job to do 
the housekeeping and a script ot write out the proper callfiles... but that's 
it I think.

-A.




More information about the asterisk-users mailing list