Fun with Amazon.com, ISBNs and Asterisk
Phone (603) 258-6798. Press ‘5’ for ‘Amazon.com Lookup.’ Enter the ISBN number of a book. Hear the current price for that book on Amazon.com. Repeat.
Here’s what’s happening:
- You’re calling a Voicepulse Connect DID number in Peterborough, New Hampshire.
- The call is routed to my Asterisk server here in Charlottetown, PEI.
- The Asterisk server has an extension defined to call a Perl script that accepts a 10-digit number and then uses the Amazon.com API to look up the book price, which is read back to you.
You’re free to use the Perl source code as an example of how to do this sort of thing. No guarantees that it’s error-proof, or that it takes into account all possible outcomes.
Monday, July 12, 2004 - 5:44pm

Comments