SOLVED Problem connecting FritzBox client

CyberneticianDave

New Member
Joined
Mar 9, 2018
Messages
10
Reaction score
1
Hi

New here! I've tinkered with Asterisk in the past but never gone the whole hog, this time I'm trying to go all in.

I've got IncrediblePBX 13 running on a CentOS 6.9 guest on my FreeNAS box.

I've managed to create a couple of trunks, routes and extensions. I've got my landline coming in by connecting to my FritzBox 7490 as a trunk, which is great. But I'd like to use the handsets connected to the FritzBox as extensions.

As far as I can tell, and according to https://www.luxgruppe.de/tech/?p=261 (which I only found thanks to this forum) it should be as straightforward as creating SIP extensions in Incredible PBX and then adding them as "Telephone Numbers" in FritzBox. Except I can't seem to get it to work.

Here's my settings on the Fritz!Box. I'm just trying using the default extension on Incredible at the moment.

Telephone provider: Other
Telephone Number for Registration: 701 (extension in asterisk)
Internal Telephone Number in the FRITZ!Box: 701 (not sure I understand this field tbh)
Username: 701
Password: ****
Registrar: 192.168.178.55

It doesn't connect and the Fritz event log says "Registration of Internet telephone number 701 failed. Reason for error: Remote site not responding. Timeout."

There's nothing obvious in the asterisk logs, it's almost as if the connection is being rejected by the firewall on IncrediblePBX. I can connect to the same extension using a softphone, so it's allowed to access within the network. I can see that other people have gotten this to work, so I must just be missing something. Does anyone have any hints?
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Have you whitelisted the IP address of your FritzBox on Incredible PBX: /root/add-ip fritz fritz-ip-address
 

CyberneticianDave

New Member
Joined
Mar 9, 2018
Messages
10
Reaction score
1
Quick thought, I have a feeling the Fritz box may use some reserved IP addresses for the SIP and DECT handsets. So the request may not be coming from the IP I'm expecting. It's there any way to see the failed requests to the server?
 

CyberneticianDave

New Member
Joined
Mar 9, 2018
Messages
10
Reaction score
1
So I tried iptables -I INPUT 1 -j LOG but I don't ever see the requests hitting the pbx server. So I'm clearly doing something wrong at the fritzbox end. Back to the drawing board.
 

Dr. Kupka

New Member
Joined
Jul 3, 2013
Messages
22
Reaction score
7
You have to put in the Fritzbox TRUNK (!) settings (section PEER Details AND as well USER Details):

Code:
qualifyfreq=600

EXTENSIONS settings:

qualifyfreq: 600

Restart Fritzbox.
 

CyberneticianDave

New Member
Joined
Mar 9, 2018
Messages
10
Reaction score
1
You have to put in the Fritzbox TRUNK (!) settings (section PEER Details AND as well USER Details):

Code:
qualifyfreq=600

EXTENSIONS settings:

qualifyfreq: 600

Restart Fritzbox.

Happy to try that, but I'm able to connect to the Fritzbox as a trunk, it's using the Fritzbox as an extension on the asterisk box in struggling with. The requests from the Fritzbox don't seem to be reaching the asterisk box at all.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Have you tried disabling the firewall temporarily to see if you can connect from extensions??
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
If it works, look in /var/log/asterisk/full and decipher the IP addresses of the extensions and then WhiteList those additional addresses. Son't forget to restart IPtables!!
 

CyberneticianDave

New Member
Joined
Mar 9, 2018
Messages
10
Reaction score
1
Great news. I think it's down to the use of port 5060.

So I had been testing with the default chan_sip extension, but I decided to try with one of the pjsip extensions I had created. I can't remember why I thought it would be different, but it was.

I got some messages in the log, at last, but unfortunately not good ones. I started off with something like: AOR ‘401’ not found for endpoint ‘asterisk-fritzbox’ which lead me to changing the PJSIP setting endpoint_identifier_order to username,ip,anonymous, which allows the fritzbox to make an attempt at registering. Great!

The reason I'm relatively confident it's the port number is that changing the PJSIP port to 5060 returns me to the previous state of hearing nothing from the fritzbox.

Unfortunately I'm now stuck again, I'm now getting: res_pjsip/pjsip_distributor.c: Request 'REGISTER' from '<sip:[email protected]>' failed for '192.168.178.1:5060' (callid: [email protected]) - Failed to authenticate

This, as far as I can tell from my googling, seems to be because the fritzbox is requesting from port 5060 and PJSIP is on 5061. I'm a bit stuck now, I can't think of any way around that. Fritzbox won't talk to asterisk on 5060, but it also won't allow the selection of another port, apparently.

You've all been a great help so far. Got any ideas how I can get around this one?
 

CyberneticianDave

New Member
Joined
Mar 9, 2018
Messages
10
Reaction score
1
SUCCESS!

I deleted the internet telephone provider and re-added it as a "SIP trunking with various numbers" (but only added the single number). Hey presto, it connects!

Now to add all the other extensions.

Thanks so much for all the help guys, you really are the best asterisk forum I've ever come across!
 

Members online

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top