mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 00:30:20 +00:00
Make canreinvite globally applicable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -351,6 +351,8 @@ static struct sip_registry *registrations;
|
|||||||
|
|
||||||
static int sipsock = -1;
|
static int sipsock = -1;
|
||||||
static int globalnat = 0;
|
static int globalnat = 0;
|
||||||
|
static int globalcanreinvite = REINVITE_INVITE;
|
||||||
|
|
||||||
|
|
||||||
static struct sockaddr_in bindaddr;
|
static struct sockaddr_in bindaddr;
|
||||||
|
|
||||||
@@ -1288,7 +1290,7 @@ static struct sip_pvt *sip_alloc(char *callid, struct sockaddr_in *sin, int useg
|
|||||||
else
|
else
|
||||||
strncpy(p->callid, callid, sizeof(p->callid) - 1);
|
strncpy(p->callid, callid, sizeof(p->callid) - 1);
|
||||||
/* Assume reinvite OK and via INVITE */
|
/* Assume reinvite OK and via INVITE */
|
||||||
p->canreinvite = REINVITE_INVITE;
|
p->canreinvite = globalcanreinvite;
|
||||||
p->dtmfmode = globaldtmfmode;
|
p->dtmfmode = globaldtmfmode;
|
||||||
if (p->dtmfmode & SIP_DTMF_RFC2833)
|
if (p->dtmfmode & SIP_DTMF_RFC2833)
|
||||||
p->noncodeccapability |= AST_RTP_DTMF;
|
p->noncodeccapability |= AST_RTP_DTMF;
|
||||||
@@ -5059,6 +5061,7 @@ static int reload_config(void)
|
|||||||
strncpy(context, "default", sizeof(context) - 1);
|
strncpy(context, "default", sizeof(context) - 1);
|
||||||
strcpy(language, "");
|
strcpy(language, "");
|
||||||
strcpy(fromdomain, "");
|
strcpy(fromdomain, "");
|
||||||
|
globalcanreinvite = REINVITE_INVITE;
|
||||||
v = ast_variable_browse(cfg, "general");
|
v = ast_variable_browse(cfg, "general");
|
||||||
while(v) {
|
while(v) {
|
||||||
/* Create the interface list */
|
/* Create the interface list */
|
||||||
@@ -5085,6 +5088,11 @@ static int reload_config(void)
|
|||||||
strncpy(fromdomain, v->value, sizeof(fromdomain)-1);
|
strncpy(fromdomain, v->value, sizeof(fromdomain)-1);
|
||||||
} else if (!strcasecmp(v->name, "nat")) {
|
} else if (!strcasecmp(v->name, "nat")) {
|
||||||
globalnat = ast_true(v->value);
|
globalnat = ast_true(v->value);
|
||||||
|
} else if (!strcasecmp(v->name, "canreinvite")) {
|
||||||
|
if (!strcasecmp(v->value, "update"))
|
||||||
|
globalcanreinvite = REINVITE_UPDATE;
|
||||||
|
else
|
||||||
|
globalcanreinvite = ast_true(v->value);
|
||||||
} else if (!strcasecmp(v->name, "maxexpirey") || !strcasecmp(v->name, "maxexpiry")) {
|
} else if (!strcasecmp(v->name, "maxexpirey") || !strcasecmp(v->name, "maxexpiry")) {
|
||||||
max_expiry = atoi(v->value);
|
max_expiry = atoi(v->value);
|
||||||
if (max_expiry < 1)
|
if (max_expiry < 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user