Realtime Datacalls

Ok, I’m just bursting with questions here. I would like to create a realtime like ability to asterisk. I want asterisk to be able to call a program in db2. Using the calling extension, caller, and sip session as variables, last priority code (or other number), I want to be able to run phone commands. Just like realtime.

This will give me an ultimate control from a huge business logic server… Aka, this is what I’d love todo.

I have several questions: Can realtime be hijacked to complete this task? Would I need to create a Asterisk extension? ?

What of this can’t be accomplished by running your call control in an AGI script and/or pulling call information from the manager interface?