on which port my asterisk software is running [closed]
Asked Answered
C

3

6

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

Carpo answered 16/2, 2013 at 6:24 Comment(0)
M
3

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

For example:

[general]
port = 5060
bindaddr = 0.0.0.0
context = error
qualify=no
srvlookup=yes
Miticide answered 16/2, 2013 at 20:53 Comment(0)
D
7

Asterisk supports more Protocols than SIP and IAX2, but these Ports are the typical Voice-Protocol Ports and may get forwarded from your Router (Firewall) to the Asterisk Server (because of NAT):

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

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

lsof -n -i -P

You may find additional ports, based on your 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 autoloaded and disabled with noload => modulename.so in modules.conf.

Diatomaceous answered 17/2, 2013 at 13:35 Comment(0)
M
3

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

For example:

[general]
port = 5060
bindaddr = 0.0.0.0
context = error
qualify=no
srvlookup=yes
Miticide answered 16/2, 2013 at 20:53 Comment(0)
S
3

I always use netstat command as it is a good option to understand all the ports opened by Asterisk process netstat -anp | grep asterisk

Strawworm answered 12/9, 2014 at 8:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.