VirtualBox - FreePBX - Linphone, Not able to connect

Hello,

I’m a novice with FreePBX so excuse me in case I miss something obvious.

I have a FreePBX distro running on a VirtualBox, with the network configuration as a bridge:
The local IP of the FreePBX is 192.168.0.103 that I can access with the browser.

I have configured the FreePBX with a SIP Trunk provider(but that’s another part), my goal now is to do just outbound calls. But looks that Linphone does not connect to FreePBX.

– FreePBX configuration:

*Settings -> Asterix SIP settings -> General SIP settings TAB:
External address: the static ip address.
Local networks: 192.168.0.103 / 255.255.255.0

*Settings -> Asterix SIP settings -> SIP Legacy settings TAB:
Bind port: 5060

As well I created an extension and a outbound route.

– Linphone configuration

username: 415 (the extension name in FreePBX)
SIP domain: 192.168.0.103:5060 (I also tryed without the port)
password: the one in the extension
transport: UDP

As I try to connect it waits for connection but at the end appears the red warning triangle in Linphone, so I cannot debug much, any idea would be very appreciated.

Regards.

Hi @Miguelonido,
Could be Firewall or Fail2Ban blocking you. Pls check below settings.
1- Firewall Add your Local IP Address on TrustedNetwork.
→ PBX GUI → Connectivity → Firewall → Networks → Add Your LAN network → 192.168.0.0/24 → Select TRUSTED Network → Save
2- Fail2Ban Add your LAN Network.
Admin → System Admin → Intrusion Detection → White List : Add your LAN Network 192.168.0.0/24 → Save / Submit → Intrusion Detection : Press To Restart

Then try again.

1 Like

This should be 192.168.0.0 / 24

I don’t know what you mean here. Assuming that you have set up a pjsip extension (recommended), pjsip is already listening on port 5060 and you should leave Bind Port at 5160 so it doesn’t conflict.

If for some reason you want to use a chan_sip extension, I recommend leaving Bind Port at 5160 and setting SIP domain in Linphone to 192.168.0.103:5160

If you really want to use chan_sip on port 5060, then you must also change in pjsip settings Port to Listen on to something other than 5060.

Note that if you change any of the above settings, you must restart (not just reload) Asterisk.

1 Like

Hello, thanks @Stewart1 and @shahin,

after reading your comments I tried again changing the configuration(without luck):

  • My network:
    VirtualBox FreePBX running in bridged more with IP: 192.168.0.102

My FreePBX configuration:
(I deactivated the firewall for testing purposes)
(Also windows firewall deactivated, in the host machine)
(systen admin module is not activated so I guess fail2ban is neither)

This image has the screen shoots for all my configuration in the same order as the
points that I describe bellow.(I could not upload different images because the forum rules for new users).

  • Trunk config:
    I use CHAN_SIP Legacy.

  • Extension config:
    That is the secret that I use in the Linphone SIP config.

  • Asterisk configuration:

  • Linphone configuration, the same happens just hangs till appears the icon that
    tells that the connection failed:

Some log information in case it helps:

  • I logged into the console of asterisk(asterisk -r) and sip set debug on, I put a relevant screenshot, my guess is that this represents a communication in between the Linphone in the host machine(192.168.0.104:5060) to the FreePBX in the VM(192.168.0.102:5160)

And I see that Asterisk replied with a 401 unauthorized:
debug2

mmm… what do you think could be the reason of the unauthorized response? The credentials
that I use in Linphone are the ones in the extension as I mentioned before.

Any idea on how to proceed welcome.

Thanks!

After cleaning up the previous connections created in Linphone and changing the secret to one that I can type not paste, it works properly.

Thanks and regards.

Glad that you got it working. Regarding trunking providers, most do not require you to have an incoming number with them. Some allow you to send any caller ID, some require first verifying the number as yours, and some will send a number of theirs (which will give an error announcement to someone calling back).

If you are in US or Canada, this discussion may be useful:

1 Like

Got as well a verified caller ID working for an specific provider, call quality is looking quite good.

Thanks for the information, a lot to learn still about this technology :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.