mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-20 12:20:12 +00:00
Allow notransfer to be a global option
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -173,7 +173,7 @@ static int iaxtrunkdebug = 0;
|
|||||||
|
|
||||||
static char accountcode[20];
|
static char accountcode[20];
|
||||||
static int amaflags = 0;
|
static int amaflags = 0;
|
||||||
static int notransfer = 0;
|
static int globalnotransfer = 0;
|
||||||
|
|
||||||
static pthread_t netthreadid = AST_PTHREADT_NULL;
|
static pthread_t netthreadid = AST_PTHREADT_NULL;
|
||||||
|
|
||||||
@@ -847,7 +847,7 @@ static int find_callno(unsigned short callno, unsigned short dcallno, struct soc
|
|||||||
iaxs[x]->pingid = ast_sched_add(sched, ping_time * 1000, send_ping, (void *)x);
|
iaxs[x]->pingid = ast_sched_add(sched, ping_time * 1000, send_ping, (void *)x);
|
||||||
iaxs[x]->lagid = ast_sched_add(sched, lagrq_time * 1000, send_lagrq, (void *)x);
|
iaxs[x]->lagid = ast_sched_add(sched, lagrq_time * 1000, send_lagrq, (void *)x);
|
||||||
iaxs[x]->amaflags = amaflags;
|
iaxs[x]->amaflags = amaflags;
|
||||||
iaxs[x]->notransfer = notransfer;
|
iaxs[x]->notransfer = globalnotransfer;
|
||||||
strncpy(iaxs[x]->accountcode, accountcode, sizeof(iaxs[x]->accountcode)-1);
|
strncpy(iaxs[x]->accountcode, accountcode, sizeof(iaxs[x]->accountcode)-1);
|
||||||
} else {
|
} else {
|
||||||
ast_log(LOG_WARNING, "Out of resources\n");
|
ast_log(LOG_WARNING, "Out of resources\n");
|
||||||
@@ -5681,7 +5681,7 @@ static struct ast_channel *iax2_request(char *type, int format, void *data)
|
|||||||
char *portno=NULL;
|
char *portno=NULL;
|
||||||
int capability = iax2_capability;
|
int capability = iax2_capability;
|
||||||
int trunk;
|
int trunk;
|
||||||
int notransfer = 0;
|
int notransfer = globalnotransfer;
|
||||||
strncpy(s, (char *)data, sizeof(s)-1);
|
strncpy(s, (char *)data, sizeof(s)-1);
|
||||||
/* FIXME The next two lines seem useless */
|
/* FIXME The next two lines seem useless */
|
||||||
stringp=s;
|
stringp=s;
|
||||||
@@ -6265,6 +6265,8 @@ static int set_config(char *config_file, struct sockaddr_in* sin){
|
|||||||
use_jitterbuffer = ast_true(v->value);
|
use_jitterbuffer = ast_true(v->value);
|
||||||
else if (!strcasecmp(v->name, "authdebug"))
|
else if (!strcasecmp(v->name, "authdebug"))
|
||||||
authdebug = ast_true(v->value);
|
authdebug = ast_true(v->value);
|
||||||
|
else if (!strcasecmp(v->name, "notransfer"))
|
||||||
|
globalnotransfer = ast_true(v->value);
|
||||||
else if (!strcasecmp(v->name, "trunkfreq")) {
|
else if (!strcasecmp(v->name, "trunkfreq")) {
|
||||||
trunkfreq = atoi(v->value);
|
trunkfreq = atoi(v->value);
|
||||||
if (trunkfreq < 10)
|
if (trunkfreq < 10)
|
||||||
@@ -6394,7 +6396,7 @@ static int reload_config(void)
|
|||||||
strncpy(accountcode, "", sizeof(accountcode)-1);
|
strncpy(accountcode, "", sizeof(accountcode)-1);
|
||||||
strncpy(language, "", sizeof(language)-1);
|
strncpy(language, "", sizeof(language)-1);
|
||||||
amaflags = 0;
|
amaflags = 0;
|
||||||
notransfer = 0;
|
globalnotransfer = 0;
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
delete_users();
|
delete_users();
|
||||||
set_config(config,&dead_sin);
|
set_config(config,&dead_sin);
|
||||||
|
Reference in New Issue
Block a user