anchor.diff:  			PSTNgateway1 = lists:nth(1, sipserver:get_env(pstngatewaynames)),
   			logger:log(debug, "pstnproxy: Routing request to default PSTN gateway ~p", [PSTNgateway1]),
   			case sipurl:parse_url_with_default_protocol("sip", PSTNgateway1) of
  -			    GwURL when record(GwURL, sipurl) ->
  +			    GwURL when is_record(GwURL, sipurl) ->
   				NewURI2 = GwURL#sipurl{user=DstNumber, pass=none},
   				{NewURI2, Header};
   			    _ ->
  -				logger:log(error, "pstnproxy: Failed parsing configuration value 'pstngatewaynames' (~p)",
  -					   [PSTNgateway1]),
  +				logger:log(error, "pstnproxy: Failed parsing configuration value "
  +					   "'pstngatewaynames' (~p)", [PSTNgateway1]),
   				{URI, Header}
   			end
   		end;
  
positive.code: 
  
  %%--------------------------------------------------------------------
  %% Function: routeRequestToPSTN(FromIP, ToHost, THandler, LogTag)
  %%           FromIP   = string()
  %%           ToHost   = string(), Host part of Request-URI
  %%           THandler = term(), server transaction handle
  %%           LogTag   = string(), prefix for logging
  %% Descrip.: Determines if we should route this request to one of
  %%           our PSTN gateways or not.
  %% Returns: true  |
  %%          false
  %%--------------------------------------------------------------------
  routeRequestToPSTN(FromIP, ToHost, THandler, LogTag) ->
      case pstngateway(FromIP) of
  	true ->
  	    logger:log(debug, "Routing: Source IP ~s is PSTN gateway, route to SIP proxy", [FromIP]),
  	    false;
  	_ ->
  	    IsLocalHostname = localhostname(ToHost),
  	    IsPstnGatewayHostname = pstngateway(ToHost),
  
negative.code:     %% statelessly.
      logger:log(normal, "pstnproxy: ~s -> Forwarding ACK received in core statelessly",
  	       [LogStr]),
      transportlayer:stateless_proxy_request("incomingproxy", Request),
      ok;
  
  %%
  %% Anything except ACK
  %%
  request(Request, Origin, _LogStr) when is_record(Request, request), is_record(Origin, siporigin) ->
      Method = Request#request.method,
      THandler = transactionlayer:get_handler_for_request(Request),
      LogTag = get_branch_from_handler(THandler),
      case route_request(Request, Origin, THandler, LogTag) of
  	pstn ->
  	    logger:log(debug, "~s: pstnproxy: Route request to PSTN gateway", [LogTag]),
  	    AllowedMethods = ["INVITE", "ACK", "PRACK", "CANCEL", "BYE", "OPTIONS"],
  	    case lists:member(Method, AllowedMethods) of
  		true ->
  		    request_to_pstn(Request, Origin, THandler, LogTag);
  		_ ->
  		    logger:log(normal, "~s: pstnproxy: Method ~s not allowed for PSTN destination",
  			       [LogTag, Method]),
  		    ExtraHeaders = [{"Allow", AllowedMethods}],
  		    transactionlayer:send_response_handler(THandler, 405, "Method Not Allowed", ExtraHeaders)
  	    end;
  	sip ->
  	    logger:log(normal, "~s: pstnproxy: Route request to SIP server", [LogTag]),
  	    request_to_sip(Request, Origin, THandler);
  	me ->
  	    request_to_me(THandler, Request, LogTag);
  	drop ->
  	    ok
      end,
      ok.
  
  