aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_mgcp.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-03 20:48:48 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-03 20:48:48 +0000
commita73782aff532a1102239e23a66c86296dd52fe70 (patch)
treeb60a24dd99f31bac080dce420ea3d9242799ab0e /channels/chan_mgcp.c
parente44258424c1bdaac0754970d268a9bd1c77b2f99 (diff)
Rename 'canreinvite' option to 'directmedia', with backwards compatibility.
It is clear from multiple mailing list, forum, wiki and other sorts of posts that users don't really understand the effects that the 'canreinvite' config option actually has, and that in some cases they think that setting it to 'no' will actually cause various other features (T.38, MOH, etc.) to not work properly, when in fact this is not the case. This patch changes the proper name of the option to what it should have been from the beginning ('directmedia'), but preserves backwards compatibility for existing configurations. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@210190 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_mgcp.c')
-rw-r--r--channels/chan_mgcp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index d682c76bb..8adaf12a3 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -80,7 +80,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define MGCPDUMPER
#define DEFAULT_EXPIRY 120
#define MAX_EXPIRY 3600
-#define CANREINVITE 1
+#define DIRECTMEDIA 1
#ifndef INADDR_NONE
#define INADDR_NONE (in_addr_t)(-1)
@@ -177,7 +177,7 @@ static int cancallforward = 0;
static int singlepath = 0;
-static int canreinvite = CANREINVITE;
+static int directmedia = DIRECTMEDIA;
static char accountcode[AST_MAX_ACCOUNT_CODE] = "";
@@ -330,7 +330,7 @@ struct mgcp_endpoint {
int threewaycalling;
int singlepath;
int cancallforward;
- int canreinvite;
+ int directmedia;
int callreturn;
int dnd; /* How does this affect callwait? Do we just deny a mgcp_request if we're dnd? */
int hascallerid;
@@ -3552,7 +3552,7 @@ static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v)
int i=0, y=0;
int gw_reload = 0;
int ep_reload = 0;
- canreinvite = CANREINVITE;
+ directmedia = DIRECTMEDIA;
/* locate existing gateway */
gw = gateways;
@@ -3662,8 +3662,8 @@ static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v)
cancallforward = ast_true(v->value);
} else if (!strcasecmp(v->name, "singlepath")) {
singlepath = ast_true(v->value);
- } else if (!strcasecmp(v->name, "canreinvite")) {
- canreinvite = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "directmedia") || !strcasecmp(v->name, "canreinvite")) {
+ directmedia = ast_true(v->value);
} else if (!strcasecmp(v->name, "mailbox")) {
ast_copy_string(mailbox, v->value, sizeof(mailbox));
} else if (!strcasecmp(v->name, "hasvoicemail")) {
@@ -3748,7 +3748,7 @@ static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v)
e->callreturn = callreturn;
e->cancallforward = cancallforward;
e->singlepath = singlepath;
- e->canreinvite = canreinvite;
+ e->directmedia = directmedia;
e->callwaiting = callwaiting;
e->hascallwaiting = callwaiting;
e->slowsequence = slowsequence;
@@ -3851,7 +3851,7 @@ static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v)
e->pickupgroup=cur_pickupgroup;
e->callreturn = callreturn;
e->cancallforward = cancallforward;
- e->canreinvite = canreinvite;
+ e->directmedia = directmedia;
e->singlepath = singlepath;
e->callwaiting = callwaiting;
e->hascallwaiting = callwaiting;
@@ -3944,7 +3944,7 @@ static enum ast_rtp_glue_result mgcp_get_rtp_peer(struct ast_channel *chan, stru
*instance = sub->rtp ? ao2_ref(sub->rtp, +1), sub->rtp : NULL;
- if (sub->parent->canreinvite)
+ if (sub->parent->directmedia)
return AST_RTP_GLUE_RESULT_REMOTE;
else
return AST_RTP_GLUE_RESULT_LOCAL;