Solved

Asterisk SIP Registration Issues

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Ever wanted to query Cisco Call Manager CDR records from MS SQL Server? Here's how! CUCM can be configured to upload a CDR file to a given FTP server every minute. This article will show you how to set this up, schedule the import of this data an…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

911 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

24 Experts available now in Live!

Get 1:1 Help Now