From: Evgeniy Khramtsov Date: Mon, 26 May 2014 15:43:15 +0000 (+0400) Subject: Don't forget to include 'Contact' header field in 2xx registrar responses X-Git-Tag: 14.07~105 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dceab3689d9fc8fcc8c87d7dcdf4a0306e4958e7;p=ejabberd Don't forget to include 'Contact' header field in 2xx registrar responses --- 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(