From: Kinsey Moore Date: Thu, 12 Jul 2012 20:05:45 +0000 (+0000) Subject: Include Expires header for SIP PUBLISH requests X-Git-Tag: 10.8.0-rc1~3^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f538da62eb30d0d7d49c309925206e9b612a021b;p=thirdparty%2Fasterisk.git Include Expires header for SIP PUBLISH requests RFC3903 requres SIP PUBLISH requests to have Expires headers, so add them. Review: https://reviewboard.asterisk.org/r/2003/ Patch-by: gareth ........ Merged revisions 370014 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@370015 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 61c5c63afa..489a073214 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10566,7 +10566,7 @@ static int respprep(struct sip_request *resp, struct sip_pvt *p, const char *msg add_header(resp, "Session-Expires", se_hdr); } - if (msg[0] == '2' && (p->method == SIP_SUBSCRIBE || p->method == SIP_REGISTER)) { + if (msg[0] == '2' && (p->method == SIP_SUBSCRIBE || p->method == SIP_REGISTER || p->method == SIP_PUBLISH)) { /* For registration responses, we also need expiry and contact info */ char tmp[256];