From dceab3689d9fc8fcc8c87d7dcdf4a0306e4958e7 Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Mon, 26 May 2014 19:43:15 +0400 Subject: [PATCH] Don't forget to include 'Contact' header field in 2xx registrar responses --- src/mod_sip_registrar.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mod_sip_registrar.erl b/src/mod_sip_registrar.erl index 57c55be08..689efe48e 100644 --- a/src/mod_sip_registrar.erl +++ b/src/mod_sip_registrar.erl @@ -57,8 +57,13 @@ request(#sip{hdrs = Hdrs} = Req, SIPSock) -> ok -> ?INFO_MSG("unregister SIP session for user ~s@~s from ~s", [LUser, LServer, inet_parse:ntoa(PeerIP)]), + Contact = {<<"">>, #uri{user = LUser, host = LServer}, + [{<<"expires">>, <<"0">>}]}, mod_sip:make_response( - Req, #sip{type = response, status = 200}); + Req, + #sip{type = response, + status = 200, + hdrs = [{'contact', [Contact]}]}); {error, Why} -> {Status, Reason} = make_status(Why), mod_sip:make_response(