anchor.diff:      {ok, MyHostnames} = yxa_config:get_env(pstngatewaynames),
       lists:member(LChost, MyHostnames).
   
  +
  +%%--------------------------------------------------------------------
  +%% Function: first_route_is_pstngateway(Header)
  +%%           Header = keylist record()
  +%% Descrip.: Check if there is a Route-header in Header, and if it is
  +%%           then check if the first Route matches one of our PSTN
  +%%           gateways hostnames.
  +%% Returns : true  |
  +%%           false
  +%%--------------------------------------------------------------------
  +first_route_is_pstngateway(Header) ->
  +    case keylist:fetch('route', Header) of
  +	[FirstRoute | _] ->
  +	    [FirstRouteParsed] = contact:parse([FirstRoute]),
  +	    RouteURL = sipurl:parse(FirstRouteParsed#contact.urlstr),
  +	    is_pstngateway(RouteURL#sipurl.host);
  +	_ ->
  +	    false
  +    end.
   
   %%--------------------------------------------------------------------
   %% Function: request_to_sip(Request, Origin, THandler)
  
positive.code: 		    %% Use configured sipproxy but exchange user with user from Request-URI
  		    {proxy, ProxyURL#sipurl{user=User, pass=none}};
  		none ->
  		    %% No ENUM and no (valid) SIP-proxy configured, return failure so
  		    %% that the PBX on the other side of the gateway can fall back to
  		    %% PSTN or something
  		    {ok, Status} = yxa_config:get_env(pstnproxy_no_sip_dst_code),
  		    {reply, Status, "No destination found for number " ++ User}
  	    end
  
negative.code: 	true ->
  	    me;
  	false ->
  	    route_request2(Origin#siporigin.addr, Request, THandler, LogTag)
      end.
  
  route_request2(FromIP, Request, THandler, LogTag) ->
      ToHost = (Request#request.uri)#sipurl.host,
      case is_pstngateway(FromIP) of
  	true ->
  	    logger:log(debug, "Routing: Source IP ~s is PSTN gateway, route to SIP proxy", [FromIP]),
  