r3gis
unread,Oct 29, 2009, 4:54:09 PM10/29/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Sipdroid Users
Hello,
I'm currently trying to make Sipdroid work when phone and registrar
are on the same LAN ( with subnets ).
This configuration can occurs when sipdroid and another softphone want
to establish direct rtp for media connection.
I patched sipdroid to do so, and as far as it's a open source project,
I contribute back what i have changed to make it work (these are minor
changes).
This modifications could introduce regressions (such as multiple call
handling, etc), besides, for now, it only works when you make a call
(incoming calls doesn't work yet, but i think that the problem is
linked to the way that sockets listen and that connections are made
for SIP sig).
But once reviewed it could be a great feature to support direct RTP in
such environments.
(PS : I start to dive into sipdroid code 2 days ago, and my goal was
to make it work quickly, so be indulgent ;) ).
---------------------------------
--- org.sipdroid.net.RtpSocket:75
/* Commented since if we are traversing a router (due to subnets),
socket is established to the real remote address
but datagram appears to come from the router !
A best solution have to be found, but from now it works
*/
// if (!socket.isConnected())
// socket.connect(datagram.getAddress(),datagram.getPort());
--- org.zoolu.net.IpAddress:122
// Uncommented since without sbc (direct rtp), we have to provide
our real interface in INVITEs
localIpAddress = "127.0.0.1";
try {
for (Enumeration<NetworkInterface> en =
NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {
NetworkInterface intf = en.nextElement();
for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses
(); enumIpAddr.hasMoreElements();) {
InetAddress inetAddress = enumIpAddr.nextElement();
if (!inetAddress.isLoopbackAddress()) {
localIpAddress = inetAddress.getHostAddress().toString();
}
}
}
} catch (SocketException ex) {
// do nothing
}
--- org.zoolu.sip.provider.SipProvider:295
// If port is 0, we should listen on default_port
if (host_port <= 0) // modified
host_port = SipStack.default_port;
---------------------------
One other point, that could be interesting :
for me revision 340 introduces a "regression" in your callerID
implementation.
In fact, this is not really a regression, if you consider callerID as
what it means in sip (an arbitrary id given by the client to identify
itself), but previous version implements something that is really
important for my sip registrar : it's commonly named "Authentification
Name", and is different from username.
For my registrar (openser with ldap backend), username and
authentification name are both needed to authenticate a user.
Hope my little contribution will help.
Best regards.