Skip to content

Instantly share code, notes, and snippets.

@cloudvoxcode
Created October 7, 2010 22:00
Show Gist options
  • Save cloudvoxcode/615981 to your computer and use it in GitHub Desktop.
Save cloudvoxcode/615981 to your computer and use it in GitHub Desktop.
New Customer X
i am new to cloudvox...i think i will use it for our business
however, i am lost in terms of where to start since i am new to voice related programming
i have been in IT for over 15 years...lots of web stuff with java, but not voice
Cloudvox Support
thanks for stopping by! yeah, most of the docs are on http://help.cloudvox.com/
New Customer X
that's what i want to implement, but not sure where to start
yes...but here are my confusions:
hat should be on cloudvox and what should be on our own server,
*What should be on cloudvox and what should be on our own server,
do i use JSON
or should i use Java?
Cloudvox Support
your code (java, php, ruby, json, etc) lives on your server, and then we hit it over the internet (either via HTTP or a TCP protocol called AGI)
New Customer X
but what should be on the cloudvox side?
confused with that
these might be dumb/simple questions, but i am a bit lost
Cloudvox Support
you can use Java and control the call with a Java SDK called Asterisk-Java (http://help.cloudvox.com/faqs/getting-started/setup-for-java), or you can use Java to generate JSON (http://help.cloudvox.com/faqs/getting-started/http-api). you can even put up a static JSON file, like created in a text editor
New Customer X
and that sits on our server?
Cloudvox Support
you don't need to provide anything for the Cloudvox side, it's all self-contained. We just need the URL (or for AGI, the hostname/IP) to your app
yep. you either run an Asterisk-Java server (which listens on a TCP socket), or you host a JSON file (or generate JSON, like with a PHP script or Java servlet)
New Customer X
but don't i need to setup something on the cloudvox side (i haven't signed up for an account yet, do i see all that once the account is setup?)
Cloudvox Support
the JSON can be hosted with Apache as a static file or PHP script, a servlet container with a servlet, or whatever you want, as long as it spits out JSON
the only thing you need to setup on cloudvox is to tell us what to do when the call gets answered or an inbound call comes in, and for that, we just need a URL or hostname
yeah, you'll see most of it upon signing up
New Customer X
ah ha
Cloudvox Support
once your app is working and you're happy with it, you can buy phone numbers, see call history, upload/download recorded sounds, etc all via the cloudvox UI
but none of that is necessary to get going
New Customer X
ic
Cloudvox Support
when you sign up, you'll see a giant button that says Create an App, and you name it and give us the URL
New Customer X
so, for example, when a call comes in, i setup cloudvox to hit our URL on our server...then our server creates JSON to say "Please enter your pin, blah"
Cloudvox Support
and the URL is either http:// (for a JSON app like http://help.cloudvox.com/faqs/getting-started/http-api) or agi:// (for an AGI app like the Asterisk-Java link I pasted)
New Customer X then, cloudvox will translate that and the voice will tell the caller?
Cloudvox Support
yep, exactly
New Customer X
ah ha
Cloudvox Support
you can see some examples at http://gist.github.com/cloudvoxcode
New Customer X
ok, thx, i will sign up and take a look then
Cloudvox Support
http://gist.github.com/204833
that's a very very simple JSON app
and those JSON steps could be a static file on your web server, or generated dynamically by a script - we can't tell the difference
New Customer X
these sample code/progams sit on "Our" server then?
Cloudvox Support
yep, if you want to use them. you could actually paste the URL to that raw JSON file (http://gist.github.com/raw/204833/b1dac857…) as a cloudvox app, and it would work, but it wouldn't do you much good since you can't edit it
but http://gist.github.com/raw/204833/b1dac857… is acceptable as a live app inasmuchas cloudvox is concerned
and you could save that file to your web server and give us the URL to it as your first app, then start changing it as you see fit
New Customer X
i can test out in cloudvox without paying for it until i decide to use cloudvox with a number?
ah ha
Cloudvox Support
when you create your app, we'll give it a phone number you can call, and you can register a SIP phone so that all your test calls are free
it includes 100 free minutes over that phone number (or any others that you purchase), and all calls from your Cloudvox SIP phones to your apps are free
New Customer X
let's say this:
caller calls
system prompt users enter a pin
New Customer X
how does cloudvox know to send the pin back to our system
i want to validate that pin to make sure it is on our system
Cloudvox Support
with AGI (Asterisk-Java), Cloudvox has a TCP socket open with your app server all the time, and your command says something like "accept up to X digits, with a Y second timeout, and let the user press '#' to terminate it" (the English version of the command - more at http://help.cloudvox.com/faqs/building-blocks/keypad-digits). we send that back in realtime over the TCP socket, and you can act on/verify it and decide what to do next
New Customer X
got it
ok thx a lot
Cloudvox Support
with JSON apps, you give us a URL and we hit it with whatever the URL entered (here's more on input handling - http://help.cloudvox.com/faqs/getting-started/http-api#handling_caller_input)
it's a lot like a web form, in that we pass whatever digits the caller entered as a query parameter ("result"). JSON API is better for simple apps, AGI API is better for more complex ones (IVRs with many branches, doing multiple things at once, queuing calls for agents, etc)
sounds good, glad to have you on board
New Customer X
cool!
very simple:caller calls, ask for a number; caller provides a number, our server validates the number
and then system says valid or invalid
Cloudvox Support
you'll probably want to use JSON with a Speak or a Playback step, then a GetDigits step, and finally a Speak or a Playback step to say whether it was valid or not
(Speak is a text-to-speech generated voice, Playback is an MP3/WAV that you record and upload)
New Customer X
ic
i will sign up and start playing with it then
Cloudvox Support
if you have any questions, just hit the Help tab you'll be auto-logged in to our help/docs and ticketing system, just ask away
New Customer X
thx a lot!
have a good night
Cloudvox Support
you too!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment