anchor.diff:  -spec outbound_opts(nksip:protocol(), nksip:app_id()) ->
       nksip:optslist().
   
  -outbound_opts(tcp, _AppId) ->
  +outbound_opts(ws, _AppId) ->
       [binary, {active, false}, {nodelay, true}, {keepalive, true}, {packet, raw}];
   
  -outbound_opts(tls, AppId) ->
  +outbound_opts(wss, AppId) ->
       case code:priv_dir(nksip) of
           PrivDir when is_list(PrivDir) ->
               DefCert = filename:join(PrivDir, "cert.pem"),
  
positive.code: -export([get_listener/3, connect/3]).
  -export([start_link/4, init/1, terminate/2, code_change/3, handle_call/3, handle_cast/2, 
           handle_info/2]).
  % -export([init/3, websocket_init/3, websocket_handle/3, websocket_info/3, 
  %          websocket_terminate/3]).
  
  -include("nksip.hrl").
  -include("nksip_call.hrl").
  
negative.code:          
  connect(AppId, Transp, Opts) ->
      try
          case nksip_connection:is_max(AppId) of
              false -> ok;
              true -> throw(max_connections)
          end,
          #transport{proto=Proto, remote_ip=Ip, remote_port=Port, resource=Res} = Transp,
          {InetMod, TranspMod} = case Proto of
  