Dial-a-Joke with Asterisk <ul><li>Alex Dong @ Sydney Barcamp 2009 </li></ul><ul><li>http://www.AlexDong.com / </li></ul>
What’s Dial-a-Joke <ul><li>A telephone service that users can call to listen to previously recorded jokes. </li></ul><ul><...
Heavylifting - TTS <ul><li>text=`curl -s  http://joke.alexdong.com/`   swift -o /tmp/joke.wav -p audio/channels=1,audio/sa...
Asterisk  on OSX <ul><li>sudo port install asterisk </li></ul><ul><li>/Library/Asterisk/ </li></ul><ul><li>sudo asterisk -...
Asterisk - SIP Channel <ul><li>sip.conf </li></ul><ul><li>[alex] type=friend username=alex secret=!@#$!#@$ host=dynamic co...
Asterisk - Workflow <ul><li>[tour] exten => 1,1,Answer() exten => 1,n,System(~/joke.sh) exten => 1,n,Playback(/tmp/joke) e...
SIP Softphone
Upcoming SlideShare
Loading in …5
×

Dial A Joke with Asterisk

3,339 views
3,218 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,339
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Dial A Joke with Asterisk

  1. 1. Dial-a-Joke with Asterisk <ul><li>Alex Dong @ Sydney Barcamp 2009 </li></ul><ul><li>http://www.AlexDong.com / </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 http://joke.alexdong.com / </li></ul>SIP PBX TTS JOKE Asterisk Ceptral Swift Softphone X-lite
  3. 3. Heavylifting - TTS <ul><li>text=`curl -s http://joke.alexdong.com/` 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(~/joke.sh) exten => 1,n,Playback(/tmp/joke) exten => 1,n,Hangup() </li></ul>
  7. 7. SIP Softphone

×