Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  8. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

PUSH TO TALK over Internet

Discussion in 'Connected Games' started by mehrdad3dgs, Aug 8, 2018.

  1. mehrdad3dgs

    mehrdad3dgs

    Joined:
    Mar 17, 2015
    Posts:
    7
    HELLO ALL
    i want to make an push to talk project that works with internet connection.
    please help me.
    thanks a lot
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    3,026
    There's several threads on sending voice data. Push to talk would just be taking an input to activate/deactivate the sending of voice data.
     
  3. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    297
    How much experience do you have with talk over the internet? A simple SIP call would be sufficient. You can stop the udp stream when it's not active and start it again when the button is pressed.
     
  4. mehrdad3dgs

    mehrdad3dgs

    Joined:
    Mar 17, 2015
    Posts:
    7
    Could you send me a sample unity project?
     
  5. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    297
    No, I don't have any such thing. I plan on implementing one in the next six months or so, but I've not done it yet.

    First off, do you know how to do communication over the internet? Are you having one of your clients be the host, or will you have public servers?

    Here is how I would handle something like this:

    Install a SIP engine on a public server. I've used an engine called Asterisk before, it's very easy to install and configure. It also has a REST interface for adding numbers, and most importantly, it's released under GPL.

    On each client, I'd create a SIP call leg. You'll need a SIP client library for this. It's a simple TCP socket on the server's port 5060. You send a REGISTER to tell the server where the phone is, then just wait for an INVITE.

    I'd have the host of your game send a conference call request to everyone else in the party to the public server. The Asterisk server will find everybody (it knows where they are from the REGISTER) and sends out the INVITE.

    Now what happens next depends on circumstance. If you only have two players talking to each other, there is no reason for Asterisk to be involved anymore, and it will get out of the way and directly connect the two phones. If, however, there are more players than that, the server must stay in the line of communication because it's responsible for sound mixing. You can however, transfer it to another asterisk server (probably one on your game host itself.)

    I worked in telecom for 5 years, the SIP protocol is very powerful, but can be difficult to understand if you've never done udp / low level socket stuff before.
     
    mehrdad3dgs likes this.
  6. mehrdad3dgs

    mehrdad3dgs

    Joined:
    Mar 17, 2015
    Posts:
    7
    i am a beginner to do this
    if have an sample project for me,was so good :-(
     
  7. Positivits

    Positivits

    Joined:
    Aug 9, 2018
    Posts:
    1
    I want to make similar push project, following topic.








    ----------------
    Qunb
     
    mehrdad3dgs likes this.
  8. mehrdad3dgs

    mehrdad3dgs

    Joined:
    Mar 17, 2015
    Posts:
    7