mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
Don't add hangup cause on non-final responses. (Imported from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4365,7 +4365,7 @@ static int __transmit_response(struct sip_pvt *p, char *msg, struct sip_request
|
||||
add_header_contentLength(&resp, 0);
|
||||
/* If we are cancelling an incoming invite for some reason, add information
|
||||
about the reason why we are doing this in clear text */
|
||||
if (p->owner && p->owner->hangupcause) {
|
||||
if (msg[0] != '1' && p->owner && p->owner->hangupcause) {
|
||||
add_header(&resp, "X-Asterisk-HangupCause", ast_cause2str(p->owner->hangupcause));
|
||||
}
|
||||
add_blank_header(&resp);
|
||||
|
Reference in New Issue
Block a user