25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-31 15:21:38 +01:00

Don't forget to include 'Contact' header field in 2xx registrar responses

This commit is contained in:
Evgeniy Khramtsov 2014-05-26 19:43:15 +04:00
parent 123b01aaa0
commit dceab3689d

View File

@ -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(