Title: Scripting Language, My Shiny Metal Arse
1Scripting Language, My Shiny Metal Arse
2shtoom
3voice over IP, in python
4WARNING talk may contain rant
5and occasional cheap shots
6what's VoIP?
7telephony over the internet
8why is VoIP interesting?
9cheap calls
10use IP network for voice as well as data
11take the telephone network away from the telcos
12... it's not like they're doing much with it
13enable the next round of cool voice applications
14VoIP clients
15hardware phones
16software phones
17gateways
18VoIP protocols
19a short and biased summary
20first, there was H.323
21it sucks
22a lot
23don't let telcos design internet protocols
24this goes double for the ITU
25from cheapshot import X.400, X.500
26SIP
27IETF does telephony
28SIP is complex(the S isn't for Simple)
29the problem is complex
30fortunately, we don't need all of it
31UDP based, client-server(or client-server-client-
server)
32SIP is just for control
33setup, negotiation, call control
34RTP
35a little lump of audio in each UDP packet
36every 20ms
37multiple audio formats
38or video
39RTP is just the transport
40SIPRTP phone
41other protocols
42standards will win
43even if they're not all that good
44shtoom
45why on earth did I attempt this?
46a scriptable phone
47make my H.323 pain go away
48from cheapshot import c
49hopefully help stamp out ignorance
50it's just a scripting language
51only suitable for prototyping
52existing software phones not so good
53so write a better one
54other voice applications
55(voice applications ltgt voice recognition)
56why choose python?
57hopefully you all know the answers to that one
58a few additional reasons
59twisted
60nice UI toolkit
61many of them
62so why not use python?
63performance
64it's just a scripting language, after all
65timing and performance
66timing?
67an audio packet, every 20ms
68but PC clocks run at 100Hz
69miss by a fraction -gt 10ms delay
70this is very noticeable
71approaches to timing
72approach 1 setitimer
73approach 2 reset the timer
74approach 2b cheat
75approach 3 LoopingCall
76LoopingCall works, and works well
77performance?
78audio processing
79audio mixing
80a pile of mathematics
81raw python
82psyco
83numeric
84pyrex
85reimplement the performance critical bits
86duh...
87audioop
88use the standard library
89the best optimization is one that someone else
already wrote
90and the winner is...
91and again, for the managers
92but I prefer this one
93scripting language, my arse
94is this fast enough?
95audio encoding
96other people have done this already
97so use their work
98ULAW, GSM 06.10, G.72x, speex
99wrapping C code is easy
100yay (again) for Pyrex
101shtoom today
102second major release
103cross-platform
104kde/qt, gnome/gtk, tk, cocoa (soon), wx (soon),
command-line
105software phone usable
106firewall discovery and traversal
107(an aside UPnP)
108from cheapshot import Microsoft
109other applications
110doug, the application server
111conclusions
112python isn't just a scripting language
113python is fun
114VoIP is very cool right now
115VoIP in python is cool
116therefore, python is cool
117(No Transcript)
118no, really
119read the paper
120use the phone
121shtoom
122questions, abuse, anyone I forgot to insult?