In my previous setup, I had a FreePBX installation which was connecting to my provider through a defined trunk. Internal IP phones were connected to FreePBX and I also had a Grandstream HT801 as an extension to FreePBX serving as a gateway to a couple of classic (no-IP) DECT phones.
I have recently installed a Fritz!Box 5530 and I’m trying to make everything work like before. Now, Fritz is connected directly to my provider, HT801 is removed (since Fritz is serving the classic DECTs now), FreePBX trunk is now actually an IP client to FreePBX. I have also set Zoiper to my mobile phone, which is connected to Fritz as another IP client (similar to FreePBX).
So far, outgoing calls work fine from everywhere. The problem is with incoming calls…
Classic phones are ringing, my mobile phone is ringing, but FreePBX is dead, not even an entry in the log files. FreePBX extensions can still dial out normally, as I mentioned before. Internal extension numbers (**620 etc) from Fritz are also not working from other Fritz Extensions to FreePBX extension.
If the incoming route points to an IVR/ringgroup/extension it should be ok. I dont know the standard 999 route, you mentioned.
Long time ago, I had a similar setup with a Fritzbox. I used a SIP-trunk and played around with the incoming settings (trunk) until it worked.
What does the Asterisk Log tell you? Does the incoming call show up?
I assume that FreePBX is registering to Fritz!Box with a pjsip trunk. If not, please provide details.
First, confirm that the registration is successful. In Reports → Asterisk Info → Registries, report what is shown for the Fritz!Box trunk. If Status is not Registered, post an example of a registration attempt and any replies. At the Asterisk command prompt, type pjsip set logger on
wait for a registration attempt and post the relevant portion of the Asterisk log.
If Status does show Registered, check that the Contact header of the REGISTER request has the correct IP address and port. If you are registering to the LAN address of the Fritz!Box, Contact should show the private IP address of the PBX. If registering to a host on the internet, Contact should show the public IP address, and you should be forwarding the SIP port to the PBX.
If you still have trouble (registered ok but calls not arriving at the PBX), run sngrep and see what, if anything, appears on an attempted inbound call. If nothing, look at whatever logging info is available from the Fritz!Box to see why it is not even attempting to contact the PBX.
I can’t say I’m an experienced user, but I can understand some basic stuff.
Before the switch, there was a trunk that was working fine directly to my provider. I duplicated the trunk, changed the address of the SIP server and credentials, and I was expecting that it would work. That’s it…
There is first of all the basic decision to be made: Who shall register the lines with the phone-provider? FritzBox or FreePBX. The better way is with the answer FreePBX. But in this case you have to de-activate your external phone-numbers within the FritzBox, otherwise the box is catching your incoming calls first and does not route them to your freepbx.
Once you let your fritzbox register the lines with your phone-provider, you need to create some “IP-Phones” within your fritzbox with user different to users pw. user and pw shoud have min 8 digits. These user and pw data are to be used for your freepbx trunk. The trunk connects to your fritzbox-IP. Using this setup, you need to know that fritzbox is not forwarding the DID to the freepbx-trunk. Therefore inbound routes will never recognize an inbound call. This might be your problem.
solution: You need to edit extensions_custom.conf and insert an own context to be used by the freepbx-trunk for each trunk e.g
exten => _.,1,Noop(Fixing DID to <phone#DID> da DID von FB nur s)
exten => _.,n,Goto(from-trunk,<phone#DID>,1)
The trunk need to have:
gereral: sip-server: fritz.box (ones DNS works) or fritzbox-IP
context: your own context (see above)
advanced: outbound-proxy your fritzbox
contact user the user defined in your fritzbox ip-phone setup for this ip-phone/freepbx-trunk
from-domain your fritzbox or ip
from-user same as contact user
Please be very-very patient. One singe mis-typing is answered by your fritzbox with a nowhere logged brute-force attack answer doubling the login time for each try. This might cause blocking of days. A fritzbox reboot does not help anything.
In addition if using the cli: use asterisk -rvvv and type pjsip show registrations
You may see whether or not your trunks are registered or rejected, against what server and with which auth-name.
to return exit, exit
In addition: Do not mix client-phones connected to Fritzbox and freePBX. You never can hand-over calls from an FritzBox-Phone into a PBX-extension with **620 or whatsever. Talking about DECT: Let it as it was before as long as it worked. De-activate DECT in your fritzBox. There is a possibility to make it work via FritzBox, but would need an extra chapter here.
And don’t use 620 and above as user-names for your ip-phones/trunk. This doesn’t work anymore since some fritzbox firmware-upgrades for years, but is still mentioned on AVM help-sites as possible user names.
A simpler approach would be to configure freePBX as your main phone system (with trunk to your voip provider) and use the Fritz!Box as a freePBX extension, just for your DECT phones (=Fritz!Box replaces HT801).
In this case, you would set up the external number (SIP-trunking) in Fritz!Box to match the extension in freePBX. You could add several external numbers matching several freePBX extensions and route the calls for every number to different DECTs.
EDIT: I still use SIP extensions and trunks for that purpose…not PJSIP…
Yes, i confirm Charles_Darwin. I’m using such a config for one of my branches, where no SIP-phones are possible. However take in mind, that specific dial-rules have to be used within the FritzBox in case you intend to make internal calls between the “Fritzbox IP-phone” and other FreePBX extensions, since otherwise FritzBox is automatically putting country-code and/or city-code as a prefix to the extension#, which results to an unknown extemsion#s.