Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Loading in …3
1 of 7

Dial A Joke with Asterisk



Download to read offline

Related Books

Free with a 30 day trial from Scribd

See all

Dial A Joke with Asterisk

  1. 1. Dial-a-Joke with Asterisk <ul><li>Alex Dong @ Sydney Barcamp 2009 </li></ul><ul><li> / </li></ul>
  2. 2. What’s Dial-a-Joke <ul><li>A telephone service that users can call to listen to previously recorded jokes. </li></ul><ul><li>Goal: call a SIP address to listen to a random one from / </li></ul>SIP PBX TTS JOKE Asterisk Ceptral Swift Softphone X-lite
  3. 3. Heavylifting - TTS <ul><li>text=`curl -s` swift -o /tmp/joke.wav -p audio/channels=1,audio/sampling-rate=8000 &quot; $text &quot; wait sox /tmp/joke.wav /tmp/newjoke.wav trim 7.5 cp /tmp/newjoke.wav /tmp/joke.wav </li></ul>
  4. 4. Asterisk on OSX <ul><li>sudo port install asterisk </li></ul><ul><li>/Library/Asterisk/ </li></ul><ul><li>sudo asterisk -cb </li></ul>
  5. 5. Asterisk - SIP Channel <ul><li>sip.conf </li></ul><ul><li>[alex] type=friend username=alex secret=!@#$!#@$ host=dynamic context=joke </li></ul>
  6. 6. Asterisk - Workflow <ul><li>[tour] exten => 1,1,Answer() exten => 1,n,System(~/ exten => 1,n,Playback(/tmp/joke) exten => 1,n,Hangup() </li></ul>
  7. 7. SIP Softphone