aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_mgcp.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-03 20:58:48 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-03 20:58:48 +0000
commit538f4ca207028ee047ffadc741278584c2ca43bc (patch)
tree80d368e550777a4a58bfd45fded1fad152c9b5fc /channels/chan_mgcp.c
parentb78e0c85c91f64adf0a9f023e302e9e38038d7b7 (diff)
Merged revisions 210190 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r210190 | kpfleming | 2009-08-03 15:48:48 -0500 (Mon, 03 Aug 2009) | 11 lines 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/branches/1.6.2@210191 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 1c1482975..1cb2f4de7 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;
@@ -3557,7 +3557,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;
@@ -3667,8 +3667,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")) {
@@ -3753,7 +3753,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;
@@ -3856,7 +3856,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;
@@ -3949,7 +3949,7 @@ static enum ast_rtp_get_result mgcp_get_rtp_peer(struct ast_channel *chan, struc
*rtp = sub->rtp;
- if (sub->parent->canreinvite)
+ if (sub->parent->directmedia)
return AST_RTP_TRY_NATIVE;
else
return AST_RTP_TRY_PARTIAL;