Solved

Asterisk SIP Registration Issues

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

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…
Almost all Internet protocol telephones have built-in switches at the back that allow you to connect your personal computer to one port and use the other port to connect your phone to to a Cisco switch.   Why we need to connect the PC to the pho…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 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