callagent: Make it possible to run on a different port
This commit is contained in:
parent
11420c62b0
commit
115842f0e8
|
@ -67,6 +67,11 @@ Object subclass: SIPTransport [
|
||||||
^ self subclassResponsibility
|
^ self subclassResponsibility
|
||||||
]
|
]
|
||||||
|
|
||||||
|
port [
|
||||||
|
<category: 'accessing'>
|
||||||
|
^ self subclassResponsibility
|
||||||
|
]
|
||||||
|
|
||||||
type [
|
type [
|
||||||
<category: 'accessing'>
|
<category: 'accessing'>
|
||||||
^ self class type
|
^ self class type
|
||||||
|
@ -83,21 +88,30 @@ SIPTransport subclass: SIPUdpTransport [
|
||||||
^ 'UDP'
|
^ 'UDP'
|
||||||
]
|
]
|
||||||
|
|
||||||
SIPUdpTransport class >> startOn: anAddress [
|
SIPUdpTransport class >> startOn: anAddress port: aPort [
|
||||||
<category: 'factory'>
|
<category: 'factory'>
|
||||||
|
|
||||||
^ (self new)
|
^ (self new)
|
||||||
initialize: anAddress;
|
initialize: anAddress port: aPort;
|
||||||
yourself
|
yourself
|
||||||
]
|
]
|
||||||
|
|
||||||
|
SIPUdpTransport class >> startOn: anAddress [
|
||||||
|
^ self startOn: anAddress port: 5060.
|
||||||
|
]
|
||||||
|
|
||||||
address [
|
address [
|
||||||
<category: 'accessing'>
|
<category: 'accessing'>
|
||||||
^ socket address
|
^ socket address
|
||||||
]
|
]
|
||||||
|
|
||||||
initialize: anAddress [
|
port [
|
||||||
socket := Sockets.DatagramSocket local: anAddress port: 5060.
|
<category: 'accessing'>
|
||||||
|
^ socket port
|
||||||
|
]
|
||||||
|
|
||||||
|
initialize: anAddress port: aPort [
|
||||||
|
socket := Sockets.DatagramSocket local: anAddress port: aPort.
|
||||||
socket
|
socket
|
||||||
bufferSize: 2048;
|
bufferSize: 2048;
|
||||||
addToBeFinalized.
|
addToBeFinalized.
|
||||||
|
@ -161,8 +175,8 @@ Object subclass: SIPUserAgentBase [
|
||||||
generateVia: aBranch [
|
generateVia: aBranch [
|
||||||
<category: 'ids'>
|
<category: 'ids'>
|
||||||
|
|
||||||
^ 'SIP/2.0/%1 %2;branch=%3' %
|
^ 'SIP/2.0/%1 %2:%3;branch=%4' %
|
||||||
{transport type. transport address. aBranch}
|
{transport type. transport address. transport port. aBranch}
|
||||||
]
|
]
|
||||||
|
|
||||||
generateCSeq [
|
generateCSeq [
|
||||||
|
|
Reference in New Issue