Why only one way phone call could be made?

I have two pbxs each located inside a localnet which has each own public ip address. I have configred a trunk connecting these two pbxs through the instruction from this website: http://www.cadvision.com/blanchas/Asterisk/SIPtrunk.html. I also configured the forwarding rules in each router to forward all the 5060 port and 10000-20000data to the pbx in that localnet. Now I can only ring the phone from one side to the other but not in the other way and there is no sound when I pick up the ringing phone? what is the problem? how can i fix it?

Please do not post the same question twice. I have deleted the duplicate post.

You also need to post FreePBX and Asterisk versions, how this system was installed (distro or from scratch), the configuration of your trunks and dialplans and a log excerpt from when you try and place the call.

You also may find IAX easier and more secure than SIP.

yes. I found it is easier to use IAX and i’m using iax now. but the phone call could only dial successfully from location A to location B, not in the other way.I’m using FreePBX 2.7.0.0 and asterisknow 1.7.1.I used freepbx to configure my pbx. I have set the sip_nat.conf file, added externip, localnet and nat =yes. I have set the pbx in each location to be the DMZ host and set the virtual server in each router to forward the port 5060, 4569 and 10000-20000 to my pbx.(where can i get the log you mentioned above?) I think the dial plan is automatically generated by the freepbx, because I’m not familiar with centos operating system I don’t know how to get the dialplan from the pbx to the computer i’m using now, which is a windows os pc.
location A
Outgoing Settings
Trunk Name: 106-peer
host=192.168.1.106 (this is changed to the public ip address )
username=101-user
secret=1234
type=peer
qualify=yes
trunk=yes
Incoming Settings
User Context: 106-user
secret=1234
type=user

location B
Outgoing Settings
Trunk Name: 101-peer
host=192.168.1.101 (this is changed to the public ip address )
username=101-user
secret=1234
type=peer
qualify=yes
trunk=yes
Incoming Settings
User Context: 101-user
secret=1234
type=user

You don’t need a user context, it’s incomplete anyway.

You do need the context=from-internal to access internal dial plan.

I could make the phone call in both way now. Thank you! But I can’t achieve the romaing function. I tried to add context=from-internal just below the context=from-trunk and the system automatically generated context=from-internal&from-trunk. I have an extesion 2000 on pbx A whose context=from-internal. I also added the extension 2000 at pbx B with context=from-internal. Now when I use another extension 8000 registered on pbx B to call 2000, I can connect to 2000 when it is also registere on PBX B, but can’t connect to 2000 when it is registered on pbx A, rather than pbx B. how can i solve the problem?

I don’t understand your question.

You do not want the trunk in the from-trunk context. Putting in both context is even worse.

from-trunk sends the call to the inbound routes module.

from-internal sends the calls to the same dial plan as an extension (note that extensions, by default, are in the from-internal context).

sorry. maybe i didn’t express myself clearly. I want the pbx B automatically forward the extension 2000 to pbx A, when I use 8000 on pbx B call 2000, if the 2000 phone is not registered on B. I have configured the context to be from-internal for both of my pbx. but I still can not make the phone call successfully. it say that 2000 is not avaiable , please dial later.