Photon Voice Standalone

I'm having an issue when trying to get voice communication to work on a standalone server. I get the message, "PUnVoice: connecting to master " but hear nothing on either end.

I am able to get the regular networking part of Photon to work but not the voice. Photon Voice works when connected to the cloud or if I run the server from the same computer as the Voice application. It just doesn't work when I run the server on a different computer.

I'm running the latest version(1.15) of Photon Voice.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited June 2018
    Hi @Roel03,

    Thank you for choosing Photon!

    It just doesn't work when I run the server on a different computer.
    If you are not manually connecting PUN and Voice clients separately then this is expected as by default we expect both server applications to be running on the same machine as we use a single server address.

    If you want to use a different address for PUN and Photon Voice there are two options:

    1. Disable AutoConnect from PhotonVoiceSettings and manually connect to the self-hosted Photon Voice server.
    PhotonVoiceNetwork.instance.client.Connect(string masterServerAddress, string appId, string appVersion, string nickName, AuthenticationValues authValues)
    2. Wait for next Photon Voice update (no ETA but soon) to include the option to connect to different PUN and Voice servers.
    3. Make changes in the code yourself to add a field to PhotonServerSettings for VoiceServerAddress. (we can show you how)

  • Roel03
    Roel03
    edited June 2018
    I might have stated part of the question wrong, I meant to say, It just doesn't work when I run the game on a different computer. I am running both Photon Server and Voice on the same computer but the game is on a different computer. Voice works when I run the game on the same computer as Photon/Voice but Voice doesn't work when the game runs on a different computer.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Roel03,

    Do you see something useful in the logs?
    Maybe increase logging level for PUN and also for Voice:
    PhotonVoiceNetwork.Client.loadBalancingPeer.DebugOut = Client.Photon.DebugLevel.ALL;
    Also log PhotonVoiceNetwork.Client.State, you can do so also using PhotonVoiceNetwork.Client.OnStateChangeAction.
  • Roel03
    Roel03
    edited June 2018
    https://imgur.com/QnD7V06

    The log keeps looping the message in the image for the second player. The first player connection always times out.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Roel03,

    For some reason, the voice client is not successfully joining the room or maybe connecting to the Game Server first.
    Are you sure you are not seeing any errors? Are you sure PUN connects successfully also?
    Do you keep same default ports for both PUN and Voice? in theory both clients will connect to the same server applications.

    Maybe the Game Server IP is not set properly for the self-hosted Photon Server.
    Make sure you set the Game Server IP from PhotonControl to the public or local IP address and not the loopback.
  • Roel03
    Roel03
    edited July 2018
    I'm not seeing any errors. PUN is connecting successfully because I have a multiplayer game running just can't communicate with the other player. Both ports are set to 5055. I also don't have the IP address set to the loopback.

    I did notice that I'm never receiving a UserID from the server for photon voice even though it's connecting to Master server and then the Game server.
  • Roel03
    Roel03
    edited July 2018
    Double post.
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited July 2018
    Is this reproducible with the demo scenes or TestVoice-Scene?
    I'm out of ideas. For some reason, it seems the voice client is not able to connect to the game server at all OR fails to join the voice room.
    I get it that logs show that voice client is stuck trying to join the voice room.
    But do you ever see
    PUNVoice: Voice Client state: ConnectingToGameserver
    or
    PUNVoice: Voice Client state: ConnectedToGameserver
    ?
  • Found the fix from the solution provided in the link below.

    https://forum.photonengine.com/discussion/11866/setting-userid-for-photon-voice-on-self-hosted-windows-server

    Thanks for the help.