PJSIP: PJSIPNotify - Strip content-length headers and add documentation

Documentation for how to add custom headers/content to notifies created
with the PJSIPNotify manager action was a little sparse and it also
wasn't vetting application of Content-length headers like its chan_sip
equivalent was (so two Content-length headers could be applied... and
PJSIP determines the content length anyway, so it just opens people up
for error). This patch also flips the variable order so that the
variables are interpreted in the same order as they are put in the AMI
action.

Review: https://reviewboard.asterisk.org/r/3587/
........

Merged revisions 415658 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@415659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jonathan Rose
2014-06-10 16:06:12 +00:00
parent c63bf80c38
commit a0adb8a26b
2 changed files with 28 additions and 9 deletions

View File

@@ -1217,7 +1217,7 @@ static int action_messagesend(struct mansession *s, const struct message *m)
return -1;
}
data = astman_get_variables(m);
data = astman_get_variables_order(m, ORDER_NATURAL);
for (vars = data; vars; vars = vars->next) {
ast_msg_set_var_outbound(msg, vars->name, vars->value);
}