anchor.diff:  
   %% @private
   websocket_init(_TransportName, Req, [AppId, Transp, Opts]) ->
  -    Timeout = nksip_lib:get_value(timeout, Opts),
  -    {{RemoteIp, RemotePort}, _} = cowboy_req:peer(Req),
  -    Transp1 = Transp#transport{remote_ip=RemoteIp, remote_port=RemotePort},
  -    {ok, Pid} = nksip_connection:start_link(AppId, Transp1, self(), Timeout),
  -    {ok, Req, #ws_state{conn_pid=Pid}}.
  +    WsProtos = case cowboy_req:parse_header(<<"sec-websocket-protocol">>, Req) of
  +        {ok, ProtList, Req2} when is_list(ProtList) -> ProtList;
  +        {ok, _, Req2} -> []
  +    end,
  +    case lists:member(<<"sip">>, WsProtos) of
  +        true ->
  +            Req3 = cowboy_req:set_resp_header(<<"sec-websocket-protocol">>, 
  +                                              <<"sip">>, Req2),
  +            Timeout = nksip_lib:get_value(timeout, Opts),
  +            {{RemoteIp, RemotePort}, _} = cowboy_req:peer(Req3),
  +            Transp1 = Transp#transport{remote_ip=RemoteIp, remote_port=RemotePort},
  +            {ok, Pid} = nksip_connection:start_link(AppId, Transp1, self(), Timeout),
  +            {ok, Req3, #ws_state{conn_pid=Pid}};
  +        false -> 
  +            {shutdown, Req2}
  +    end.
   
   
   %% @private
  
positive.code:         case Key of "" -> []; _ -> {keyfile, Key} end
      ]).
  
  
  
negative.code:             {ok, Socket0} -> Socket0;
              {error, Error1} -> throw(Error1) 
          end,
          {Data1, HandshakeReq} = handshake_req(Ip, Port, Opts),
          case TranspMod:send(Socket, Data1) of
              ok -> ok;
              {error, Error2} -> throw(Error2)
          end,
          case TranspMod:recv(Socket, 0, 5000) of
              {ok, Data2} ->
                  case handshake_resp(Data2, HandshakeReq) of
                      ok -> ok;
                      {error, Error3} -> throw(Error3)
                  end;
              {error, Error4} ->
                  throw(Error4)
          end,
          {ok, {LocalIp, LocalPort}} = InetMod:sockname(Socket),
          Transp1 = Transp#transport{
  