Asterisk ports

Home » Asterisk Users » Asterisk ports
Asterisk Users 13 Comments

Shouldn’t Asterisk be listening on UDP port 5060?

I’m working with an Asterisk installation running in Ubuntu. Asterisk is running but
non of the phone are connecting. I ran netstat -a and I didn’t see 5060. Am I
supposed to see something listening?

Thank you,

Gary

13 thoughts on - Asterisk ports

  • On 2 Dec 2010 at 15:11, Danny (Danny Nicholas ) commented
    about RE: [asterisk-users] Asterisk ports:

    href=”mailto:asterisk-users-bounces@lists.digium.com”>asterisk-users-bounces@lists.digium.com
    Thank you for the reply.

    Does this look correct? I don’t know what port the sip phones are supposed to be
    communicating on.

    tcp 0 0 0.0.0.0:5038 0.0.0.0:* LISTEN 5382/asterisk
    tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 5382/asterisk
    tcp 0 0 0.0.0.0:8088 0.0.0.0:* LISTEN 5382/asterisk
    udp 0 0 0.0.0.0:2727 0.0.0.0:* 5382/asterisk
    udp 0 0 0.0.0.0:4520 0.0.0.0:* 5382/asterisk
    udp 0 0 0.0.0.0:4569 0.0.0.0:* 5382/asterisk
    unix 2 [ ACC ] STREAM LISTENING 18059 5382/asterisk
    /var/run/asterisk.ctl
    unix 2 [ ACC ] STREAM LISTENING 20522 5768/fast-user-swit
    /tmp/orbit-docfxit/linc-1688-0-54225d8adde37
    unix 2 [ ] DGRAM 32588 5382/asterisk
    unix 3 [ ] STREAM CONNECTED 20729 5768/fast-user-swit
    unix 3 [ ] STREAM CONNECTED 20728 5768/fast-user-swit
    unix 3 [ ] STREAM CONNECTED 20727 5768/fast-user-swit
    /tmp/orbit-docfxit/linc-1688-0-54225d8adde37
    unix 3 [ ] STREAM CONNECTED 20539 5768/fast-user-swit
    /tmp/orbit-docfxit/linc-1688-0-54225d8adde37
    unix 3 [ ] STREAM CONNECTED 20526 5768/fast-user-swit
    unix 3 [ ] STREAM CONNECTED 20525 5768/fast-user-swit
    /tmp/orbit-docfxit/linc-1688-0-54225d8adde37
    unix 3 [ ] STREAM CONNECTED 20520 5768/fast-user-swit
    unix 3 [ ] STREAM CONNECTED 20508 5768/fast-user-swit

    Thank you,

    Gary

  • Thank you for the reply.

    On 2 Dec 2010 at 16:23, Jeff (Jeff LaCoursiere ) commented
    about Re: [asterisk-users] Asterisk ports:

    I don’t see this. That could certainly be why the phones are connecting. Why
    wouldn’t that port be listening?

    Thank you,

    Gary

  • I don’t have access to a ‘1.4’ instance right now, but ‘sip show settings’
    works in 1.2 and 1.6 so I’m guessing it should work in 1.4 as well.

    You may have an error that prevents the SIP channel driver from loading.
    What do you get with ‘unload chan_sip.so’ followed by ‘load chan_sip.so’?

  • Thanks for the reply.

    On 2 Dec 2010 at 14:11, Steve (Steve Edwards )
    commented about Re: [asterisk-users] Asterisk ports:

    In sip.conf bindport = 5060

    ‘Sip show settings’ doesn’t work in 1.4.22

    I have re-booted this machine. What else could I look for as to why UDP 5060 isn’t
    listening?

    Thanks,

    Gary

    href=”mailto:sedwards@sedwards.com”>sedwards@sedwards.com Voice: +1-760-468-3867 PST

  • href=”mailto:sedwards@sedwards.com”>sedwards@sedwards.com      Voice: +1-760-468-3867 PST

    Another question to add: Is SIP working, is chan_sip loaded? If your
    SIP endpoints are not working, try running something simple like “sip
    show peers”…if you get a message about no such command existing, SIP
    is not loading 😉

    Cheers,
    Sherwood McGowan

  • Thanks for the reply.

    On 2 Dec 2010 at 15:57, Steve (Steve Edwards )
    commented about Re: [asterisk-users] Asterisk ports:

    You get extra points today. I think you found where the problem is.
    It found /etc/asterisk/sip.conf
    Warning parse error: No category context for line 1 of /etc/asterisk/sip.conf
    Unable to load config sip.conf.

    This is what is in sip.conf.
    [authentication]

    [general]
    context = default
    allowoverlap = no
    bindport = 5060
    bindaddr = 0.0.0.0
    srvlookup = yes
    limitonpeers = yes
    allow = all
    allowguest=yes

    What doesn’t it like?

    Thanks,

    Gary

    href=”mailto:sedwards@sedwards.com”>sedwards@sedwards.com Voice: +1-760-468-3867 PST

  • Yes. Unless configured otherwise, that’s the SIP port. It’s set in
    sip.conf.

    What does ‘sip show settings’ show? The first 2 settings (1.6.2.5) should
    be:

    UDP SIP Port: 5060
    UDP Bindaddress: 0.0.0.0

    unless you know what you’re doing.

  • Running out of clues here 🙂

    I can load the above fine in my 1.2 instance. Any chance the file was
    edited on Windows and needs to be ‘unixfied?’

    What does ‘hexdump -C sip.conf’ look like?

    Does commenting (‘;’) out line 1 change anything?

  • Another thought…

    Asterisk can be started with a command line option that specifies the path
    to it’s configuration file. The default is /etc/asterisk/asterisk.conf.

    Does ‘ps -aef | grep asterisk’ show the ‘-C’ option being used?

    Also, Asterisk’s configuration file can specify where (‘astetcdir’) it
    should look for sip.conf.

    I use these feature to keep each of my client’s configuration files in
    separate directories, but all on the same development box.

  • Thank you very much for the reply.

    On 2 Dec 2010 at 17:06, Steve (Steve Edwards )
    commented about Re: [asterisk-users] Asterisk ports:

    This fixed the problem. There was some garbage in line 1.
    You are great. Thank you very much.

    Gary

    href=”mailto:sedwards@sedwards.com”>sedwards@sedwards.com Voice: +1-760-468-3867 PST