Thursday, September 17, 2009

Inbound calls failing on PAP2 with FreePBX

Also related to this topic, look for my post about "What to do when my PAP2 gui keeps freezing." here

FINAL EDIT 092709

My perseverance finally paid off. I almost went crazy but everything works now. The problem was two part:

1. For some reason when I changed the static IP of the PAP2 to .107, the gui changed over and I could now access the gui from that IP in the browser. HOWEVER...and very strangely, when I went into the 'system' settings I noticed the PAP2 static IP was still reading .100! How, I don't know, so I simply changed it to .107 one more time, saved, and power-cycled the device - and it started working.

2. I changed the nat settings to 'yes' and 'keep alive' in both lines.

3. I put all the SIP ports of both lines back to 5060

What a battle!

EDIT 091909

It turns out that everything I wrote below wasn't actually... that worth following but it may be of educational interest for anyone on our path. I would recommend reading it just to pick up a few troubleshooting ideas, maybe. The new update on this is this:

It seems as though the Nokia E71 was in conflict with the Linksys PAP2. The way I finally found this out (and an interesting and fast troubleshooting method, by the way) is I went to the 'active session' of my DI-524 router (D-link) and kept clicking it and watching the IP address activity. What I figured out by doing that was that, even though I had removed all the static IP address from my actual Nokia and changed it back to 'automatic' under the advanced access point settings, I was still seeing an IP address of .107 showing up in the active session list! That was my old Nokia static IP address. Why was it still showing up if it wasn't in the phone? Then it dawned on me that I had, under the home/DHCP section of the router, left the MAC address of the Nokia in the static DHCP client list. So, I guess what was happening was the router was registering the MAC address of my Nokia and force-feeding it an address of .107. Why my Nokia doesn't register with our PBX with that static IP manually in there is another question, but it seems that once I removed that and put the phone back to automatic (NOkia) and the PAP2 to 'static' but still with DHCP ability active, everything worked, including PSTN inbound calls to the PAP2.

We'll see if it lasts this way overnight!

---------------------

The archives of this are here:

After hacking a vonage box successfully (I'll post about that soonish) I had a random problem occur. I believe it's a good and quick learning experience to read through the process I went through, but you can skip to the '1 second solution' at the end if you'd like. There is an edit in the middle that was an interesting turn of events (if you think this stuff is interesting! ha)

I had set up two different extensions within the PAP2 device. All of the following were working perfectly:

-inbound calls from PSTN
-outbound calls to PSTN
-Extension-to-extension calls from within the same LAN (i.e. phone1 port to phone2 port call withing selfsame PAP2) (inbound and outbound)
-Extension-t0-extension calls from one LAN through a WAN and terminating at an extension at a different LAN (both directions) (inbound and outbound)

Then, without notice, I totally lost all functionality of phone2 of the PAP2, including all voicemail recordings we had done (the voicemail recording loss remains a mystery at the time of this posting). At the same time, though, it appeared that phone1 of the adaptor was ok.

The first thing I did was log into the PAP2 device. I assumed that the problem was because there were too many devices sharing the same 5060 port. So, I changed phone1 to 5062 and phone2 to 5063. They both registered and were able to call out. However, after a few hours, I figured out that all calls within that LAN were now only able to call out, but not receive calls from anywhere (LAN, WAN, PSTN, etc). All extensions within that LAN were now basically only able to to outbound calls.

So, I decided to go into my router and do a DMZ where I discovered that it seemed to work! So it was definitely a port problem in my LAN that was restricting inbound calls. But, I had all the ports open for this kind of application.

Randomly (and here comes the solution so far), I decided to set both phone1 and phone2 of the PAP2 to 5060. I was expecting a conflict but lo and behold - they both not only registered by were able to receive inbound calls from my separate Nokia E71 which was at a different extension in the same LAN.

I went back into my router and cleared out all the new ports I had opened during testing and it seemed to work just fine.

I now, however, have one remaining problem! It seems that the PAP2 device is working just fine in my LAN but now my Nokia E71 can register but cannot receive inbound calls from the PAP2 extensions! Grr. I hope to post a follow up to this with a solution soon.

EDIT:

It turns out that it was not much related to what I thought above either! After doing everything above, I still started encountering the same problems once I started making random calls to and fro internal extensions on my LAN. I remembered reading somewhere something about NAT and how it offers a helping hand when you are behind a router. However, in the Linksys PAP2 they call it 'NAT mapping' and I had never heard of the word 'mapping' attached to NAT so I was afraid to try it out. Finally, I just enabled it as a last resort and did a test to and from all the extensions and it worked...almost. And here is an interesting note for troubleshooting. I didn't want to wake up my family while I was ringing the extensions so I just engaged the extension to which I would be calling (picked up the phone) so that when I called it, if it was working, I would get the 'on the phone' message, instead of the 'unavailable' message. I assumed that if I got the 'on the phone' message that everything was working perfectly for receiving calls. All the extensions worked perfectly after enabling 'NAT mapping'. I was happy, but at the last second I decided to do one actual call to an extension to make it ring. It failed! It went straight to the 'unavailable' message. Discouraged I did a quick power-cycle of the PAP2 and boom. Everything worked again. It seems that now, I am fully back in action.

1 second solution:

in PAP2 interface enable "NAT MAPPING" for each line if you are behind a router.

What I learned (Summary):

1. After doing any major changes in the PAP2 settings, always power cycle when you are done to make sure everything is 'engaged'

2. Always try a DMZ on the device before going too far. At least then you can isolate the source (LAN, device, WAN, otherwise)

3. write down a list of your extensions and all the possible combinations that you will test like a spreadsheet like this:


.............................| setting change | result | setting change | result
ext1 > ext 2
ext 1 > ext 3

ext2 > ext 1
ext 2 > ext 3

ext3> ext1
ext3> ext 2

that way you are tracking your setting change and making sure you are testing both inbound and outbound calls




No comments:

Post a Comment