Solved

Call Progress Ring Tones not being heard over WAN with Linksys SPA942 and Asterisk server

Posted on 2009-05-16
13
666 Views
Last Modified: 2013-11-12
I am not able to hear any call progress rings over the WAN on my Linksys spa942 IP Phone, to an asterisk 1.4.23 server.  I am able to hear the person who picks up and they are also able to hear me.  I am able to hear the dial tone before I dial.  The problem is while the call is being placed, until the other person picks up the phone, I do not hear any ringing in the head set.  I have proxy and outbound proxy enabled on the phone and have also tried the STUN server setting.  The phone rings normally when someone calls me on the Linksys spa942.

The problem does not occur if the Linksys phone is on the same LAN as the asterisk box.

There are NAT firewalls at both locations.

I have ports 5060 open on both firewalls, and have also tried opening 10000-20000

Any ideas??
0
Comment
Question by:jkockler
  • 6
  • 4
  • 3
13 Comments
 
LVL 32

Expert Comment

by:harbor235
Comment Utility


what codec are you using? Have you tried G729?

harbor235 ;}
0
 
LVL 4

Author Comment

by:jkockler
Comment Utility
Have not tried that yet... Where do I specify G729?  On the Linksys PAP2?
0
 
LVL 32

Expert Comment

by:harbor235
Comment Utility


You configure it on the Asterisk box

http://www.sureteq.com/blog/?p=65


harbor235 ;}
0
 
LVL 4

Author Comment

by:jkockler
Comment Utility
I tried different codecs but I do not think that is the issue.

I am almost certain the issue has something to do with NAT.  It only seems to effect the call progress tones but none the less here is what I found.

Originally this problem was only over the WAN but when I specified external and lan ip schemes in sip.conf , suddenly I was no longer able to hear call tones when calling from the same LAN as the asterisk server.  Remember this problem did not occur on the LAN with asterisk.  I am thinking I have something wrong in the external and internal ip settings in sip.conf
Here is what I have

externip = xx.xxx.xx.221 ;(substitute your public ip address)
localnet = 192.168.0.0/255.255.255.0 ;(substitute your lan subnet address)
nat=yes

I
0
 
LVL 32

Expert Comment

by:harbor235
Comment Utility
0
 
LVL 19

Accepted Solution

by:
feptias earned 500 total points
Comment Utility
Is this question relevant?
http://www.experts-exchange.com/Networking/Telecommunications/IP_Telephony/Asterisk_/Q_24415478.html

If not, can you collect a sip trace for the packets exchanged during call setup, until the point where the call is answered and speech is heard. I suggest using the "sip debug" mechanism in Asterisk. At the Asterisk CLI switch on the trace with "sip set debug" and switch it off with "sip set debug off". Post it here as a code snippet please.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 4

Author Comment

by:jkockler
Comment Utility
Thanks.  I will get that debug snippet.

Is there a way to get the sip debug to show a time-stamp?  I usually keep it on all the time, but it would be great if I could see what time everything happened.
0
 
LVL 19

Expert Comment

by:feptias
Comment Utility
Edit /etc/asterisk/logger.conf and add the following line (it may already be there, but commented out):
dateformat=%F %T
0
 
LVL 4

Author Comment

by:jkockler
Comment Utility
What do you mean by commented out?  Here is what I have in the logger.conf for the date

[general]
; Customize the display of debug message time stamps
; this example is the ISO 8601 date format (yyyy-mm-dd HH:MM:SS)
; see strftime(3) Linux manual for format specifiers
;dateformat=%F %T
0
 
LVL 19

Expert Comment

by:feptias
Comment Utility
"commented out" is programmer-speak for lines that have the semi-colon in front of them. In Asterisk conf files, the semi-colon marks that line as a comment line, and it is ignored by the Asterisk parser. What I meant was "remove the semi-colon" from that line:

[general]
; Customize the display of debug message time stamps
; this example is the ISO 8601 date format (yyyy-mm-dd HH:MM:SS)
; see strftime(3) Linux manual for format specifiers
dateformat=%F %T
0
 
LVL 4

Author Comment

by:jkockler
Comment Utility
Gotcha.  I commented it out but it still does not show the time stamp.  I reloaded and restarted asterisk after.  Any other ideas?

I actually was able to get this issue with the ringing resolved through opening up the rtp port range 10000-20000 on the asterisk side again.  That fixed it this time, maybe last time I did not wait long enough.

Is there anything wrong with keeping sip debugging enabled all the time?  Thanks!
0
 
LVL 19

Assisted Solution

by:feptias
feptias earned 500 total points
Comment Utility
I only enable sip debug during testing or when solving a problem. It is strongly recommended that any type of debug setting be disabled on production systems. The disadvantages of leaving sip debugging enabled all the time are:
1. Extra work for Asterisk
2. If you open the CLI (using asterisk -r) then the screen will just constantly be scrolling with "stuff" which makes it very difficult to run diagnostic commands such as "core show channels" or "sip show peers" etc.
3. If you are writing it to the log files then it will fill up disk space like crazy and you will have to use logrotate or something similar to keep the log files under control.

When debugging a problem I would try to focus it on a specific peer - sip set debug peer <peer_name>
I also often use a tool called "sipgrep" which runs from the Linux command prompt, not from the Asterisk CLI. sipgrep reports the SIP packets that match a specific string in the To or From headers so you don't get overwhelmed with data related to other calls on the system. It is also easy to pipe the output to a file.
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/utils/sipgrep/

In logger.conf you can configure it so the sip debug is sent to the /var/log/messages file and this must be the place where the time/date gets written (perhaps it does not get written to the console). To make it send sip debug to your log file, add the word "verbose" to the list of notifications for the messages log file:
[general]
dateformat=%F %T
...
[logfiles]
console => notice,warning,error
messages => notice,warning,error,verbose
...
0
 
LVL 4

Author Closing Comment

by:jkockler
Comment Utility
Thanks for all the extra info fepitas.  In case someone is having the same problem, this issue was actually resolved by opening ports 10000-20000 on the firewall where asterisk resides.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Implementing Avaya's One-X portal is pretty painless, until you want to deploy this to the Android and iPhone clients when these clients are outside of your network. The clients will also work within your local network. Here is our experience and so…
Even if you have implemented a Mobile Device Management solution company wide, it is a good idea to make sure you are taking into account all of the major risks to your electronic protected health information (ePHI).
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now