CallC: A Domain Specific Language for IP Telephony Services - PowerPoint PPT Presentation

1 / 97
About This Presentation
Title:

CallC: A Domain Specific Language for IP Telephony Services

Description:

ENSEIRB, France. Call/C. September 29, 2003. Introduction. Yesterday: 'Call ... ENSEIRB, France. Call/C. September 29, 2003. SIP (Session Initiation Protocol ) ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 98
Provided by: bri60
Category:

less

Transcript and Presenter's Notes

Title: CallC: A Domain Specific Language for IP Telephony Services


1
Call/CA Domain Specific Languagefor IP
Telephony Services
  • Claus Brabrand
  • joint work with Charles Consel Fabien Latry
  • COMPOSE Group
  • INRIA, University of Bordeaux I, France

2
Outline
  • Introduction
  • Infrastructure (SIP)
  • Programming Telephony Services
  • Call/C
  • Examples
  • Domain Specific Analysis
  • Conclusion and Future Work

3
Outline
  • Introduction
  • Infrastructure (SIP)
  • Programming Telephony Services
  • Call/C
  • Examples
  • Domain Specific Analysis
  • Conclusion and Future Work

4
Introduction
  • Yesterday

05 12 34 56 78
"Call a place"
5
Introduction
  • Today

1-1
06 12 34 56 78
"Call a phone"
6
Introduction
  • Tomorrow

chirac_at_elysee.fr
"Call a person"
7
Introduction
  • Tomorrow

chirac_at_elysee.fr
"Call a person"
8
Outline
  • Introduction
  • Infrastructure (SIP)
  • Programming Telephony Services
  • Call/C
  • Examples
  • Domain Specific Analysis
  • Conclusion and Future Work

9
Outline
  • Introduction
  • Infrastructure (SIP)
  • Programming Telephony Services
  • Call/C
  • Examples
  • Domain Specific Analysis
  • Conclusion and Future Work

10
Infrastructure (SIP)
  • SIP (Session Initiation Protocol )

11
Infrastructure (SIP)
  • SIP (Session Initiation Protocol )

SIP Servers
12
Infrastructure (SIP)
  • SIP (Session Initiation Protocol )

SIP Servers
SIP Clients
13
Infrastructure (SIP)
  • SIP (Session Initiation Protocol )

SIP Servers
SIP Clients
14
SIP (Registration)
1.2.3.4
chirac
15
SIP (Registration)
1.2.3.4
chirac
chirac_at_1.2.3.4
16
SIP (Registration)
Location server chirac?1.2.3.4
chirac_at_ 1.2.3.4
200 OK
REGISTER
200 OK
1.2.3.4
chirac
elysee.fr
chirac_at_1.2.3.4
17
SIP (Registration)
Location server chirac?1.2.3.4
chirac_at_ 1.2.3.4
200 OK
REGISTER
200 OK
1.2.3.4
chirac
elysee.fr
chirac_at_1.2.3.4
18
SIP (Registration)
Location server chirac?1.2.3.4
chirac_at_ 1.2.3.4
200 OK
REGISTER
200 OK
1.2.3.4
chirac
elysee.fr
chirac_at_1.2.3.4
19
SIP (Registration)
Location server chirac?1.2.3.4
chirac_at_ 1.2.3.4
200 OK
REGISTER
200 OK
1.2.3.4
chirac
elysee.fr
chirac_at_1.2.3.4
20
SIP (Registration)
Location server chirac?1.2.3.4
chirac_at_ 1.2.3.4
200 OK
REGISTER
200 OK
1.2.3.4
chirac
elysee.fr
chirac_at_1.2.3.4
21
SIP (Registration)
Location server chirac?1.2.3.4
chirac_at_ 1.2.3.4
200 OK
REGISTER
200 OK
1.2.3.4
chirac
elysee.fr
chirac_at_1.2.3.4
22
SIP (Registration)
Location server chirac?1.2.3.4
chirac_at_ 1.2.3.4
200 OK
REGISTER
chirac_at_elysee.fr
200 OK
1.2.3.4
chirac
elysee.fr
chirac_at_1.2.3.4
23
SIP (Initiation)
  • Call chirac_at_elysee.fr ? bush_at_whitehouse.gov

