connect middleware architecture for AGI (Asterisk Gateway Interface)