EXAMPLE: Use the new SIPCall class in the example
This commit is contained in:
parent
47034082bb
commit
e9a9647cad
19
EXAMPLE
19
EXAMPLE
|
@ -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
|
||||
|
||||
|
|
Reference in New Issue