--- asterisk-1.6.0.1/channels/chan_sip.c 2008-09-06 13:21:51.000000000 -0700 +++ asterisk-1.6.0.1.new/channels/chan_sip.c 2008-11-16 22:09:27.000000000 -0800 @@ -13933,6 +13933,7 @@ static char *sip_notify(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { struct ast_variable *varlist; + struct ast_str *message_body = ast_str_alloca(500); int i; switch (cmd) { @@ -13985,7 +13986,16 @@ for (var = varlist; var; var = var->next) { char buf[512]; ast_copy_string(buf, var->value, sizeof(buf)); - add_header(&req, var->name, ast_unescape_semicolon(buf)); + if (0 == strcmp(var->name, "Message-Body")) { + ast_str_append(&message_body, 0, "%s\r\n", buf); + } else { + add_header(&req, var->name, ast_unescape_semicolon(buf)); + } + } + + if (message_body->used != 0) { + add_header_contentLength(&req, message_body->used); + add_line(&req, message_body->str); } /* Recalculate our side, and recalculate Call ID */