chan_pjsip and chan_sip port

Hi,

In FreePBX 12 you got chan_sip AND chan_pjsip. I changed chan_sip to port 5060 and chan_pjsip to port 5061.

Now I got two extensions. One extension registred on port 5063 and the other extension is registred on port 5061. For a screenshot please go to:

http://yjy.be/Untitled.png

The extension 500 which is on the same port as chan_pjsip works fine and there are no problems with it.

My question is: Can this be a problem in the future that chan_pjsip and an extionsion are registred on the same port? In the asterisk -rvvv debug I do not see any problems.

Looking forward to your answers!

You are confused. Those are the “local ports” of the phones. In network operations there are two ports for every operation, a local port and a remote port. The requests from the phone comes from 5063 to 5060, what you see in asterisk is the port that asterisk will need to talk to the phone, so when asterisk sends a message out it goes to the phone on 5063 FROM 5060.

1 Like

To amplify something, the last sentence could read “… so when asterisk sends a message out it goes to the phone on {whatever the phone is using} FROM 5060”.

The phones basically connect to the “well known service” at either 5060 (if that’s how you configured your Asterisk server) or whatever port you specify for SIP (or PJ-SIP). When they send their request, they tell Asterisk “… and my port number is THIS”, where ‘THIS’ could literally be almost any port number. Some phones use 5060 (which is horrible from a security perspective) as the port on which THEY listen. Good phones will use a different port number every time they establish a connection.

2 Likes

@tm1000 @cynjut Thanks for sharing this information. I was confused by the information showed in FreePBX

It is all clear to me. Really appreciate sharing the knowledge!