Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
5d005e91
Commit
5d005e91
authored
Apr 10, 2014
by
Dele Olajide
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Jitsi Videobridge plugin: Incoming SIP calls now works. Tested ok with iNums
parent
78ef972c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
8 deletions
+18
-8
CallSession.java
...jitsivideobridge/src/java/org/ifsoft/sip/CallSession.java
+2
-0
SipService.java
.../jitsivideobridge/src/java/org/ifsoft/sip/SipService.java
+2
-1
VideoBridgeSipListener.java
...ridge/src/java/org/ifsoft/sip/VideoBridgeSipListener.java
+9
-3
PluginImpl.java
...e/src/java/org/jitsi/videobridge/openfire/PluginImpl.java
+5
-4
No files found.
src/plugins/jitsivideobridge/src/java/org/ifsoft/sip/CallSession.java
View file @
5d005e91
...
@@ -156,6 +156,7 @@ public class CallSession
...
@@ -156,6 +156,7 @@ public class CallSession
internalCallId
=
"CS"
+
String
.
format
(
"%08x"
,
nextInternalCallId
++);
internalCallId
=
"CS"
+
String
.
format
(
"%08x"
,
nextInternalCallId
++);
offerPayloads
.
add
(
PAYLOAD_PCMU
);
offerPayloads
.
add
(
PAYLOAD_PCMU
);
answerPayloads
.
add
(
PAYLOAD_PCMU
);
try
{
try
{
InetAddress
bindAddr
=
InetAddress
.
getByName
(
host
);
InetAddress
bindAddr
=
InetAddress
.
getByName
(
host
);
...
@@ -794,6 +795,7 @@ public class CallSession
...
@@ -794,6 +795,7 @@ public class CallSession
if
(
bitRatePayload
!=
null
)
if
(
bitRatePayload
!=
null
)
{
{
Payload
p
=
new
Payload
(
codec
,
name
,
clockRate
,
bitRatePayload
.
bitRate
);
Payload
p
=
new
Payload
(
codec
,
name
,
clockRate
,
bitRatePayload
.
bitRate
);
if
(
offer
)
if
(
offer
)
{
{
offerPayloads
.
add
(
p
);
offerPayloads
.
add
(
p
);
...
...
src/plugins/jitsivideobridge/src/java/org/ifsoft/sip/SipService.java
View file @
5d005e91
...
@@ -133,7 +133,8 @@ public class SipService
...
@@ -133,7 +133,8 @@ public class SipService
public
static
String
getLocalIP
()
public
static
String
getLocalIP
()
{
{
return
localip
;
ListeningPoint
lp
=
sipProvider
.
getListeningPoint
(
ListeningPoint
.
UDP
);
return
lp
.
getIPAddress
();
}
}
private
void
registerWithDefaultProxy
()
private
void
registerWithDefaultProxy
()
...
...
src/plugins/jitsivideobridge/src/java/org/ifsoft/sip/VideoBridgeSipListener.java
View file @
5d005e91
...
@@ -485,15 +485,21 @@ public class VideoBridgeSipListener implements SipListener
...
@@ -485,15 +485,21 @@ public class VideoBridgeSipListener implements SipListener
if
(
cs
!=
null
)
if
(
cs
!=
null
)
{
{
Log
.
info
(
"[[SIP]] created call session : [["
+
cs
.
internalCallId
+
"]]"
);
Log
.
info
(
"[[SIP]] created call session : [["
+
cs
.
internalCallId
+
"]]"
);
cs
.
parseInvite
(
req
,
dialog
,
trans
);
dialog
.
setApplicationData
(
cs
);
Response
res
=
SipService
.
messageFactory
.
createResponse
(
Response
.
RINGING
,
req
);
Response
res
=
SipService
.
messageFactory
.
createResponse
(
Response
.
RINGING
,
req
);
trans
.
sendResponse
(
res
);
trans
.
sendResponse
(
res
);
cs
.
parseInvite
(
req
,
dialog
,
trans
);
dialog
.
setApplicationData
(
cs
);
SipService
.
acceptCall
(
cs
);
SipService
.
acceptCall
(
cs
);
return
;
}
else
{
Response
res
=
SipService
.
messageFactory
.
createResponse
(
Response
.
FORBIDDEN
,
req
);
trans
.
sendResponse
(
res
);
}
}
return
;
}
else
{
}
else
{
// SIP RE-INVITE (dumbstart implementation, ignores timers, etc)
// SIP RE-INVITE (dumbstart implementation, ignores timers, etc)
Log
.
info
(
"[[SIP]] Got a re-invite!"
);
Log
.
info
(
"[[SIP]] Got a re-invite!"
);
...
...
src/plugins/jitsivideobridge/src/java/org/jitsi/videobridge/openfire/PluginImpl.java
View file @
5d005e91
...
@@ -661,7 +661,11 @@ public class PluginImpl implements Plugin, PropertyEventListener
...
@@ -661,7 +661,11 @@ public class PluginImpl implements Plugin, PropertyEventListener
{
{
CallSession
session
=
null
;
CallSession
session
=
null
;
String
hostname
=
XMPPServer
.
getInstance
().
getServerInfo
().
getHostname
();
String
hostname
=
XMPPServer
.
getInstance
().
getServerInfo
().
getHostname
();
String
focusAgentName
=
"jitsi.videobridge."
+
to
;
String
callerId
=
to
;
if
(
callerId
.
indexOf
(
"+"
)
==
0
)
callerId
=
callerId
.
substring
(
1
);
String
focusAgentName
=
"jitsi.videobridge."
+
callerId
;
if
(
sessions
.
containsKey
(
focusAgentName
))
if
(
sessions
.
containsKey
(
focusAgentName
))
{
{
...
@@ -691,9 +695,6 @@ public class PluginImpl implements Plugin, PropertyEventListener
...
@@ -691,9 +695,6 @@ public class PluginImpl implements Plugin, PropertyEventListener
session
=
new
CallSession
(
mediaStream
,
hostname
,
focus
,
from
);
session
=
new
CallSession
(
mediaStream
,
hostname
,
focus
,
from
);
focus
.
callSessions
.
put
(
to
,
session
);
focus
.
callSessions
.
put
(
to
,
session
);
session
.
jabberRemote
=
to
;
session
.
jabberLocal
=
from
;
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment