From: David Vossel Date: Wed, 6 Jul 2011 17:39:36 +0000 (+0000) Subject: Fixes newlines from being stripped from out of dialog sip MESSAGES. X-Git-Tag: 11.0.0-beta1~1401 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7c6f0445e7bbd1f7aea1687eae52c3ca7cd5756;p=thirdparty%2Fasterisk.git Fixes newlines from being stripped from out of dialog sip MESSAGES. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326544 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 18eba23712..1f2c72379a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -16079,7 +16079,11 @@ static void receive_message(struct sip_pvt *p, struct sip_request *req, struct a return; } - if (get_msg_text2(&buf, req, FALSE)) { + /* If this is an out of dialog msg, add back newlines, otherwise strip the new lines. + * In dialog msg's newlines are stripped to preserve the behavior of how Asterisk has worked + * in the past. If it is found later that new lines can be added into in dialog msgs as well, + * then change this. */ + if (get_msg_text2(&buf, req, p->owner ? FALSE : TRUE)) { ast_log(LOG_WARNING, "Unable to retrieve text from %s\n", p->callid); transmit_response(p, "202 Accepted", req); if (!p->owner)