Allow for redirecting reasons to be set to arbitrary strings.

This allows for the REDIRECTING dialplan function to be
used to set the reason to any string.

The SIP channel driver has been modified to set the redirecting
reason string to the value received in a Diversion header. In
addition, SIP 480 response reason text will set the redirecting
reason as well.

(closes issue AST-942)
reported by Malcolm Davenport

(closes issue AST-943)
reported by Malcolm Davenport

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Michelson
2012-09-25 19:29:14 +00:00
parent b7233b18eb
commit fdfb3ae5fa
9 changed files with 383 additions and 71 deletions

View File

@@ -916,8 +916,8 @@ static void sig_pri_redirecting_update(struct sig_pri_chan *pvt, struct ast_chan
sig_pri_party_id_from_ast(&pri_redirecting.to, &redirecting_to);
sig_pri_party_id_from_ast(&pri_redirecting.orig_called, &redirecting_orig);
pri_redirecting.count = ast_redirecting->count;
pri_redirecting.orig_reason = ast_to_pri_reason(ast_redirecting->orig_reason);
pri_redirecting.reason = ast_to_pri_reason(ast_redirecting->reason);
pri_redirecting.orig_reason = ast_to_pri_reason(ast_redirecting->orig_reason.code);
pri_redirecting.reason = ast_to_pri_reason(ast_redirecting->reason.code);
pri_redirecting_update(pvt->pri->pri, pvt->call, &pri_redirecting);
}
@@ -2177,8 +2177,8 @@ static void sig_pri_redirecting_convert(struct ast_party_redirecting *ast_redire
sig_pri_party_id_convert(&ast_redirecting->from, &pri_redirecting->from, pri);
sig_pri_party_id_convert(&ast_redirecting->to, &pri_redirecting->to, pri);
ast_redirecting->count = pri_redirecting->count;
ast_redirecting->reason = pri_to_ast_reason(pri_redirecting->reason);
ast_redirecting->orig_reason = pri_to_ast_reason(pri_redirecting->orig_reason);
ast_redirecting->reason.code = pri_to_ast_reason(pri_redirecting->reason);
ast_redirecting->orig_reason.code = pri_to_ast_reason(pri_redirecting->orig_reason);
}
/*!