define an AST_MAX_CONTEXT for use instead of AST_MAX_EXTENSION
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6076 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
cbc8a4b7d2
commit
72af60b3e6
|
@ -88,7 +88,7 @@ static int macro_exec(struct ast_channel *chan, void *data)
|
|||
char oldexten[256]="";
|
||||
int oldpriority;
|
||||
char pc[80];
|
||||
char oldcontext[256] = "";
|
||||
char oldcontext[AST_MAX_CONTEXT] = "";
|
||||
char *offsets;
|
||||
int offset;
|
||||
int setmacrocontext=0;
|
||||
|
|
|
@ -642,7 +642,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
|
|||
char *agifile;
|
||||
char *agifiledefault = "conf-background.agi";
|
||||
char meetmesecs[30] = "";
|
||||
char exitcontext[AST_MAX_EXTENSION] = "";
|
||||
char exitcontext[AST_MAX_CONTEXT] = "";
|
||||
char recordingtmp[AST_MAX_EXTENSION] = "";
|
||||
int dtmf;
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ struct queue_ent {
|
|||
struct ast_call_queue *parent; /* What queue is our parent */
|
||||
char moh[80]; /* Name of musiconhold to be used */
|
||||
char announce[80]; /* Announcement to play for member when call is answered */
|
||||
char context[80]; /* Context when user exits queue */
|
||||
char context[AST_MAX_CONTEXT]; /* Context when user exits queue */
|
||||
int pos; /* Where we are in the queue */
|
||||
int prio; /* Our priority */
|
||||
int last_pos_said; /* Last position we told the user */
|
||||
|
@ -269,7 +269,7 @@ struct ast_call_queue {
|
|||
char name[80]; /* Name */
|
||||
char moh[80]; /* Music On Hold class to be used */
|
||||
char announce[80]; /* Announcement to play when call is answered */
|
||||
char context[80]; /* Exit context */
|
||||
char context[AST_MAX_CONTEXT]; /* Exit context */
|
||||
unsigned int monjoin:1;
|
||||
unsigned int dead:1;
|
||||
unsigned int joinempty:2;
|
||||
|
@ -1853,7 +1853,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
|
|||
int to;
|
||||
char restofit[AST_MAX_EXTENSION];
|
||||
char oldexten[AST_MAX_EXTENSION]="";
|
||||
char oldcontext[AST_MAX_EXTENSION]="";
|
||||
char oldcontext[AST_MAX_CONTEXT]="";
|
||||
char queuename[256]="";
|
||||
char *newnum;
|
||||
char *monitorfilename;
|
||||
|
|
|
@ -158,8 +158,8 @@ struct baseio {
|
|||
|
||||
/* Structure for linked list of users */
|
||||
struct ast_vm_user {
|
||||
char context[80]; /* Voicemail context */
|
||||
char mailbox[80]; /* Mailbox id, unique within vm context */
|
||||
char context[AST_MAX_CONTEXT]; /* Voicemail context */
|
||||
char mailbox[AST_MAX_EXTENSION];/* Mailbox id, unique within vm context */
|
||||
char password[80]; /* Secret pin code, numbers only */
|
||||
char fullname[80]; /* Full name, for directory app */
|
||||
char email[80]; /* E-mail address */
|
||||
|
@ -321,9 +321,9 @@ static struct ast_flags globalflags = {0};
|
|||
|
||||
static int saydurationminfo;
|
||||
|
||||
static char dialcontext[80];
|
||||
static char callcontext[80];
|
||||
static char exitcontext[80];
|
||||
static char dialcontext[AST_MAX_CONTEXT];
|
||||
static char callcontext[AST_MAX_CONTEXT];
|
||||
static char exitcontext[AST_MAX_CONTEXT];
|
||||
|
||||
static char cidinternalcontexts[MAX_NUM_CID_CONTEXTS][64];
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ static const char desc[] = "ALSA Console Channel Driver";
|
|||
static const char tdesc[] = "ALSA Console Channel Driver";
|
||||
static const char config[] = "alsa.conf";
|
||||
|
||||
static char context[AST_MAX_EXTENSION] = "default";
|
||||
static char context[AST_MAX_CONTEXT] = "default";
|
||||
static char language[MAX_LANGUAGE] = "";
|
||||
static char exten[AST_MAX_EXTENSION] = "s";
|
||||
|
||||
|
@ -124,7 +124,7 @@ static struct chan_alsa_pvt {
|
|||
keeps this driver as simple as possible -- as it should be. */
|
||||
struct ast_channel *owner;
|
||||
char exten[AST_MAX_EXTENSION];
|
||||
char context[AST_MAX_EXTENSION];
|
||||
char context[AST_MAX_CONTEXT];
|
||||
#if 0
|
||||
snd_pcm_t *card;
|
||||
#endif
|
||||
|
|
|
@ -98,7 +98,7 @@ static const char type[] = "H323";
|
|||
static const char desc[] = "The NuFone Network's Open H.323 Channel Driver";
|
||||
static const char tdesc[] = "The NuFone Network's Open H.323 Channel Driver";
|
||||
static const char config[] = "h323.conf";
|
||||
static char default_context[AST_MAX_EXTENSION] = "default";
|
||||
static char default_context[AST_MAX_CONTEXT] = "default";
|
||||
static struct sockaddr_in bindaddr;
|
||||
|
||||
/** H.323 configuration values */
|
||||
|
@ -129,7 +129,7 @@ struct oh323_pvt {
|
|||
int nonCodecCapability; /* non-audio capability */
|
||||
int outgoing; /* Outgoing or incoming call? */
|
||||
char exten[AST_MAX_EXTENSION]; /* Requested extension */
|
||||
char context[AST_MAX_EXTENSION]; /* Context where to start */
|
||||
char context[AST_MAX_CONTEXT]; /* Context where to start */
|
||||
char accountcode[256]; /* Account code */
|
||||
char cid_num[80]; /* Caller*id number, if available */
|
||||
char cid_name[80]; /* Caller*id name, if available */
|
||||
|
|
|
@ -127,7 +127,7 @@ static const char channeltype[] = "IAX2";
|
|||
static char context[80] = "default";
|
||||
|
||||
static char language[MAX_LANGUAGE] = "";
|
||||
static char regcontext[AST_MAX_EXTENSION] = "";
|
||||
static char regcontext[AST_MAX_CONTEXT] = "";
|
||||
|
||||
static int max_retries = 4;
|
||||
static int ping_time = 20;
|
||||
|
@ -217,7 +217,7 @@ static pthread_t netthreadid = AST_PTHREADT_NULL;
|
|||
#define IAX_STATE_TBD (1 << 2)
|
||||
|
||||
struct iax2_context {
|
||||
char context[AST_MAX_EXTENSION];
|
||||
char context[AST_MAX_CONTEXT];
|
||||
struct iax2_context *next;
|
||||
};
|
||||
|
||||
|
@ -277,7 +277,7 @@ struct iax2_peer {
|
|||
char secret[80];
|
||||
char dbsecret[80];
|
||||
char outkey[80]; /* What key we use to talk to this peer */
|
||||
char context[AST_MAX_EXTENSION]; /* For transfers only */
|
||||
char context[AST_MAX_CONTEXT]; /* For transfers only */
|
||||
char regexten[AST_MAX_EXTENSION]; /* Extension to register (if regcontext is used) */
|
||||
char peercontext[AST_MAX_EXTENSION]; /* Context to pass to peer */
|
||||
char mailbox[AST_MAX_EXTENSION]; /* Mailbox */
|
||||
|
@ -605,7 +605,7 @@ static struct ast_firmware_list {
|
|||
#define CACHE_FLAG_MATCHMORE (1 << 7)
|
||||
|
||||
static struct iax2_dpcache {
|
||||
char peercontext[AST_MAX_EXTENSION];
|
||||
char peercontext[AST_MAX_CONTEXT];
|
||||
char exten[AST_MAX_EXTENSION];
|
||||
struct timeval orig;
|
||||
struct timeval expirey;
|
||||
|
@ -2654,8 +2654,8 @@ struct create_addr_info {
|
|||
char outkey[80];
|
||||
char timezone[80];
|
||||
char prefs[32];
|
||||
char context[AST_MAX_EXTENSION];
|
||||
char peercontext[AST_MAX_EXTENSION];
|
||||
char context[AST_MAX_CONTEXT];
|
||||
char peercontext[AST_MAX_CONTEXT];
|
||||
};
|
||||
|
||||
static int create_addr(const char *peername, struct sockaddr_in *sin, struct create_addr_info *cai)
|
||||
|
|
|
@ -88,7 +88,7 @@ static const struct ast_channel_tech local_tech = {
|
|||
|
||||
static struct local_pvt {
|
||||
ast_mutex_t lock; /* Channel private lock */
|
||||
char context[AST_MAX_EXTENSION]; /* Context to call */
|
||||
char context[AST_MAX_CONTEXT]; /* Context to call */
|
||||
char exten[AST_MAX_EXTENSION]; /* Extension to call */
|
||||
int reqformat; /* Requested format */
|
||||
int glaredetect; /* Detect glare on hangup */
|
||||
|
|
|
@ -87,7 +87,7 @@ static const char desc[] = "OSS Console Channel Driver";
|
|||
static const char tdesc[] = "OSS Console Channel Driver";
|
||||
static const char config[] = "oss.conf";
|
||||
|
||||
static char context[AST_MAX_EXTENSION] = "default";
|
||||
static char context[AST_MAX_CONTEXT] = "default";
|
||||
static char language[MAX_LANGUAGE] = "";
|
||||
static char exten[AST_MAX_EXTENSION] = "s";
|
||||
|
||||
|
@ -120,7 +120,7 @@ static struct chan_oss_pvt {
|
|||
keeps this driver as simple as possible -- as it should be. */
|
||||
struct ast_channel *owner;
|
||||
char exten[AST_MAX_EXTENSION];
|
||||
char context[AST_MAX_EXTENSION];
|
||||
char context[AST_MAX_CONTEXT];
|
||||
} oss;
|
||||
|
||||
static struct ast_channel *oss_request(const char *type, int format, void *data, int *cause);
|
||||
|
|
|
@ -262,7 +262,7 @@ const struct cfsip_options {
|
|||
static char default_useragent[AST_MAX_EXTENSION] = DEFAULT_USERAGENT;
|
||||
|
||||
#define DEFAULT_CONTEXT "default"
|
||||
static char default_context[AST_MAX_EXTENSION] = DEFAULT_CONTEXT;
|
||||
static char default_context[AST_MAX_CONTEXT] = DEFAULT_CONTEXT;
|
||||
|
||||
static char default_language[MAX_LANGUAGE] = "";
|
||||
|
||||
|
@ -351,7 +351,7 @@ static int recordhistory = 0; /* Record SIP history. Off by default */
|
|||
static char global_musicclass[MAX_MUSICCLASS] = ""; /* Global music on hold class */
|
||||
#define DEFAULT_REALM "asterisk"
|
||||
static char global_realm[MAXHOSTNAMELEN] = DEFAULT_REALM; /* Default realm */
|
||||
static char regcontext[AST_MAX_EXTENSION] = ""; /* Context for auto-extensions */
|
||||
static char regcontext[AST_MAX_CONTEXT] = ""; /* Context for auto-extensions */
|
||||
|
||||
/* Expire slowly */
|
||||
#define DEFAULT_EXPIRY 900
|
||||
|
@ -516,7 +516,7 @@ static struct sip_pvt {
|
|||
int route_persistant; /* Is this the "real" route? */
|
||||
char from[256]; /* The From: header */
|
||||
char useragent[256]; /* User agent in SIP request */
|
||||
char context[AST_MAX_EXTENSION]; /* Context for this call */
|
||||
char context[AST_MAX_CONTEXT]; /* Context for this call */
|
||||
char fromdomain[MAXHOSTNAMELEN]; /* Domain to show in the from field */
|
||||
char fromuser[AST_MAX_EXTENSION]; /* User to show in the user field */
|
||||
char fromname[AST_MAX_EXTENSION]; /* Name to show in the user field */
|
||||
|
@ -600,7 +600,7 @@ struct sip_user {
|
|||
ASTOBJ_COMPONENTS(struct sip_user);
|
||||
char secret[80]; /* Password */
|
||||
char md5secret[80]; /* Password in md5 */
|
||||
char context[AST_MAX_EXTENSION]; /* Default context for incoming calls */
|
||||
char context[AST_MAX_CONTEXT]; /* Default context for incoming calls */
|
||||
char cid_num[80]; /* Caller ID num */
|
||||
char cid_name[80]; /* Caller ID name */
|
||||
char accountcode[AST_MAX_ACCOUNT_CODE]; /* Account code */
|
||||
|
@ -631,7 +631,7 @@ struct sip_peer {
|
|||
char secret[80]; /* Password */
|
||||
char md5secret[80]; /* Password in MD5 */
|
||||
struct sip_auth *auth; /* Realm authentication list */
|
||||
char context[AST_MAX_EXTENSION]; /* Default context for incoming calls */
|
||||
char context[AST_MAX_CONTEXT]; /* Default context for incoming calls */
|
||||
char username[80]; /* Temporary username until registration */
|
||||
char accountcode[AST_MAX_ACCOUNT_CODE]; /* Account code */
|
||||
int amaflags; /* AMA Flags (for billing) */
|
||||
|
|
|
@ -672,7 +672,7 @@ struct ast_hostent ahp; struct hostent *hp;
|
|||
static int skinnysock = -1;
|
||||
static pthread_t tcp_thread;
|
||||
static pthread_t accept_t;
|
||||
static char context[AST_MAX_EXTENSION] = "default";
|
||||
static char context[AST_MAX_CONTEXT] = "default";
|
||||
static char language[MAX_LANGUAGE] = "";
|
||||
static char musicclass[MAX_MUSICCLASS] = "";
|
||||
static char cid_num[AST_MAX_EXTENSION] = "";
|
||||
|
@ -816,7 +816,7 @@ struct skinny_line {
|
|||
struct skinny_subchannel *sub; /* pointer to our current connection, channel and stuff */
|
||||
char accountcode[AST_MAX_ACCOUNT_CODE];
|
||||
char exten[AST_MAX_EXTENSION]; /* Extention where to start */
|
||||
char context[AST_MAX_EXTENSION];
|
||||
char context[AST_MAX_CONTEXT];
|
||||
char language[MAX_LANGUAGE];
|
||||
char cid_num[AST_MAX_EXTENSION]; /* Caller*ID */
|
||||
char cid_name[AST_MAX_EXTENSION]; /* Caller*ID */
|
||||
|
|
|
@ -165,7 +165,7 @@ static const char config[] = "zapata.conf";
|
|||
|
||||
static int cur_emdigitwait = 250; /* Wait time in ms for digits on EM channel */
|
||||
|
||||
static char context[AST_MAX_EXTENSION] = "default";
|
||||
static char context[AST_MAX_CONTEXT] = "default";
|
||||
static char cid_num[256] = "";
|
||||
static char cid_name[256] = "";
|
||||
static char defaultcic[64] = "";
|
||||
|
@ -371,7 +371,7 @@ struct zt_pri {
|
|||
pthread_t master; /* Thread of master */
|
||||
ast_mutex_t lock; /* Mutex */
|
||||
char idleext[AST_MAX_EXTENSION]; /* Where to idle extra calls */
|
||||
char idlecontext[AST_MAX_EXTENSION]; /* What context to use for idle */
|
||||
char idlecontext[AST_MAX_CONTEXT]; /* What context to use for idle */
|
||||
char idledial[AST_MAX_EXTENSION]; /* What to dial before dumping */
|
||||
int minunused; /* Min # of channels to keep empty */
|
||||
int minidle; /* Min # of "idling" calls to keep active */
|
||||
|
@ -449,7 +449,7 @@ struct distRingData {
|
|||
int ring[3];
|
||||
};
|
||||
struct ringContextData {
|
||||
char contextData[AST_MAX_EXTENSION];
|
||||
char contextData[AST_MAX_CONTEXT];
|
||||
};
|
||||
struct zt_distRings {
|
||||
struct distRingData ringnum[3];
|
||||
|
@ -562,8 +562,8 @@ static struct zt_pvt {
|
|||
|
||||
struct zt_distRings drings;
|
||||
|
||||
char context[AST_MAX_EXTENSION];
|
||||
char defcontext[AST_MAX_EXTENSION];
|
||||
char context[AST_MAX_CONTEXT];
|
||||
char defcontext[AST_MAX_CONTEXT];
|
||||
char exten[AST_MAX_EXTENSION];
|
||||
char language[MAX_LANGUAGE];
|
||||
char musicclass[MAX_MUSICCLASS];
|
||||
|
|
|
@ -38,11 +38,12 @@ extern "C" {
|
|||
/*! Max length of an extension */
|
||||
#define AST_MAX_EXTENSION 80
|
||||
|
||||
#define AST_MAX_CONTEXT 80
|
||||
|
||||
#include "asterisk/cdr.h"
|
||||
#include "asterisk/monitor.h"
|
||||
#include "asterisk/utils.h"
|
||||
|
||||
|
||||
#define AST_CHANNEL_NAME 80
|
||||
|
||||
#define MAX_LANGUAGE 20
|
||||
|
@ -256,9 +257,9 @@ struct ast_channel {
|
|||
struct ast_callerid cid;
|
||||
|
||||
/*! Current extension context */
|
||||
char context[AST_MAX_EXTENSION];
|
||||
char context[AST_MAX_CONTEXT];
|
||||
/*! Current non-macro context */
|
||||
char macrocontext[AST_MAX_EXTENSION];
|
||||
char macrocontext[AST_MAX_CONTEXT];
|
||||
/*! Current non-macro extension */
|
||||
char macroexten[AST_MAX_EXTENSION];
|
||||
/*! Current non-macro priority */
|
||||
|
|
Reference in New Issue