anchor.diff:  	undefined ->
   	    {stop, "INVITE terminated prematurely", State};
   	ReferPid when is_pid(ReferPid) ->
  -	    io:format("INVITE transaction (~p ~p) terminated~n", [Pid, Branch]),
  +	    log(State#state.log_fun, debug, "INVITE transaction (~p ~p) terminated~n", [Pid, Branch]),
   	    {noreply, State#state{invite_pid = none}}
       end;
   
   handle_info({clienttransaction_terminating, Pid, Branch},
   	    #state{refer_pid = Pid, refer_branch = Branch} = State) ->
  -    io:format("REFER transaction (~p ~p) terminated~n", [Pid, Branch]),
  +    log(State#state.log_fun, debug, "REFER transaction (~p ~p) terminated~n", [Pid, Branch]),
       NewState = State#state{refer_pid = none},
       case State#state.invite_pid of
   	undefined ->
  
positive.code: %%           CallId  = string(), Call-Id of generated request
  %%           FromTag = string(), From-tag of generated request
  %%--------------------------------------------------------------------
  start_generate_request(Method, URI, ExtraHeaders, Body) ->
      FromTag = siputil:generate_tag(),
      {Megasec, Sec, Microsec} = now(),
  
  
negative.code: 
  handle_cast(_Msg, State) ->
      {noreply, State}.
  
  
  %%--------------------------------------------------------------------
  %% Function: handle_info({branch_request, Pid, Branch, BranchState,
  