Hello, I'm trying to implement a function available on the PSTN net here, if you dial a number which is busy and you press 5, you will be called back when the busy party hangs up. Figuring out if a SIP user is busy isn't to hard, ${DIALSTATUS} produces a BUSY message, however, how can I implement the call back? IE, I dial to extension 712, but that extension is busy, I dial 5 and hangup. If extension 712 is no longer busy I'm called back and the moment I pickup the extension 712 is dialed again. I'm thinking something like putting a value in the Asterisk DB if the extension is busy, after that extension hangs up it should trigger the dial to the originating extension and on pickup it should dial the other extension :-) Kind regards, E. Versaevel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041221/021fdbeb/attachment.htm
E. Versaevel wrote:> Hello, I?m trying to implement a function available on the PSTN net > here, if you dial a number which is busy and you press 5, you will be > called back when the busy party hangs up.Cron job, eighter parse every 10s both peer statuses, and create a call file that is in the callback context which parses the from peer callback database? Or in a ideal situation an application that notices peer changes and creates a trigger. (Manager API Events) Wait for Hangup, check Hangup->Channel in To5-DB if in call Callback context (extension script should handle pickup/call To5-DB/FromPeer) Greetings, Stefan de Konink
On Tue, 21 Dec 2004, Stefan de Konink wrote:> E. Versaevel wrote: > > Hello, I?m trying to implement a function available on the PSTN net > > here, if you dial a number which is busy and you press 5, you will be > > called back when the busy party hangs up. > > Cron job, eighter parse every 10s both peer statuses, and create a call > file that is in the callback context which parses the from peer callback > database? > > Or in a ideal situation an application that notices peer changes and > creates a trigger. (Manager API Events) > > Wait for Hangup, check Hangup->Channel in To5-DB > if in call Callback context > (extension script should handle pickup/call To5-DB/FromPeer)You can do it with the "icd" queue system for asterisk. Look at the wiki for more information. Icd supports callback queue members. I.e. put them in a queue and if they press 5 you re-add them as a callback queue member. Peter