[Home]

Summary:ASTERISK-14009: externip is ignored for Audio unless localnet is defined
Reporter:Michael Rack (rcrack2k)Labels:
Date Opened:2009-04-23 14:17:46Date Closed:2011-06-07 14:07:19
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) audio-setup.log
Description:As described in http://bugs.digium.com/view.php?id=8821 the same issue is existing in Asterisk 1.6.0.9.

My Asterisk-Server is multihomed and have 3 public routed ip-addresses. Two IP-Addresses assigned static and once dynamic.

I need to select the dynamic ip-address, because my ISP on the other side accepts REGISTER, INVITE and so on only from the Interface thats connected to my ISP.

[general]
externip=95.xx.224.157
nat=no

I didn't define a localnet property.
I tryed to switch matchexterniplocally between yes and no, but no effect.

After define an localnet-entry with 91.2xx.12.0/24 the Audio-Setup-IP-Address works as expected.

How can i allways set my IP-Address for any communication SDP / Messaging to the externip-Address?

Thanks.
Michael Rack.
Comments:By: Leif Madsen (lmadsen) 2009-04-23 15:14:33

I'm not sure if this is a configuration issue or not, so I'm assigning to file since he fixed 8821 originally it seems.

By: Michael Rack (rcrack2k) 2009-04-24 02:31:53

To get more hint on the network-configuration:

wan1 - IP-Address: 95.90.224.157/23 (dynamic assigned IP-Address)
wan2 - IP-Address: 91.205.12.10/30 (static assigned IP-Address)
vpn1 - IP-Address: 91.205.12.2/32 (static assigned IP-Address)

Default-Route is dynamic an will be selected by BGP4-Routing for wan2 and vpn1. Interface wan1 is only in use to route VPN- and SIP-Traffic.

Asterisk have to send traffic through wan1 (externip=95.90.224.157). My Linux-Policy-Routing allways routes traffic through that interface where SRC-IP-Address is matching, else traffic is routed via default-gateway.

A feature such as "interface=wan1" were recommend. Asterisk should take the ip-address from the interface and take this for SIP-/ RDP-Communications and ip-header creation...

The interface-name should be defined in peer-section also.

Thanks.
Michael.

By: Joshua C. Colp (jcolp) 2009-04-24 08:27:08

Currently you can achieve this by having chan_sip bind to the specific IP address you want to use, otherwise it binds to all and has to guess what IP address to use in the messages. There is currently no way to bind to multiple IP addresses and have each message contain the correct IP address. You can only bind to one.