1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
24
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
ACK
...multi-media communication...
25
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
ACK
...multi-media communication...
26
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
ACK
...multi-media communication...
27
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
ACK
...multi-media communication...
28
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
ACK
...multi-media communication...
29
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
ACK
...multi-media communication...
30
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
ACK
...multi-media communication...
31
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
ACK
...multi-media communication...
32
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
ACK
...multi-media communication...
33
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
200 OK 302 Moved Temporarily 486 Busy Here 603
Decline ...
ACK
...multi-media communication...
34
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
200 OK 302 Moved Temporarily 486 Busy Here 603
Decline ...
ACK
...multi-media communication...
35
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
ACK
...multi-media communication...
36
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
ACK
...multi-media communication...
37
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
ACK
...multi-media communication...
38
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
ACK
...multi-media communication...
39
SIP (Initiation)
Location server bush?5.6.7.8
ring
DNS lookup whitehouse.gov?
accept
bush?
5.6.7.8
INVITE
INVITE
INVITE
200 OK
200 OK
200 OK
1.2.3.4
chirac
elysee.fr
whitehouse.gov
5.6.7.8
bush
ACK
...multi-media communication...
40
Outline
  • Introduction
  • Infrastructure (SIP)
  • Programming Telephony Services
  • Call/C
  • Examples
  • Domain Specific Analysis
  • Conclusion and Future Work

41
Outline
  • Introduction
  • Infrastructure (SIP)
  • Programming Telephony Services
  • Call/C
  • Examples
  • Domain Specific Analysis
  • Conclusion and Future Work

42
Programming Telephony Services
lookup
call
forward
response
fixed behavior
43
Programming Telephony Services
call
response
programmable
44
Programming Telephony Services
call
if() else
response
programmable
  • Dependent on (time, request, preferences, state,
    )

45
Programming Telephony Services
call
forward
if() else
response
programmable
  • Dependent on (time, request, preferences, state,
    )
  • Signalling actions
  • lookup, forward, respond

46
Programming Telephony Services
call
forward
if() else
y f(x)
response
programmable
  • Dependent on (time, request, preferences, state,
    )
  • Signalling actions
  • lookup, forward, respond
  • Non-signalling actions
  • computations, remote procedure calls,
    side-effects, ...

47
Existing Solutions
  • General Purpose Languages
  • SIP Common Gateway Interface (SIP/CGI)
  • Java SIP Servlets
  • ...

48
Existing Solutions
  • General Purpose Languages
  • SIP Common Gateway Interface (SIP/CGI)
  • Java SIP Servlets
  • ...

Expressive, but unsafe
49
Existing Solutions
  • General Purpose Languages
  • SIP Common Gateway Interface (SIP/CGI)
  • Java SIP Servlets
  • ...

Expressive, but unsafe
50
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
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
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
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
Existing Solutions (contd)
  • General Purpose Languages
  • SIP Common Gateway Interface (SIP/CGI)
  • Java SIP Servlets
  • ...

Expressive, but unsafe
55
Existing Solutions (contd)
  • General Purpose Languages
  • SIP Common Gateway Interface (SIP/CGI)
  • Java SIP Servlets
  • ...
  • Domain Specific Languages
  • The Call Processing Language (CPL)

Expressive, but unsafe
56
Existing Solutions (contd)
  • 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
Existing Solutions (contd)
  • 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
Outline
  • Introduction
  • Infrastructure (SIP)
  • Programming Telephony Services
  • Call/C
  • Examples
  • Domain Specific Analysis
  • Conclusion and Future Work

59
Outline
  • Introduction
  • Infrastructure (SIP)
  • Programming Telephony Services
  • Call/C
  • Examples
  • Domain Specific Analysis
  • Conclusion and Future Work

60
Interaction Approach

Rest of Internet
Telephony Service
61
Interaction Approach
call

Rest of Internet
Telephony Service
62
Interaction Approach
call
lookup

Rest of Internet
Telephony Service
63
Interaction Approach
call
lookup

Rest of Internet
result
Telephony Service
64
Interaction Approach
call
lookup

Rest of Internet
result
forward
Telephony Service
65
Interaction Approach
call
lookup

Rest of Internet
result
forward
response
Telephony Service
66
Interaction Approach
call
lookup

Rest of Internet
result
forward
response
response
Telephony Service
67
Implicit Control-Flow
call
lookup

Rest of Internet
result
forward
response
response
Telephony Service
68
Manually save/restore state
call
lookup

SAVE
Rest of Internet
result
RESTORE
forward
SAVE
response
RESTORE
response
Telephony Service
69
Session-Centered withHigh-Level Signalling
Abstractions
call

lookup
Rest of Internet
forward
return
1 Service Program
70
Explicit Control-Flow
call

