Solved

Asterisk SIP Registration Issues

Posted on 2008-10-31
2
1,155 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
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 34

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

The Zaptel people (www.zaptel.com) got kind of annoyed with the fact that they were getting bombarded with searches for the zaptel driver system for Asterisk (not to mention they own the trademark on zaptel). So, they kindly requested that Digium ch…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

708 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

14 Experts available now in Live!

Get 1:1 Help Now