Download presentation
Presentation is loading. Please wait.
Published byCharles Armstrong Modified over 8 years ago
1
ENSEIRB, FranceCall/CSeptember 29, 2003 Call/C: A Domain Specific Language for IP Telephony Services Claus Brabrand [ joint work with Charles Consel & Fabien Latry ] COMPOSE Group INRIA, University of Bordeaux I, France
2
ENSEIRB, FranceCall/CSeptember 29, 2003 Outline Introduction Infrastructure (SIP) Programming Telephony Services Call/C Examples Domain Specific Analysis Conclusion and Future Work
3
ENSEIRB, FranceCall/CSeptember 29, 2003 Outline Introduction Infrastructure (SIP) Programming Telephony Services Call/C Examples Domain Specific Analysis Conclusion and Future Work
4
ENSEIRB, FranceCall/CSeptember 29, 2003 Introduction Yesterday: "Call a place" 05 12 34 56 78
5
ENSEIRB, FranceCall/CSeptember 29, 2003 Introduction Today: "Call a phone" 06 12 34 56 78 1-1
6
ENSEIRB, FranceCall/CSeptember 29, 2003 Introduction Tomorrow: "Call a person" chirac@elysee.fr
7
ENSEIRB, FranceCall/CSeptember 29, 2003 Introduction Tomorrow: "Call a person" chirac@elysee.fr
8
ENSEIRB, FranceCall/CSeptember 29, 2003 Outline Introduction Infrastructure (SIP) Programming Telephony Services Call/C Examples Domain Specific Analysis Conclusion and Future Work
9
ENSEIRB, FranceCall/CSeptember 29, 2003 Outline Introduction Infrastructure (SIP) Programming Telephony Services Call/C Examples Domain Specific Analysis Conclusion and Future Work
10
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Session Initiation Protocol ): Infrastructure (SIP)
11
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Session Initiation Protocol ): Infrastructure (SIP) SIP Servers
12
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Session Initiation Protocol ): Infrastructure (SIP) SIP Servers SIP Clients
13
ENSEIRB, FranceCall/CSeptember 29, 2003 Infrastructure (SIP) SIP Servers SIP Clients SIP (Session Initiation Protocol ):
14
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Registration) 1.2.3.4chirac
15
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Registration) 1.2.3.4chirac chirac@1.2.3.4
16
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Registration) 1.2.3.4chiracelysee.fr REGISTER 200 OK chirac@ 1.2.3.4 Location server: [chirac 1.2.3.4] 200 OK chirac@1.2.3.4
17
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Registration) 1.2.3.4chiracelysee.fr REGISTER 200 OK chirac@ 1.2.3.4 Location server: [chirac 1.2.3.4] 200 OK chirac@1.2.3.4
18
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Registration) 1.2.3.4chiracelysee.fr REGISTER 200 OK chirac@ 1.2.3.4 Location server: [chirac 1.2.3.4] 200 OK chirac@1.2.3.4
19
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Registration) 1.2.3.4chiracelysee.fr REGISTER 200 OK chirac@ 1.2.3.4 Location server: [chirac 1.2.3.4] 200 OK chirac@1.2.3.4
20
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Registration) 1.2.3.4chiracelysee.fr REGISTER 200 OK chirac@ 1.2.3.4 Location server: [chirac 1.2.3.4] 200 OK chirac@1.2.3.4
21
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Registration) 1.2.3.4chiracelysee.fr REGISTER 200 OK chirac@ 1.2.3.4 Location server: [chirac 1.2.3.4] 200 OK chirac@1.2.3.4
22
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Registration) 1.2.3.4chiracelysee.fr REGISTER 200 OK chirac@ 1.2.3.4 Location server: [chirac 1.2.3.4] 200 OK chirac@1.2.3.4 chirac@elysee.fr
23
ENSEIRB, FranceCall/CSeptember 29, 2003 Call: chirac@elysee.fr bush@whitehouse.gov SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush
24
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication...
25
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication...
26
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication...
27
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication...
28
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication...
29
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication...
30
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication...
31
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication...
32
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication...
33
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication... 200 OK 302 Moved Temporarily 486 Busy Here 603 Decline...
34
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication... 200 OK 302 Moved Temporarily 486 Busy Here 603 Decline...
35
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication...
36
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication...
37
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication...
38
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication...
39
ENSEIRB, FranceCall/CSeptember 29, 2003 SIP (Initiation) 1.2.3.4chiracelysee.frwhitehouse.gov5.6.7.8bush INVITE bush? Location server: [bush 5.6.7.8] 5.6.7.8 DNS lookup: whitehouse.gov? 200 OK accept ring ACK...multi-media communication...
40
ENSEIRB, FranceCall/CSeptember 29, 2003 Outline Introduction Infrastructure (SIP) Programming Telephony Services Call/C Examples Domain Specific Analysis Conclusion and Future Work
41
ENSEIRB, FranceCall/CSeptember 29, 2003 Outline Introduction Infrastructure (SIP) Programming Telephony Services Call/C Examples Domain Specific Analysis Conclusion and Future Work
42
ENSEIRB, FranceCall/CSeptember 29, 2003 Programming Telephony Services call forward response fixed behavior lookup
43
ENSEIRB, FranceCall/CSeptember 29, 2003 Programming Telephony Services call response programmable
44
ENSEIRB, FranceCall/CSeptember 29, 2003 Programming Telephony Services call response programmable Dependent on (time, request, preferences, state, …): if(…) else
45
ENSEIRB, FranceCall/CSeptember 29, 2003 Programming Telephony Services call response programmable Dependent on (time, request, preferences, state, …): Signalling actions: lookup, forward, respond forward if(…) else
46
ENSEIRB, FranceCall/CSeptember 29, 2003 Programming Telephony Services call response programmable Dependent on (time, request, preferences, state, …): Signalling actions: lookup, forward, respond Non-signalling actions: computations, remote procedure calls, side-effects,... forward y = f(x) if(…) else
47
ENSEIRB, FranceCall/CSeptember 29, 2003 Existing Solutions General Purpose Languages: SIP Common Gateway Interface (SIP/CGI) Java SIP Servlets ...
48
ENSEIRB, FranceCall/CSeptember 29, 2003 Existing Solutions General Purpose Languages: SIP Common Gateway Interface (SIP/CGI) Java SIP Servlets ... Expressive, but unsafe
49
ENSEIRB, FranceCall/CSeptember 29, 2003 Existing Solutions General Purpose Languages: SIP Common Gateway Interface (SIP/CGI) Java SIP Servlets ... Expressive, but unsafe
50
ENSEIRB, FranceCall/CSeptember 29, 2003 Safety Requirements for a call processing language: Verifiability: Call completion: Safety of execution: ... "Programming Internet Telephony Services" -- J. Rosenberg, J. Lennox, and H. Schulzrinne
51
ENSEIRB, FranceCall/CSeptember 29, 2003 Safety Requirements for a call processing language: Verifiability: Static syntactic/semantic analysis Call completion: Safety of execution: ... "Programming Internet Telephony Services" -- J. Rosenberg, J. Lennox, and H. Schulzrinne
52
ENSEIRB, FranceCall/CSeptember 29, 2003 Safety Requirements for a call processing language: Verifiability: Static syntactic/semantic analysis Call completion: All calls handled (termination) Safety of execution: ... "Programming Internet Telephony Services" -- J. Rosenberg, J. Lennox, and H. Schulzrinne
53
ENSEIRB, FranceCall/CSeptember 29, 2003 Safety Requirements for a call processing language: Verifiability: Static syntactic/semantic analysis Call completion: All calls handled (termination) Safety of execution: Controlled access to underlying server and platform Bounded resource consumption ... "Programming Internet Telephony Services" -- J. Rosenberg, J. Lennox, and H. Schulzrinne
54
ENSEIRB, FranceCall/CSeptember 29, 2003 Existing Solutions (cont’d) General Purpose Languages: SIP Common Gateway Interface (SIP/CGI) Java SIP Servlets ... Expressive, but unsafe
55
ENSEIRB, FranceCall/CSeptember 29, 2003 Existing Solutions (cont’d) General Purpose Languages: SIP Common Gateway Interface (SIP/CGI) Java SIP Servlets ... Domain Specific Languages: The Call Processing Language (CPL) Expressive, but unsafe
56
ENSEIRB, FranceCall/CSeptember 29, 2003 Existing Solutions (cont’d) General Purpose Languages: SIP Common Gateway Interface (SIP/CGI) Java SIP Servlets ... Domain Specific Languages: The Call Processing Language (CPL) Expressive, but unsafe Safe, but inexpressive
57
ENSEIRB, FranceCall/CSeptember 29, 2003 Existing Solutions (cont’d) General Purpose Languages: SIP Common Gateway Interface (SIP/CGI) Java SIP Servlets ... Domain Specific Languages: The Call Processing Language (CPL) Expressive, but unsafe Safe, but inexpressive
58
ENSEIRB, FranceCall/CSeptember 29, 2003 Outline Introduction Infrastructure (SIP) Programming Telephony Services Call/C Examples Domain Specific Analysis Conclusion and Future Work
59
ENSEIRB, FranceCall/CSeptember 29, 2003 Outline Introduction Infrastructure (SIP) Programming Telephony Services Call/C Examples Domain Specific Analysis Conclusion and Future Work
60
ENSEIRB, FranceCall/CSeptember 29, 2003 Interaction Approach Rest of Internet Telephony Service
61
ENSEIRB, FranceCall/CSeptember 29, 2003 Interaction Approach Rest of Internet call Telephony Service
62
ENSEIRB, FranceCall/CSeptember 29, 2003 Interaction Approach Rest of Internet call lookup Telephony Service
63
ENSEIRB, FranceCall/CSeptember 29, 2003 Interaction Approach Rest of Internet call result lookup Telephony Service
64
ENSEIRB, FranceCall/CSeptember 29, 2003 Interaction Approach Rest of Internet call forward result lookup Telephony Service
65
ENSEIRB, FranceCall/CSeptember 29, 2003 Interaction Approach Rest of Internet call response forward result lookup Telephony Service
66
ENSEIRB, FranceCall/CSeptember 29, 2003 Interaction Approach Rest of Internet call response forward result lookup Telephony Service
67
ENSEIRB, FranceCall/CSeptember 29, 2003 Implicit Control-Flow Rest of Internet call response forward result lookup Telephony Service
68
ENSEIRB, FranceCall/CSeptember 29, 2003 Manually save/restore state Rest of Internet call response forward result lookup Telephony Service SAVE SAVE RESTORE RESTORE
69
ENSEIRB, FranceCall/CSeptember 29, 2003 Session-Centered with High-Level Signalling Abstractions 1 Service Program Rest of Internet forward lookup call return
70
ENSEIRB, FranceCall/CSeptember 29, 2003 Explicit Control-Flow Rest of Internet forward lookup call return 1 Service Program
71
ENSEIRB, FranceCall/CSeptember 29, 2003 Automatically Compiled to Underlying model (with save/restore) Rest of Internet forward lookup call return SAVE;EXIT RESTORE RESTORE 1 Service Program
72
ENSEIRB, FranceCall/CSeptember 29, 2003 C-like core language with... Safety restrictions: Domain-specific extensions:
73
ENSEIRB, FranceCall/CSeptember 29, 2003 C-like core language with... Safety restrictions: Looping control structures: do / while / for Recursion, pointers, array indexing,... Domain-specific extensions:
74
ENSEIRB, FranceCall/CSeptember 29, 2003 C-like core language with... Safety restrictions: Looping control structures: do / while / for Recursion, pointers, array indexing,... Domain-specific extensions: Session abstractions: incoming / outgoing Signalling abstractions: forward / lookup / return SIP address type: sip Predefined structures: call / response Predefined responses: ok / busy / decline /...
75
ENSEIRB, FranceCall/CSeptember 29, 2003 Outline Introduction Infrastructure (SIP) Programming Telephony Services Call/C Examples Domain Specific Analysis Conclusion and Future Work
76
ENSEIRB, FranceCall/CSeptember 29, 2003 Outline Introduction Infrastructure (SIP) Programming Telephony Services Call/C Examples Domain Specific Analysis Conclusion and Future Work
77
ENSEIRB, FranceCall/CSeptember 29, 2003 Decline calls outside working hours…: Call/C Example I bool isWorkHour() { time t = now(); if (t.weekday > FRIDAY) return false; return (t.hour >= 9) && (t.hour <= 17); } response incoming(call in) { if (!isWorkHour()) { return decline("OFFICE HOURS 9-17"); }
78
ENSEIRB, FranceCall/CSeptember 29, 2003 Forward depending on caller…: Call/C Example II sip WORK_PHONE = 'sip:office328@enseirb.fr'; sip CELL_PHONE = 'sip:claus_brabrand@bouygues.fr'; response incoming(call in) { if (in.from ~ [.*@enseirb.fr]) { in.subject = "[WORK: " + in.subject + "]"; return forward(in, WORK_PHONE); } else { return forward(in, CELL_PHONE); }
79
ENSEIRB, FranceCall/CSeptember 29, 2003 Forward unhandled calls to secretary…: Call/C Example III sip BOSS = 'sip:CEO@company.com'; sip SECRETARY = 'sip:secr@company.com'; response incoming(call in) { response x = forward(in, BOSS); switch (x) { case busy: case decline: in.subject = "[Fwd: " + in.subject + "]"; return forward(in, SECRETARY); default: return x; }
80
ENSEIRB, FranceCall/CSeptember 29, 2003 Outline Introduction Infrastructure (SIP) Programming Telephony Services Call/C Examples Domain Specific Analysis Conclusion and Future Work
81
ENSEIRB, FranceCall/CSeptember 29, 2003 Outline Introduction Infrastructure (SIP) Programming Telephony Services Call/C Examples Domain Specific Analysis Conclusion and Future Work
82
ENSEIRB, FranceCall/CSeptember 29, 2003 Domain Specific Analyses Domain-specific optimization response x; … x = forward(in, 'sip:user@domain.com'); return x;
83
ENSEIRB, FranceCall/CSeptember 29, 2003 Domain Specific Analyses Domain-specific optimization Tail-call identification: Disable script invocation after forward Default (SIP server) behavior: propagate response response x; … x = forward(in, 'sip:user@domain.com'); return x;
84
ENSEIRB, FranceCall/CSeptember 29, 2003 Outline Introduction Infrastructure (SIP) Programming Telephony Services Call/C Examples Domain Specific Analysis Conclusion and Future Work
85
ENSEIRB, FranceCall/CSeptember 29, 2003 Outline Introduction Infrastructure (SIP) Programming Telephony Services Call/C Examples Domain Specific Analysis Conclusion and Future Work
86
ENSEIRB, FranceCall/CSeptember 29, 2003 Future Work Composable services: Specification and semantics Interference analysis
87
ENSEIRB, FranceCall/CSeptember 29, 2003 Future Work Composable services: Specification and semantics Interference analysis Cost analysis: Resource cost models for billing, admission control, server size prediction, …
88
ENSEIRB, FranceCall/CSeptember 29, 2003 Future Work Composable services: Specification and semantics Interference analysis Cost analysis: Resource cost models for billing, admission control, server size prediction, … Capability-based compilation: Different users have different capabilities
89
ENSEIRB, FranceCall/CSeptember 29, 2003 Conclusion Safety: Verifiability Call completion Safety of execution
90
ENSEIRB, FranceCall/CSeptember 29, 2003 Conclusion Safety: Verifiability Call completion Safety of execution Expressivity: Enough for many interesting services (beyond CPL)
91
ENSEIRB, FranceCall/CSeptember 29, 2003 Conclusion Safety: Verifiability Call completion Safety of execution Expressivity: Enough for many interesting services (beyond CPL) …and "usual" DSL benefits: Conciseness, readability, maintainability, usability,...
92
ENSEIRB, FranceCall/CSeptember 29, 2003 Merci!
93
ENSEIRB, FranceCall/CSeptember 29, 2003 [ bonus slides ]
94
ENSEIRB, FranceCall/CSeptember 29, 2003 Session Abstractions: incoming / outgoing // declarations response incoming(call in) { // handle incoming call } response outgoing(call out) { // handle outgoing call } Program bound to user (SIP address) dispatched when: in.to == user dispatched when: out.from == user
95
ENSEIRB, FranceCall/CSeptember 29, 2003 response incoming(call in) { response x; in.subject = "Hello!"; x = forward(in, 'sip:x@y.z'); return x; } Predefined Structures: call / response struct call { sip from; sip to; string subject; sip[] via; } union response { { } ok; // 200 OK { string contact; } redirect; // 302 MOVED TEMP’LY { } busy; // 486 BUSY HERE { string reason; } decline; // 603 DECLINE { int code; } error; // xxx ERROR... }
96
ENSEIRB, FranceCall/CSeptember 29, 2003 Domain Specific Analyses Domain-specific verification: response incoming(call in) { … if (…) { … x = forward(in, s); … } … x = forward(in, 'sip:user@domain.com'); … return x; }
97
ENSEIRB, FranceCall/CSeptember 29, 2003 Domain Specific Analyses Domain-specific verification: response incoming(call in) { … if (…) { … x = forward(in, s); … } … x = forward(in, 'sip:user@domain.com'); … return x; } Explicit control-flow!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.