[Asterisk-Dev] Asterisk vs. kphone: Handling of the Via header

Otmar Lendl lendl at nic.at
Fri Aug 29 08:18:44 MST 2003


As other have reported before, it's not straight forward to get
kphone to properly register at an Asterisk server.
http://lists.digium.com/pipermail/asterisk-users/2003-March/009441.html

I've traced this a bit and have come to the following conclusion:

# ngrep REGISTER udp
U 193.80.224.82:32816 -> 193.171.3.9:5060
  REGISTER sip:193.171.3.9 SIP/2.0
  Via: SIP/2.0/UDP 193.80.224.82

U 193.171.3.9:5060 -> 193.80.224.82:32816
  SIP/2.0 407 Proxy Authentication Required..
  Via: SIP/2.0/UDP 193.80.224.82;received=193.80.224.82

kphone is sending from port 32816. Looking with netstat and
lsof shows that it expects its answers back at port 5060.

Asterisk's interpretation of the Via header (w/o port) is
to reply to the src port.

kphone seems to interpret the Via header w/o port as to mean
port 5060 for answers.

-------------

Then I tested kphone -p 10000, thus moving kphone from the
default port. Result:

U 193.80.224.82:32816 -> 193.171.3.9:5060
  REGISTER sip:193.171.3.9 SIP/2.0
  Via: SIP/2.0/UDP 193.80.224.82:10000

U 193.171.3.9:5060 -> 193.80.224.82:32816
  SIP/2.0 407 Proxy Authentication Required
  Via: SIP/2.0/UDP 193.80.224.82:10000

So: Asterisk is still sending the answers to the src port (32816)
instead of the port in the Via header.

-------------

A quick read of the SIP RFC gave me no fast answer on what the
correct behaviour is (only that I tend to agree with Mark that
SIP is a mess).

Is anybody here firm enough on SIP to give a definite answer on
which software needs patching?

/ol
-- 
< Otmar Lendl (lendl at nic.at) | nic.at Systems Engineer >



More information about the asterisk-dev mailing list