anchor.diff:  	    NewState = received_invite_2xx(Response, State),
   	    {noreply, NewState};
   	{_CSeqNum, Method} ->
  -	    io:format("IGNORING response '~p ~s' to ~s~n", [Status, Response#response.reason, Method]),
  +	    log(State#state.log_fun, debug, "IGNORING response '~p ~s' to ~s",
  +		[Status, Response#response.reason, Method]),
   	    {noreply, State}
  -    end.
  +    end;
  +
  +%%--------------------------------------------------------------------
  +%% Function: handle_info({dialog_expired, DialogId}, ...)
  +%%           DialogId = term(), dialog id for the dialog we have
  +%%                      registered as dialog controller for
  +%% Descrip.: Our dialog has expired. Terminate.
  +%% Returns : {stop, dialog_expired, State}
  +%%--------------------------------------------------------------------
  +handle_info({dialog_expired, DialogId}, State) ->
  +    log(State#state.log_fun, error, "Dialog ~p apparently expired, exiting.", [DialogId]),
  +    {stop, dialog_expired, State}.
   
   
   terminate(_Reason, _State) ->
  
positive.code: 			  ]),
      CSeq = 1,
  
      Header = keylist:from_list([{"From",	[?FROM_URI ";tag=" ++ FromTag]},
  				{"To",		[?TO_URI]},
  				{"Call-Id",	[CallId]},
  				{"CSeq",	[lists:concat([CSeq, " ", Method])]}
  			       ] ++ ExtraHeaders),
  
      Request1 = #request{method = Method, uri = URI, header = Header},
      Request = siprequest:set_request_body(Request1, Body),
  
      {ok, Request, CallId, FromTag}.
  
  %%--------------------------------------------------------------------
  %% Function: generate_contact_str()
  
negative.code: 				{"To",		[To]},
  				{"Call-Id",	[CallId]},
  				{"CSeq",	[lists:concat([CSeqNum, " ", Method])]},
  				{"Contact",	[Contact]}
  			       ] ++ Route),
  
      Request1 = #request{method = Method,
  