]> granicus.if.org Git - ejabberd/commitdiff
Don't forget to include 'Contact' header field in 2xx registrar responses
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Mon, 26 May 2014 15:43:15 +0000 (19:43 +0400)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Mon, 26 May 2014 17:34:23 +0000 (21:34 +0400)
src/mod_sip_registrar.erl

index 57c55be08a9f1aedd63f1302dbe57cc9b77d722a..689efe48eaa254697f9f3dd3d6c4d943b152d8b7 100644 (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(