[jitsi-dev] [jitsi] Adapt high-level API to allow calls without registration (#51)

This contribution does not change existing behavior unless the new account property MUST_REGISTER_TO_CALL is set to false (the default is true), e.g

net.java.sip.communicator.impl.protocol.sip.acc00001.MUST_REGISTER_TO_CALL=false

These are the high-level changes required, I suspect some low-level change may also be required as it doesn't currently work for TLS, when trying to make a call without being registered, it fails with the exception below. Any feedback about this change would be very welcome.

     [java] java.lang.IllegalArgumentException: invalid transport
     [java] 	at net.java.sip.communicator.impl.protocol.sip.SipStackSharing.getJainSipProvider(SipStackSharing.java:474)
     [java] 	at net.java.sip.communicator.impl.protocol.sip.ProtocolProviderServiceSipImpl.getJainSipProvider(ProtocolProviderServiceSipImpl.java:1573)
     [java] 	at net.java.sip.communicator.impl.protocol.sip.ProtocolProviderServiceSipImpl.getDefaultJainSipProvider(ProtocolProviderServiceSipImpl.java:1952)
     [java] 	at net.java.sip.communicator.impl.protocol.sip.SipMessageFactory.createInviteRequest(SipMessageFactory.java:724)
     [java] 	at net.java.sip.communicator.impl.protocol.sip.SipMessageFactory.createInviteRequest(SipMessageFactory.java:864)
     [java] 	at net.java.sip.communicator.impl.protocol.sip.CallSipImpl.invite(CallSipImpl.java:357)
     [java] 	at net.java.sip.communicator.impl.protocol.sip.OperationSetBasicTelephonySipImpl.createOutgoingCall(OperationSetBasicTelephonySipImpl.java:173)
     [java] 	at net.java.sip.communicator.impl.protocol.sip.OperationSetBasicTelephonySipImpl.createCall(OperationSetBasicTelephonySipImpl.java:118)
     [java] 	at net.java.sip.communicator.service.protocol.media.AbstractOperationSetBasicTelephony.createCall(AbstractOperationSetBasicTelephony.java:111)
     [java] 	at net.java.sip.communicator.impl.protocol.sip.UriHandlerSipImpl.handleUri(UriHandlerSipImpl.java:313)
     [java] 	at net.java.sip.communicator.impl.argdelegation.ArgDelegationPeerImpl.handleUri(ArgDelegationPeerImpl.java:186)
     [java] 	at net.java.sip.communicator.util.launchutils.ArgDelegator.handleUri(ArgDelegator.java:62)
     [java] 	at net.java.sip.communicator.util.launchutils.LaunchArgHandler.handleConcurrentInvocationRequestArgs(LaunchArgHandler.java:557)
     [java] 	at net.java.sip.communicator.util.launchutils.SipCommunicatorLock$LockServerConnectionProcessor.run(SipCommunicatorLock.java:827)

You can merge this Pull Request by running:

  git pull https://github.com/dpocock/jitsi sip-call-without-registration

Or you can view, comment on it, or merge it online at:

  https://github.com/jitsi/jitsi/pull/51

-- Commit Summary --

  * Adapt high-level API to allow calls without registration

-- File Changes --

    M src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java (3)
    M src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java (13)
    M src/net/java/sip/communicator/service/protocol/AbstractProtocolProviderService.java (12)
    M src/net/java/sip/communicator/service/protocol/ProtocolProviderFactory.java (6)
    M src/net/java/sip/communicator/service/protocol/ProtocolProviderService.java (7)

-- Patch Links --

https://github.com/jitsi/jitsi/pull/51.patch
https://github.com/jitsi/jitsi/pull/51.diff

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi/pull/51

I'm fine with the actual changes, however I don't really understand how this is useful. Maybe @emcho knows something about the exception.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi/pull/51#issuecomment-51686242

One use case for this is for applications that embed Jitsi to provide a call home or help desk function. The user of the third-party application can click a button, launching Jitsi to make some call to the help desk or whatever. The users may not be receiving any calls though.

I was a bit confused about the way that Jitsi uses the words "online" and "registered". These have evolved to mean many different things, but Jitsi combines them all into a single online/offline concept. In SIP, all of the following things are possible:

1. the account is a candidate for outgoing calls or it is administratively disabled and should not be considered when making a call
2. the account is registered with a registration server and can receive calls from the proxy
3. the account is sending "online" status to a presence server

Jitsi SIP settings provide an option to disable (3), but (1) and (2) appear to be treated as the same thing in Jitsi.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi/pull/51#issuecomment-51707825

Merged #51.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi/pull/51#event-426238548