I have two asterisk based PBXs, each one of them on a diferent LAN, both LANs connected with a router.
First pbx is 10.0.0.1/24 and second one is 10.0.2.1/24. Both pbx have their own extensions and calls between extensions are working perfectly.
PBX1 has a SIP Trunk with a VoIP provider, in a different network interface on a different network. PBX2 has not any Trunk appart from the one connecting it to PBX1.
The problem I'm facing is that, when a user from PBX2 dials an external phone number, according to the dialing rules the call is routed over the trunk to PBX1 which in turn routes the call to the VoIP Provider, the other end on the PSTN picks the phone and... nothing can be heard.
I debugged the problem and found that, what is happening is that the VoIP Provider is sending the RTP traffic (udp packets on a tcpdump) directly to the device on PBX2. As there is no routing between the VoIP network and PBX2, that traffic is lots.
My question is: Is it the supposed way to work? Am I forced to ensure that any both ends are routable?
Does it exist any way to make PBX1 work as a proxy so that ONLY PBX1 has access to the VoIP provider?
I'm using asterisk 1.4.
Thanks for your help.