Asterisk SIP Registration Issues
Posted on 2008-10-31
We have an Asterisk-based PBX system inside a firewall that has two Internet connections. The main Internet connection has an IP of 220.127.116.11 (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 18.104.22.168 instead of 456.456.456.456.
Here's the excerpt from that packet:
I -THINK- this should be:
I think X-Lite is being told to use the 22.214.171.124 address, so when it places calls, it's trying to connect to that IP instead of 456.456.456.456. Packets to 126.96.36.199 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?