Solved

Asterisk SIP Registration Issues

Posted on 2008-10-31
2
1,178 Views
Last Modified: 2013-11-12
We have an Asterisk-based PBX system inside a firewall that has two Internet connections. The main Internet connection has an IP of 123.123.123.123 (just for the purposes of this posted question), and the backup connection has 456.456.456.456.

Users at home with softphones (X-Lite, for example) try to connect to the PBX via the backup connection, and registration is successful... sort of. I used WireShark to dump the packets during the SIP registration, and it looks like this: (all the communication is between my IP and the 456.456.456.456 IP)

1. X-Lite asks to be registered.
2. PBX says that it's unauthorized.
3. X-Lite provides authorization info.
4. PBX says "OK" and sends an "OPTIONS" instruction, but tells X-Lite to use the 123.123.123.123 instead of 456.456.456.456.

Here's the excerpt from that packet:
Contact: <sip:Unknown@123.123.123.123:41200>

I -THINK- this should be:
Contact: <sip:Unknown@456.456.456.456:41200>

I think X-Lite is being told to use the 123.123.123.123 address, so when it places calls, it's trying to connect to that IP instead of 456.456.456.456. Packets to 123.123.123.123 wouldn't be routed properly back to the PBX, so communication just doesn't go anywhere at this point.

My question: How do I get Asterisk to change that initial Contact packet or how do I correct the IP address in it? Does Asterisk try to go find its external IP address at startup or something, and then keeps it in memory?
0
Comment
Question by:gr8gonzo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 36

Accepted Solution

by:
grblades earned 500 total points
ID: 22856185
By default asterisk uses the IP address assigned to the interface the registration came in on.
Some firewalls (cisco pix/asa for example) support SIP and will automatically change the contents of packets to the fix the ip address.
Check to make sure that the routing is correct and that outbound traffic is going via the backup connection.

In asterisks sip.cong configuration file there are options externip= and localnet= where you can specify the local IP range and the asterisk box's real external IP. If asterisk detects the connection is not from a local IP then it will use the external ip configured instead of the ip address of its external interface.
Perhaps this is already configured but with 123.123.123.123 by mistake.
0
 
LVL 35

Author Comment

by:gr8gonzo
ID: 23003364
That technically answers the question. However, it didn't solve the problem. Seems like it's an issue with the PBX and the softphone both being behind different NATs. We switched to using IAX2 protocol and a IAX-compatible softphone (Zoiper) and it worked great.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

The point of this post is to give you a copy/paste installation solution to setting up Asterisk 1.6 on Ubuntu 9.04 (or similar) server. # Setup the system apt-get install subversion apt-get install make apt-get install linux-source kernel-p…
So you think no one can listen in on your VOIP conversations, eh? Well... if you haven't setup Secure Real Time Transport (SRTP), your voice communications can be hacked into by just about anyone! First, let's talk about the intended audience for…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

707 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