Quick question for the VoIP gurus. A while back I learned a trick where if I received a call on a VoIP phone, but after answering I couldn't hear anything, I would ask the person to press a number on their keypad if they could hear me. If I heard the tone, I knew it was a one way audio situation. I was wondering if anybody new why I would be able to hear the number tone but not their speech?
Because in some VoIP protocols signalling (setup of connection, but also DTMF tones) can be carried in separate session from voice payload. If the voice payload can't traverse both ways (and it's often the case with NAT/firewall gateways) you'll get one way audio, but the connection still will be made and can provide some additional services (like your tones).
This is because the tone is sent to your endpoint out of band, seperate to the media in a SIP INFO(SIP 2.0) or UII (H.245) message then generated locally by your device.
SIP/H.323 is the protocol used to set up your VoIP call and is usually carried over a TCP socket that is opened up by your router in a similar way an HTTP request would be.
SIP INFO example:
INFO sip:email@example.com SIP/2.0 Via: SIP/2.0/UDP alice.uk.example.com:5060 From: <sip:firstname.lastname@example.org>;tag=d3je23d To: <sip:email@example.com>;tag=8932 Call-ID: 312352@myphone CSeq: 5 INFO Content-Length: 24 Content-Type: application/dtmf-relay Signal=5 Duration=160
The voice traffic will be carried over a UDP stream. To allow the media inbound to your device, the router needs to inspect the SIP/H.323 protocol to identify the UDP port that will be used for media then open up that port up and NAT (Network Address Translation) it to your endpoint.
Some providers will run symmetric-latching, this essentially waits for the media you send then streams the return speech back to the same source port and IP on your device as this typically will be opened up and NAT'd back to your endpoint making the call.