[Asterisk-Users] sip registration problems

Juha Heinanen jh at lohi.eng.song.fi
Sat Apr 12 09:11:36 MST 2003


Mark Spencer writes:

 > Instead, I sugest implementing it this way:
 > 
 > start-of-uri[:password[:authusername]]@host[/contact]
 > 
 > with the []'s being used solely to indicate optional fields.

fine with me.

 > If we're doing to/from that way, then agreed.  In CVS.  By the way, the
 > logic of using IP's was to reduce the number of gethostbyname()'s required
 > at the other side.  All examples in 3261 seem to use hostnames, but is
 > this a requirement, or even desirable?  Changing this throughout SIP and
 > not just in the REGISTER would also be extremely difficult.

i'm not sure if using names instead of addresses is a requirement or
just a common convention, but if ip address are used in the host part of
to/from uris, then the proxy can only serve one domain.

 > > 4) when asterisk gets another 401 back, it keeps on trying forever and
 > >    thus causing big stress to the network and the proxy.  if
 > >    registration fails, asterisk should wait for a while before trying
 > >    again.
 > 
 > It only retries immediately if again it is given authentication info.  It
 > will retry then again, 10 seconds following.  Anyway I've modified it to
 > (hopefully) only attempt up to two immediate re-auths, and then also
 > increased the retransmission time in case of a failed auth to 20 seconds.
 > (commited to CVS)  Sound reasonable?

the registrar always responds to a register request (either with 200 ok
or with 401).  rfc 3261 says:

  A UAC MUST NOT re-attempt requests with the credentials that have just
  been rejected (though the request may be retried if the nonce was
  stale).

the behavior you suggest is ok with me as long as the re-attempts are
not done frequently.

-- juha




More information about the asterisk-users mailing list