FreePBX registration issue - new installation

Tags: #<Tag:0x00007f4f435ad928>

(Bridgecc) #1

I am new to this forum, so if I am in the wrong place I apologize.
I am on FreePBX v14 Distro on an Asterisk SuperMicro server all handsets are Sangoma S505

I need some guidance on FreePBX registering on port 5060 with my provider NexVortex and subsequent call registering and port traffic. NexVortex requires all registration and signaling on port 5060.

I was able to register two trunks correctly with them back in March when I did the initial installation.
Here is my registrations from the Asterisk CLI-
dcmpbx*CLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
px15 . nexvortex . com:5060 Y 225 Registered Fri, 04 Jun 2021 15:04:55
px11 . nexvortex . com:5060 Y 225 Registered Fri, 04 Jun 2021 15:04:55
2 SIP registrations.

So our trunks are registered correctly.

I thought communications were ok, however they contacted me and said that I was using the incorrect port (5160) for outgoing call signaling and registration attempts. We also are experiencing intermittent connection and audio issues on outgoing calls. Incoming everything seems fine.
I originally configured all extensions as CHAN_SIP and now realize that these are using port 5160 not 5060. This week, I tried a test and converted a single extension to PJ_SIP (deleted the CHAN_SIP extension, reset the Sangoma S505 to factory settings, created a NEW PJ_SIP extension, re-provisioned the handset and did some test calling - same results as before.

Here is a log entry from NexVortex support. From my NEW PJ_SIP extension (x305) I called my cell phone (925-260-5790), you can see the invite from our public IP is on 5160 to NexVortex

2021-06-03 20:18:34 +0000 : ->
INVITE sip:19252605790 @ SIP/2.0

2021-06-03 20:34:31 +0000 : ->
REGISTER sip:px11 . nexvortex . com SIP/2.0

Here is the AOR from the Sangoma-

Aor: 305 1
Contact: 305/sip:305 @ 1254da2843 Avail 7.731

ParameterName : ParameterValue

authenticate_qualify : false
contact : sip:305 @
default_expiration : 3600
mailboxes :
max_contacts : 1
maximum_expiration : 7200
minimum_expiration : 60
outbound_proxy :
qualify_frequency : 60
qualify_timeout : 3.000000
remove_existing : true
support_path : false
voicemail_extension :

Shows it is set up for communication on 5060.

So I thought that this test call from the PJ_SIP extension would show a call registration on port 5060.This is not the case. Can anyone point me to what might be causing this and how to correct it?
If you need more log/data please let me know.
Our firewall is set to no transformations and simple NAT policy (nowhere using port 5160). If it were transforming I am sure it would be a different port than 5160. I suspect it is in FreePBX and the extensions but at a loss as to where to start. I do have some log files from the calls but they are the FreePBX logs and not much use. I can do some firewall logs on the outgoing and see what is there if needed.
Thank you in advance for your assistance.

(David55) #2

Use “pjsip set logger on” and see where Asterisk is actually sending them. I’d be surprised if it wasn’t 5060.

(Jared Busch) #3

Your extensions using port 5160, 12345, or wtf ever, matter zero to your trunk.

Based on what you said, chan_pjsip seems to be on 5060 and chan_sip on 5160.

So make your trunk a chan_pjsip trunk. Problem solved.

(Dave Burgess) #4

Important ah-ha thing:

The port on your machine has nothing to do with the port on their machine. VOIP is largely UDP, so you send your traffic to whatever port they tell you to and they send the traffic to whatever port you tell them to.

There are two SIP Channel drivers, differentiated largely by age: Chan-SIP and PJ-SIP. They are different in your PC, but from a protocol perspective, people at the remote end see you are using “SIP” and are listening on “a port”, which in your case appears to be 5160.

As Jared pointed out, if you decide to use both SIP drivers, you will set up your channel drivers to listen on different ports. Currently, the defaults are 5060 for PJ-SIP and 5160 for Chan-SIP. Note that both of these are merely defaults, you can configure your SIP interface to listen on any port you want.

My recommendation is to simply remove the Chan-SIP driver. It is largely deprecated and really is just extra overhead. Since you are using Sangoma phones and connecting to a remote SIP provider, there’s no reason not to just go with PJ-SIP and disable Chan-SIP altogether. Look in the Advanced Settings tab to select which SIP drivers you want to use; it sounds like you are currently using “Both”.

(Bridgecc) #5

Hey Guys,
Thank you for the advice and pointing me to the settings-
Asterisk SIP Settings and then to Advanced settings.
of course my system was set to use both. I am understanding the communication flow better from your comments and appreciate it.
(extension < chan_sip or chan_pjsip > pbx < chan_sip or chan_pjsip> provider)

I just changed the Channel SIP setting to CHAN_PJSIP and will see how it goes.

As a follow up is there any reason or not to convert all my extensions from CHAN_SIP to CHAN_PJSIP or does it matter?
Thank you very much.

(David55) #6

If you don’t move them, you will have to use a non-standard port number, as you can’t bind the same port number to the interface for two different files.

(system) closed #7

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