aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2011-07-06 17:39:36 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2011-07-06 17:39:36 +0000
commitbacd87fb8e73ef3eed30c2f49a5a7a38842f3b51 (patch)
tree5b543ca42fd46fc57a7bcabb3d848d7349163333 /channels
parentdc46f521f2ca195c265f6d7ed51899e58f3b6eb9 (diff)
Fixes newlines from being stripped from out of dialog sip MESSAGES.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@326544 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 18eba2371..1f2c72379 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)