[sr-dev] about registrar outbound modes

Juha Heinanen jh at tutpro.com
Sat Mar 9 09:33:52 CET 2013


> i would like to change mode 1 as follows:
> 
>    If set to 1 then this module will accept REGISTER requests that do not
>    contain a Supported: header with the outbound options-tag. The 200 OK
>    response to REGISTER requests that this module generates will contain a
>    Require: or Supported: header with the outbound options tag
>    depending on if REGISTER requests contain or do not contain,
>    respectively, a Supported: header with the outbound options-tag.

the patch below implements this change.  is it ok that i commit it (plus
the above change to README)?

-- juha

*** /usr/src/orig/sip-router/modules/registrar/reply.c	2013-02-06 10:56:37.000000000 +0200
--- reply.c	2013-03-09 10:25:15.000000000 +0200
***************
*** 658,668 ****
  				if (add_flow_timer(_m) < 0)
  					return -1;
  			}
- 			/* Fall-thru */
- 		case REG_OUTBOUND_SUPPORTED:
  			if (add_supported(_m, &outbound_str) < 0)
! 				return -1;
  			break;
  		}
  		break;
  	case R_OB_UNSUP:
--- 658,675 ----
  				if (add_flow_timer(_m) < 0)
  					return -1;
  			}
  			if (add_supported(_m, &outbound_str) < 0)
! 			    return -1;
  			break;
+ 		case REG_OUTBOUND_SUPPORTED:
+ 		    if ((parse_supported(_m) == 0) &&
+ 			(((struct supported_body *)_m->supported->parsed)->supported_all & F_SUPPORTED_OUTBOUND)) {
+ 			if (add_require(_m, &outbound_str) < 0)
+ 			    return -1;
+ 		    }
+ 		    if (add_supported(_m, &outbound_str) < 0)
+ 			return -1;
+ 		    break;
  		}
  		break;
  	case R_OB_UNSUP:



More information about the sr-dev mailing list