anchor.diff:  	  branchbase,		%% string(), base of branches we should use
   	  callhandler,		%% term(), the server transaction handler
   	  request,		%% request record()
  -	  sipmethod,		%% string(), the method of the request, only use for matching!
   	  actions,		%% list() of sipproxy_action record()
   	  forkpid,		%% pid() of sipproxy process
   	  callhandler_pid,	%% pid() of server transaction handler, only use for matching!
   	  cancelled=false,	%% atom(), true | false
  -	  completed=false	%% atom(), true | false
  +	  completed=false,	%% atom(), true | false
  +	  cpl_pid=none		%% pid(), CPL interpreter backend
   	 }).
   
   %%--------------------------------------------------------------------
   %% Macros
   %%--------------------------------------------------------------------
  -%% Timeout before complaining about still being alive.
  +%% Timeout before dying.
   -define(TIMEOUT, 300 * 1000).
   
   %%====================================================================
  
positive.code: 
  %%--------------------------------------------------------------------
  %% Function: check_quit(Res)
  %%           Res = gen_server callback reply
  %% Descrip.: Wrapper function checking if both our callhandler and our
  %%           forkpid are dead. If so, turn Res into a {stop, ...} but
  %%           if Res was a {reply, ...} do the gen_server:reply() first
  %% Returns : Res                   |
  %%           {stop, Reason, State}            (terminate/2 is called)
  %%--------------------------------------------------------------------
  check_quit(Res) ->
      check_quit(Res, none).
  
  check_quit(Res, From) ->
      case Res of
  	{_, _, State, _} when is_record(State, state) ->
  	    check_quit2(Res, From, State);
  	{_, _, State} when is_record(State, state) ->
  	    check_quit2(Res, From, State);
  	{_, State, _} when is_record(State, state) ->
  	    check_quit2(Res, From, State);
  	{_, State} when is_record(State, state) ->
  	    check_quit2(Res, From, State);
  	_ ->
  	    Res
      end.
  
  check_quit2(Res, From, #state{callhandler=none, forkpid=none}=State) ->
      logger:log(debug, "Appserver glue: Both CallHandler and ForkPid are 'none' - terminating"),
      NewReply = case Res of
  		   {reply, Reply, _, _} when From /= none ->
  		       gen_server:reply(From, Reply),
  		       {stop, normal, State};
  		   {reply, Reply, _} when From /= none ->
  		       gen_server:reply(From, Reply),
  		       {stop, normal, State};
  		   {stop, _, _, _}  ->
  		       Res;
  		   {stop, _, _} ->
  		       Res;
  		   _ ->
  		       {stop, normal, State}
  	       end,
      NewReply;
  check_quit2(Res, _From, State) when is_record(State, state) ->
      %% Not time to quit yet
      Res.
  
  safe_callhandler_send_response(none, Status, Reason) ->
      logger:log(error, "Appserver glue: CallHandler is gone, can't ask it to send '~p ~s' response", [Status, Reason]),
      error;
  safe_callhandler_send_response(TH, Status, Reason) ->
      %% XXX do catch here since we are supposed to be safe?
      transactionlayer:send_response_handler(TH, Status, Reason).
  
  %%--------------------------------------------------------------------
  %% Function: handle_sipproxy_response(Response, State)
  
negative.code: %%--------------------------------------------------------------------
  handle_info(timeout, State) ->
      {CallHandler, ForkPid} = {State#state.callhandler, State#state.forkpid},
      logger:log(error, "Appserver glue: Still alive after 5 minutes! Exiting. CallHandler '~p', ForkPid '~p'",
  	       [CallHandler, ForkPid]),
      util:safe_signal("Appserver glue: ", ForkPid, {showtargets}),
      check_quit({stop, "appserver_glue should not live forever", State});
  
  handle_info(Info, State) ->
      logger:log(error, "Appserver glue: Received unknown signal :~n~p", [Info]),
  