I had this idea of using Wi-fi in a vehicle to connect my cell to the car call handler.Just as it works with bluetooth nowadays. Just to demonstrate that such a thing is possible , i had three Linux computers play the roles of call components.
Linux 1: the VoIP caller
Linux 2: My cellphone
Linux 3: My car's Head-unit
Since this was just a demonstration i chose to use Wi-fi to establish the connection.It would make it easier to handle network related problems. The scenario is just like a simple telephony with a headset.
There is a user1( Linux 1) trying to call user 2( Linux2).
On this path it occurs a signaling event that lets my cell know there is a user ( linux 1 ) trying to call. I chose to use SIP protocol to do this signaling. There is a SIP User-Agent that can establish a peer-to-peer session using IPs which was perfect for my demonstration. So signaling Linux 2 was pretty easy, and a call was established.
Now the challenge was to have the cellphone broadcast the incoming voice on head-unit's speakers, meaning when Linux 1 called linux 2 a signal would be forwarded to the head-unit and connect Linux 2 and Linux 3, But this time the difference was that the incoming voice from Linux 1 had to flow through the cellphone and be forwarded to the headunit without cellphones Mic or speakers being used in any way, and have it play on car's speakers.And the outgoing voice traffic (from the user 3 in the car) should be recorded using Headunit's Microphones and be forwarded to the Linux 3( the voIP caller ) without using cellphones microphones or speakers in any way.( Just like headset connected to a cellphone) I needed some type of signaling strategy.
Now from Literature to technique. Pjsua uses an IP and a port number to define a user. it means i call from a Linux 1 ( IP=192.168.1.1 UDPnumber=1111) to a Linux 2 ( IP=192.168.1.2 UDPnumber=2222) but after the invitation is acknowledged the incoming voice is played by Linux 2, however what we want is that it is played on Linux 3 (IP=192.168.1.3 UDPnumber=3333).
Now there might be some ways to do such a thing. Off the top of my head i could somehow broadcast what is being played on Linux 2 to Linux 3 using port forwarding, but i am not sure if it would work.
Could anyone think of a way to bring the Linux 3 into the loop as well? I am so close to making this work.