[Devel] duplicated register requests

Juha Heinanen jh at tutpro.com
Sun Sep 18 19:36:23 CEST 2005


today when i added some debug output to register processing, i noticed a
very strange thing.  it looks like cvs HEAD openser is internally duplicating
register requests.  i tried with very basic configuration

route [1] { # main routing logic

  if (is_uri_host_local()) {
    if (is_method("REGISTER")) {
	xlog("L_ALERT", "Received REGISTER for <$tu> with CSeq <$cs>\n");
	if (!radius_www_authorize("")) {
	  xlog("L_ALERT", "LOG: Request REGISTER for <$tu> is unauthorized\n");
	  www_challenge("", "1");
  	  exit;
	};
	xlog("L_ALERT", "LOG: Request REGISTER for <$tu> is authorized\n");
	if (is_present_hf("Authorization")) {
  	  xlog("Saving with authorization\n");
	};
	if (!save("location")) { ...

ethereal on "all interfaces" as well as kphone's debug output shows the
following four packets as expected:

- register without Authorization header
- 401
- register with Authorization header
- 200

however, debug log shows both register requests twice:

Sep 18 20:31:21 rautu /usr/sbin/ser[8277]: Received REGISTER for <sip:+35862345600 at test.fi> with CSeq <6707>
Sep 18 20:31:21 rautu /usr/sbin/ser[8277]: LOG: Request REGISTER for <sip:+35862345600 at test.fi> is unauthorized
Sep 18 20:31:21 rautu /usr/sbin/ser[8275]: Received REGISTER for <sip:+35862345600 at test.fi> with CSeq <6708>
Sep 18 20:31:21 rautu /usr/sbin/ser[8275]: LOG: Request REGISTER for <sip:+35862345600 at test.fi> is authorized
Sep 18 20:31:21 rautu /usr/sbin/ser[8275]: Saving with authorization
Sep 18 20:31:21 rautu /usr/sbin/ser[8277]: Received REGISTER for <sip:+35862345600 at test.fi> with CSeq <6707>
Sep 18 20:31:21 rautu /usr/sbin/ser[8277]: LOG: Request REGISTER for <sip:+35862345600 at test.fi> is unauthorized
Sep 18 20:31:21 rautu /usr/sbin/ser[8275]: Received REGISTER for <sip:+35862345600 at test.fi> with CSeq <6708>
Sep 18 20:31:21 rautu /usr/sbin/ser[8275]: LOG: Request REGISTER for <sip:+35862345600 at test.fi> is authorized
Sep 18 20:31:21 rautu /usr/sbin/ser[8275]: Saving with authorization

any idea how that is possible or is this a bug in openser?

-- juha



More information about the Devel mailing list