Any language that supports socket can be used to transmit voice, some have greater ease other not so much.
In general, the applications mentioned by you have a central server that works as a relay point for clients, "so this is necessary ?"
Security - Customers do not need to have an open port on the PC face to the internet, imagine you have to do port forwarding and Nat configuration if you are behind a router.
Control - What if one of these companies legally needs to spy/listen/wiretap a user ? this will only be possible if there is a level of control, in these cases the transmissions need to go through the central server, another type of control would be to recode the audio in codecs to consume the smallest possible band, do not send transmission during connection in case of silencing on one side to once again save bandwidth, etc.
The architecture is simple:
Client(A) <-----> SERVER <------> Client(B)
The Server yes needs to have one or several open doors facing the internet (generally UDP ports) for clients to be able to connect, so arguably in this central server you will need to develop in some language (java, php, perl, python, C, etc), the central core needs to be listed on the ports defined by you, should be able to support multiple simultaneous connections on the same port concurrently/threads or whether it should be able to perform multiple tasks simultaneously (calls from multiple customers happening at the same time). Server is responsible for receiving voice frames on the customer sideA and forwarding to Clienteb
Clients must be able to close socket communication with the server (connect to the server) and transmit the voice blocks captured by the microphone in a fixed size buffer (2048, 4096, etc.), this way the data leaves via customer socketA to the central server that forwards this transmission to the customer.
This is the basic idea behind any voice connection made under IP, of course there are ways to refine and improve the process as trying to take a little load from the central server and leave the audio encoding/decoding to be done in the client.
You may have noticed that working with socket your server does not need to be written in the same language as clients.
You can get out of the concept and try to write the basics without having a central server, to initiate a point-to-point communication on an internal network and because not via the internet, all you will need for these steps is to make both Ips connect directly by socket, start by sending text equal to a chat, your next step will be to send audio through the buffer, instead of text you may want to try sending an array in float point to be encoded and played while receiving the frames by the socket in the clienteB.
"[PHP] is not a technology recommended for data transmission of the genre (Streaming)" - why? If you do not quote the reason(s) (s) it seems that it is only your opinion.
– André Ribeiro
@Andréribeiro Thanks for the comment, I got it. I edited the reply, tell me if it is acceptable now. Thanks again.
– Guilherme Nascimento
Good answer! But we would use PHP to stream type with websockets
– Gabriel Henrique
@Gabrielhenrique It would be very costly for the server to do such a process, unless you want to transmit the "addresses only". You may be able to use PHP for this, but probably your server won’t last a day.
– Guilherme Nascimento
By giving a negative vote please justify, I will not be upset, I just wish to know where I can improve.
– Guilherme Nascimento
@Guilhermenascimento Very good. + 1 to repair the negative for no reason you were given.
– André Ribeiro