Which port does my asterisk software run on?

Is there a way to find out which port my asterisk software is running on using the command line interface or any other way?

+4
source share
3 answers

In the sip.conf file located in /etc/asterisk/sip.conf , it will tell you which port it will run.

For instance:

 [general] port = 5060 bindaddr = 0.0.0.0 context = error qualify=no srvlookup=yes 
+3
source

Asterisk supports more protocols than SIP and IAX2, but these ports are typical voice protocol ports and can be redirected from your router (firewall) to the Asterisk server (due to NAT ):

  • UDP: 5060 SIP (sip.conf), newer TCP version support: 5060
  • UDP: 10000-20000 RTP (rtp.conf) for media stream, higher Portrange
  • UDP: 5036 IAX2

You can also check the asterisk (module) ports with:

lsof -n -i -P

You can find additional ports based on loaded modules (modules.conf) and configuration, for example TCP: 5038 (manager.conf).

List your modules with

asterisk -rx 'module show'

or for older versions: asterisk -rx 'show modules' .

Modules can be automatically loaded and disabled using noload => modulename.so in modules.conf.

+5
source

I always use the netstat command, as this is a good opportunity to understand all the ports that are open by the Asterisk netstat -anp | grep asterisk

+1
source

All Articles