lookup
Rest of Internet
forward
return
1 Service Program
71
Automatically Compiled to Underlying model (with
save/restore)
call

lookup
SAVEEXIT
RESTORE
Rest of Internet
forward
SAVEEXIT
RESTORE
return
1 Service Program
72
C-like core language with...
  • Safety restrictions
  • Domain-specific extensions

73
C-like core language with...
  • Safety restrictions
  • Looping control structures do / while / for
  • Recursion, pointers, array indexing, ...
  • Domain-specific extensions

74
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
Outline
  • Introduction
  • Infrastructure (SIP)
  • Programming Telephony Services
  • Call/C
  • Examples
  • Domain Specific Analysis
  • Conclusion and Future Work

76
Outline
  • Introduction
  • Infrastructure (SIP)
  • Programming Telephony Services
  • Call/C
  • Examples
  • Domain Specific Analysis
  • Conclusion and Future Work

77
Call/C Example I
  • Decline calls outside working hours

bool isWorkHour() time t now() if
(t.weekday gt FRIDAY) return false return
(t.hour gt 9) (t.hour lt 17) response
incoming(call in) if (!isWorkHour())
return decline("OFFICE HOURS 9-17")

78
Call/C Example II
  • Forward depending on caller

sip WORK_PHONE 'sipoffice328_at_enseirb.fr'
sip CELL_PHONE 'sipclaus_brabrand_at_bouygues.
fr' response incoming(call in) if (in.from
._at_enseirb.fr) in.subject "WORK "
in.subject "" return forward(in,
WORK_PHONE) else return forward(in,
CELL_PHONE)
79
Call/C Example III
  • Forward unhandled calls to secretary

sip BOSS 'sipCEO_at_company.com' sip SECRETARY
'sipsecr_at_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
Outline
  • Introduction
  • Infrastructure (SIP)
  • Programming Telephony Services
  • Call/C
  • Examples
  • Domain Specific Analysis
  • Conclusion and Future Work

81
Outline
  • Introduction
  • Infrastructure (SIP)
  • Programming Telephony Services
  • Call/C
  • Examples
  • Domain Specific Analysis
  • Conclusion and Future Work

82
Domain Specific Analyses
  • ? Domain-specific optimization

response x x forward(in, 'sipuser_at_domain.com
') return x
83
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, 'sipuser_at_domain.com
') return x
84
Outline
  • Introduction
  • Infrastructure (SIP)
  • Programming Telephony Services
  • Call/C
  • Examples
  • Domain Specific Analysis
  • Conclusion and Future Work

85
Outline
  • Introduction
  • Infrastructure (SIP)
  • Programming Telephony Services
  • Call/C
  • Examples
  • Domain Specific Analysis
  • Conclusion and Future Work

86
Future Work
  • Composable services
  • Specification and semantics
  • Interference analysis

87
Future Work
  • Composable services
  • Specification and semantics
  • Interference analysis
  • Cost analysis
  • Resource cost models forbilling, admission
    control, server size prediction,

88
Future Work
  • Composable services
  • Specification and semantics
  • Interference analysis
  • Cost analysis
  • Resource cost models forbilling, admission
    control, server size prediction,
  • Capability-based compilation
  • Different users have different capabilities

89
Conclusion
  • Safety
  • Verifiability
  • Call completion
  • Safety of execution

90
Conclusion
  • Safety
  • Verifiability
  • Call completion
  • Safety of execution
  • Expressivity
  • Enough for many interesting services (beyond CPL)

91
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
Merci!
93
bonus slides
94
Session Abstractionsincoming / outgoing
  • Program bound to user (SIP address)

// declarations response incoming(call in)
// handle incoming call response outgoing(call
out) // handle outgoing call
dispatched when in.to user
dispatched when out.from user
95
Predefined Structurescall / response
response incoming(call in) response x
in.subject "Hello!" x forward(in,
'sipx_at_y.z') return x
struct call sip from sip to string
subject sip via
union response ok
// 200 OK string contact redirect // 302
MOVED TEMPLY busy //
486 BUSY HERE string reason decline //
603 DECLINE int code error //
xxx ERROR...
96
Domain Specific Analyses
  • ? Domain-specific verification

response incoming(call in) if ()
x forward(in, s) x
forward(in, 'sipuser_at_domain.com') return
x
97
Domain Specific Analyses
  • ? Domain-specific verification

response incoming(call in) if ()
x forward(in, s) x
forward(in, 'sipuser_at_domain.com') return
x
Explicit control-flow!
Write a Comment
User Comments (0)
About PowerShow.com