summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2014-05-26 19:43:15 +0400
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2014-05-26 21:34:23 +0400
commitdceab3689d9fc8fcc8c87d7dcdf4a0306e4958e7 (patch)
treefe07faf0dbfaa6bd61e2f0b4f5380831667ad162
parentdon't stop make install if epam is not compiled (diff)
Don't forget to include 'Contact' header field in 2xx registrar responses
-rw-r--r--src/mod_sip_registrar.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mod_sip_registrar.erl b/src/mod_sip_registrar.erl
index 57c55be0..689efe48 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(