[Asterisk-Users] inquiry into Asterisk scripting scenario (VXML, AGI, IVR, etc)

Robby Dermody robbyd at u20.org
Mon Nov 21 17:27:17 MST 2005


Hey guys,

I've written an VoIP monitoring and recording application that pulls 
VoIP phone call data off of the network (in real time) and makes it 
available for monitoring. Besides being able to listen into these 
conversations in progress through a web interface, we can actually 
monitor these conversations over the phone as well. This is done through 
a VoiceXML script sitting on a Cisco router (which is acting as a 
VoiceXML voice browser). In this case, the user dials the system (i.e. 
the router), and the voiceXML script starts executing. The user logs in 
to my application over the phone through this script, and can listen to 
a specific agent talking or just sample the agent conversations going 
through the underlying IPT environment. The playback of the 
conversations makes use the ability of the Cisco VoiceXML browser to do 
audio-streaming through the <audio> command.

Our goal is to move this functionality off of a cisco router, and onto 
the same box as my app, using Asterisk (or whatever other open source 
software may be better suited for this). Basically, Asterisk would be 
set up as a SIP/H.323 endpoint. If any user wanted to dial into our 
voice monitoring system, they could just be transferred from the outside 
IPT phone environment (be it Cisco, Avaya, etc) to our box, and Asterisk 
would service the call by interacting with my app. This way, there is no 
extra Cisco router to support, interacting with my app over the phone 
interface is as easy as setting up a route point in the outside IPT 
phone environment, and everything fits nicely on one box.

I am an Asterisk newbie, and at this point am just asking the question, 
"is this possible, and how might I go about it (what should I be 
researching)?" I have done some research, and there doesn't seem to be 
any real open source VoiceXML 2.x browser implementation that would work 
with asterisk. From what I can tell, that leaves IVR scripting (such as 
http://users.pandora.be/Asterisk-PBX/IVR.htm) and AGI 
(http://home.cogeco.ca/~camstuff/agi.html). Note that this voice 
application, while not horribly complex, is somewhat complex and 
requires things such as the following:
    *Ability to interface with the application via HTTP (sending URL 
requests and reading back received data): Every interaction between the 
IVR script and my application is done via HTTP. For example, the command 
to login a user (once the IVR script has gotten a userID and PIN) may 
be: http://localhost:1234/login?userID=444&pin=4321, which returns a 
success/failure code.
    *G.711 (ulaw) audio streaming via a URL: Monitoring of agents is 
done by submitting a URL request to my application, which will start 
streaming back G711 ulaw data (which is the conversation in progress) as 
it arrives. I see that Asterisk has a MP3Player command that allows 
streaming mp3 playback. If I can write my own commands, it probably 
wouldn't be too hard to do the same for g711 ulaw OR linear PCM, if this 
functionality isn't already available.
    *Dynamic prompt construction: The IVR interface also allows a user 
to list the agents active in the environment. With the current voice XML 
implementation, this is done by querying my application for the list, 
which my app returns as a voicexml subdialog which control transfers to. 
This kind of thing is where AGI might win out as the solution to take 
(as I can whip up and massage the list dynamically easily with a 
language like Python)

I would appreciate opinions of the best way to go about converting this 
functionality to run on Asterisk. I'm especially interested in AGI, but 
the documentation I can find on it is rather out of date it appears. If 
there are any gurus in this field who are interested in helping out with 
something like this, let me know and I could very possibly compensate 
financially, if desired. BTW, if I went with AGI, I would be working 
with Python (the whole app is written in Python/Pyrex, believe it or not! :)

Thanks!!!

Robby




More information about the asterisk-users mailing list