smalltalk
/
osmo-st-sip
Archived
1
0
Fork 0

EXAMPLE: Use the new SIPCall class in the example

This commit is contained in:
Holger Hans Peter Freyther 2011-07-06 10:13:42 +02:00
parent 47034082bb
commit e9a9647cad
1 changed files with 12 additions and 7 deletions

19
EXAMPLE
View File

@ -2,13 +2,18 @@ st> transport := SIPUdpTransport startOn: '172.16.254.33'.
st> useragent := SIPUserAgent createOn: transport.
st> transport start.
"Set callbacks on the dialog"
st> dialog := SIPDialog fromUser: 'sip:1000@on-waves.com' host: '172.16.1.72' port: 5060.
st> dialog to: 'sip:9198@172.16.1.72'.
"Create a call"
st> sdpfile := nil.
st> call := SIPCall fromUser: 'sip:1000@on-waves.com' host: '172.16.1.72' port: 5060 to: 'sip:9198@172.16.1.72' on: useragent
st> call createCall: sdpfile.
st> stdin next
"Set callbacks on the transaction"
st> invite := SIPInviteTransaction createWith: dialog on: useragent with: sdp.
"Try to hangup an active call"
st> call hangup
st> invite start.
st> stdin next.
"Try to cancel a non active call"
st> call cancel
"Try to terminate either by hangup or by cancel"
st> call terminate