Summary:ASTERISK-00022: Registration-requests originated from chan_sip don't use the source-IP specified as "bindaddr".
Reporter:oliver (oliver)Labels:
Date Opened:2003-07-28 08:00:24Date Closed:2008-01-15 14:31:57.000-0600
Versions:Frequency of
Description:I'm experiencing a problem with chan_sip on a multi-homed machine.  
The machine has 1 interface to the rest of the world and 1 interface
on a local network.  The local network has public IP-addresses, though,
and the IP-addresses of both interfaces are reachable from the outside
world, but by default, outgoing traffic from that machine to the outside
world will have the IP-address of the interface the default-route points
to as it's source, which is the one with the outside world behind it,

I've set the bind-address in "sip.conf" to the IP-address of the interface
on the local network, because I want to force it to only use that interface's
IP-address.  This works great for binding only to that IP-address and I can
even make outgoing calls, but when registering to a remote SIP-provider,
chan_sip seems to use the IP-address of the wrong interface (the one the
default-route points to) as the source in it's registration-requests, so
as soon as a call comes in from that SIP-provider, it's sent to that
IP-address and fails, as chan_sip isn't listening on it.  If I remove the "bindaddr" to make chan_sip listen on all IP-addresses of the machine, calls come in as expected.
BTW: The remote SIP-provider is FWD in this case.


Asterisk CVS-07/27/03-13:44:14.
Linux 2.4.21, RH9 base-system.

More info available on request.
Comments:By: oliver (oliver) 2003-07-28 08:17:36

More info: It seems to be using the wrong IP-address in the "Via:" and "Contact:"-headers during registration.  I suggest changing it to use the "bindaddr" there, if specified.

edited on: 07-28-03 08:06

By: Mark Spencer (markster) 2003-08-14 23:31:12

Done, please confirm

By: oliver (oliver) 2003-08-15 06:40:12

Hey Mark,

Seems to be OK now.  Thnx!  You can close this ticket.

By: Digium Subversion (svnbot) 2008-01-15 14:31:57.000-0600

Repository: asterisk
Revision: 1338

U   trunk/apps/app_agi.c
U   trunk/apps/app_enumlookup.c
U   trunk/apps/app_festival.c
U   trunk/apps/app_queue.c
U   trunk/apps/app_voicemail2.c
U   trunk/channels/chan_sip.c
U   trunk/channels/chan_zap.c
U   trunk/codecs/ilbc/FrameClassify.c
U   trunk/codecs/ilbc/LPCdecode.c
U   trunk/codecs/ilbc/LPCencode.c
U   trunk/codecs/ilbc/StateConstructW.c
U   trunk/codecs/ilbc/StateSearchW.c
U   trunk/codecs/ilbc/anaFilter.c
U   trunk/codecs/ilbc/createCB.c
U   trunk/codecs/ilbc/doCPLC.c
U   trunk/codecs/ilbc/enhancer.c
U   trunk/codecs/ilbc/filter.c
U   trunk/codecs/ilbc/gainquant.c
U   trunk/codecs/ilbc/getCBvec.c
U   trunk/codecs/ilbc/helpfun.c
U   trunk/codecs/ilbc/hpInput.c
U   trunk/codecs/ilbc/hpOutput.c
U   trunk/codecs/ilbc/iCBConstruct.c
U   trunk/codecs/ilbc/iCBSearch.c
U   trunk/codecs/ilbc/iLBC_decode.c
U   trunk/codecs/ilbc/iLBC_encode.c
U   trunk/codecs/ilbc/lsf.c
U   trunk/codecs/ilbc/packing.c
U   trunk/codecs/ilbc/syntFilter.c
U   trunk/pbx/pbx_gtkconsole.c

r1338 | markster | 2008-01-15 14:31:57 -0600 (Tue, 15 Jan 2008) | 8 lines

ASTERISK-68 - Should eliminate probs on VMWI
ASTERISK-37 - Dynamic add survives reload
ASTERISK-69 - Make festival honor its arguments
ASTERISK-89 - Make events on FXO interfaces more logical
ASTERISK-22 - Prefer "bindaddr" to logical address for registrations
??? - Record crashes AGI