Solved

Elastix/Asterisk not open on port 5060

Posted on 2009-06-29
12
7,948 Views
Last Modified: 2013-11-12
I've recently setup Elastix, and setup extensions, etc - however when it comes to having Cisco IP phones, and a SIP Soft phone connecting to the Elastix box, it doesn't work. I was pulling my hair out trying to figure out what it was, but ended up checking if the port was actually open by telneting to it, and checking if the port was open on the server, and found out port 5060 was not open on the server:

[root@pbx asterisk]# lsof -i:5060
[root@pbx asterisk]#

[root@pbx asterisk]# netstat -napt | grep asterisk
tcp 0 0 0.0.0.0:5038 0.0.0.0:* LISTEN 8704/asterisk
tcp 0 0 127.0.0.1:5038 127.0.0.1:56084 ESTABLISHED 8704/asterisk
[root@pbx asterisk]#

[root@pbx asterisk]# netstat -napt | grep 5060
[root@pbx asterisk]#

I've restarted Asterisk several times via the command line, as well as reboot the entire server, but I'm not sure how to get it to listening on port 5060 so our Cisco 7960s can connect to it.

Does anyone know how I can fix this?
0
Comment
Question by:crucialx
12 Comments
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 24741403
Which OS is this ?...are you running SELinux ?
0
 

Author Comment

by:crucialx
ID: 24741425
I used the ISO from the Elastix website, 64bit: http://downloads.sourceforge.net/elastix/Elastix-1.5.2-stable-x86_64-bin-31mar2009.iso

From dmesg, it appears SELinux is not running:

SELinux:  Initializing.
SELinux:  Starting in permissive mode
selinux_register_security:  Registering secondary module capability
SELinux:  Registering netfilter hooks
SELinux:  Disabled at runtime.
SELinux:  Unregistering netfilter hooks
audit(1246291820.274:2): selinux=0 auid=4294967295 ses=4294967295
0
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 24741914
Check this out this PDF below, and make sure you didn't miss anything.  Setting up elastix should be pretty straightforward.  You should have to "do" anything to get it listending for SIP, other than create devices/extensions and assign the box an IP address..

http://elastixconnection.com/downloads/elastix_without_tears.pdf
0
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 24741931
0
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 24741935
To test your current setup, I would try using X-Lite from www.counterpath.com

http://www.counterpath.com/x-lite.html&active=4
0
 

Author Comment

by:crucialx
ID: 24741938
I've been following that exact document to get our Elastix server up and running, and it does not say anything about opening ports, so I'm not sure what the issue is!  
0
 

Author Comment

by:crucialx
ID: 24742049
xuserx2000, I've installed BOL SIPPhone (per the Elastix without Tears Guide) and when I try to connect it gives the error:

Log on failed! Server close the connection. (xxx@xxx.xxx.xxx.xxx)

Seems that it is not listening on those ports, however I can't seem to get it to work.  I've tried looking around the config files but can't figure out how to get them going.

If Elastix/Asterisk is working correctly, should I see the port open when using netstat?
0
 
LVL 19

Assisted Solution

by:feptias
feptias earned 150 total points
ID: 24743405
Asterisk uses the standard SIP port and protocol - i.e. UDP port 5060. You are looking for a TCP port in a listening state so you are not going to see it. Try "netstat -lun" instead. Telnet is not suitable as a tool for testing UDP connectivity, only TCP.

Asterisk does not offer support for SIP over TCP or TLS until version 1.6. Even in that version, the comment in sip.conf says "Note that the TCP and TLS support for chan_sip is currently considered experimental." Also note that TCP is disabled by default in v1.6.

Can your phones not use UDP as the SIP transport protocol? Perhaps they are, but you have some other error.
0
 
LVL 25

Assisted Solution

by:Ron Malmstead
Ron Malmstead earned 200 total points
ID: 24745711
Feptias is correct.  You can't telnet to 5060....

Aside from that,... as I said before...Elastix is straightforward....Install it and connect a standard SIP phone.  It really is that simple.  So...maybe there is some other issue at play here.

Please try to use the free x-lite softphone on a windows machine....I'm not familiar with the one  listed in that pdf.  Make sure Elastix box has an IP address on your network, and try to connect to it with x-lite.

Can you give some more details on your setup ?...maybe some screenshots of Elastix screens might help.
0
 

Accepted Solution

by:
crucialx earned 0 total points
ID: 24758901
I ended up re-installing Elastix because I couldn't figure out what was causing the SIP phones not to be able to connect to Asterisk.  After the re-install, it appears to be working now!
0
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 24758931
...well since you were setting up a new box, thats what we probably should have suggested earlier on.
Would have been a quicker fix.

Second attempt was easy though.... no ?
It's designed to be so easy a caveman can do it.  :)
0
 
LVL 2

Expert Comment

by:Mathiau
ID: 24892468
good info here!
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are no good configuration guides for HP-H3C router to LYNC on the web. :( Big statement, but we havent been able to find one yet. We did find the following document useful, but the information was not enough to use H3C router for use as a L…
As companies replace their old PBX phone systems with Unified IP Communications, many are finding out that legacy applications such as fax do not work well with VoIP. Fortunately, Cloud Faxing provides a cost-effective alternative that works over an…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question