No sound on incoming calls

Here’s the strange problem. I’ve set up Asterisk to connect to Broadvoice as the trunk, and then I have a SIP phone here on my desk which connects to Asterisk.

I’ve set up a dialplan on Asterisk so that my SIP phone here goes into a context called staff. From within that context, it can dial out through the Broadvoice SIP line. It works fine. I can dial out and get good quality calls. I’m impressed.

Incoming calls are another matter. I’ve set it up so that callers can dial in and “press 1 for sales”, etc. For simplicity, I only have one extension going: extension 1. I want to get that working.

The user presses “1”, and my SIP phone on my desk rings, and I can answer it, but when I do, there’s no sound transmission in either direction.

Any ideas on this? How can I debug this strange problem? The server machine has multiple interfaces, and the SIP phone is connecting over an OpenVPN tunnel. Could there be some Asterisk routing problem, or??

Thanks for any help. I’m 95% of the way there, and very impressed with the system. I just need to fix this last, difficult 5%.

Btw, I know that Asterisk itself can make an outbound connection to my SIP phone, because I used the call-out feature (put a dial command into /var/spool/asterisk/outgoing/) and the call came through with sound. So Asterisk can initiate a connection to the SIP phone, except not when it’s coming in from Broadvoice.

Hmmmm.

And I just set up an extension with Record() to make sure that Asterisk could get sound from the incoming BV call, and it works fine. So the problem is somewhere in what Asterisk is doing. Hmmm again.

D’oh! Figured it out. canreinvite is evil. At least in this context.