diff options
author | Mark Michelson <mmichelson@digium.com> | 2013-07-18 19:25:51 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2013-07-18 19:25:51 +0000 |
commit | c47787feab34d9572b41ebe7148c169b52362fbd (patch) | |
tree | 85410d3780938b31d9605f6d05cef9a744c3932d /res/res_sip_refer.c | |
parent | 3c86832f9f271c8d479cf956155424fda512c76b (diff) |
Add a bunch of options from sip.conf to res_sip.conf
For a complete list of the options added, see the review linked
at the bottom of this commit message.
(closes issue ASTERISK-21506)
reported by Matt Jordan
Review: https://reviewboard.asterisk.org/r/2671
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_sip_refer.c')
-rw-r--r-- | res/res_sip_refer.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/res/res_sip_refer.c b/res/res_sip_refer.c index 9cc46442d..48c7e6dba 100644 --- a/res/res_sip_refer.c +++ b/res/res_sip_refer.c @@ -732,6 +732,13 @@ static int refer_incoming_refer_request(struct ast_sip_session *session, struct pjsip_param *replaces; int response; + if (!session->endpoint->allowtransfer) { + pjsip_dlg_respond(session->inv_session->dlg, rdata, 603, NULL, NULL, NULL); + ast_log(LOG_WARNING, "Endpoint %s transfer attempt blocked due to configuration\n", + ast_sorcery_object_get_id(session->endpoint)); + return 0; + } + /* A Refer-To header is required */ if (!(refer_to = pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &str_refer_to, NULL))) { pjsip_dlg_respond(session->inv_session->dlg, rdata, 400, NULL, NULL, NULL); |