diff options
author | mattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-12 15:05:25 +0000 |
---|---|---|
committer | mattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-12 15:05:25 +0000 |
commit | 8ca50a7271515c894c9316b12d0bc6c4876f0e74 (patch) | |
tree | 78c0a737fa18046b9b9d39681e3dd44f1d3e064b /channels/chan_zap.c | |
parent | efe7f2945d00085320f63631557add29bd26bb5a (diff) |
enable/disable facility ies
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5637 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-rwxr-xr-x | channels/chan_zap.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 001d7f7ca..be8f010b1 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -57,7 +57,7 @@ #include <ctype.h> #ifdef ZAPATA_PRI #include <libpri.h> -#ifndef PRI_AOC_UNITS +#ifndef PRI_FACILITY_ENABLE #error "You need newer libpri" #endif #endif @@ -256,6 +256,7 @@ static int minidle = 0; static char idleext[AST_MAX_EXTENSION]; static char idledial[AST_MAX_EXTENSION]; static int overlapdial = 0; +static int facilityenable = 0; static char internationalprefix[10] = ""; static char nationalprefix[10] = ""; static char localprefix[20] = ""; @@ -384,6 +385,7 @@ struct zt_pri { int prilogicalspan; /* Logical span number within trunk group */ int numchans; /* Num of channels we represent */ int overlapdial; /* In overlap dialing mode */ + int facilityenable; /* Enable facility IEs */ struct pri *dchans[NUM_DCHANS]; /* Actual d-channels */ int dchanavail[NUM_DCHANS]; /* Whether each channel is available */ struct pri *pri; /* Currently active D-channel */ @@ -1912,6 +1914,9 @@ static int zt_call(struct ast_channel *ast, char *rdest, int timeout) pri_sr_set_bearer(sr, p->digital ? PRI_TRANS_CAP_DIGITAL : ast->transfercapability, (p->digital ? -1 : ((p->law == ZT_LAW_ALAW) ? PRI_LAYER_1_ALAW : PRI_LAYER_1_ULAW))); + if (p->pri->facilityenable) + pri_facility_enable(p->pri->pri); + if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Requested transfer capability: 0x%.2x - %s\n", ast->transfercapability, ast_transfercapability2str(ast->transfercapability)); dp_strip = 0; @@ -6655,6 +6660,7 @@ static struct zt_pvt *mkintf(int channel, int signalling, int radio, struct zt_p pris[span].minunused = minunused; pris[span].minidle = minidle; pris[span].overlapdial = overlapdial; + pris[span].facilityenable = facilityenable; strncpy(pris[span].idledial, idledial, sizeof(pris[span].idledial) - 1); strncpy(pris[span].idleext, idleext, sizeof(pris[span].idleext) - 1); strncpy(pris[span].internationalprefix, internationalprefix, sizeof(pris[span].internationalprefix)-1); @@ -10154,7 +10160,9 @@ static int setup_zap(int reload) ast_log(LOG_WARNING, "'%s' is not a valid ISDN timer configuration string\n", v->value); #endif /* PRI_GETSET_TIMERS */ #endif /* ZAPATA_PRI */ - + + } else if (!strcasecmp(v->name, "faclityenable")) { + facilityenable = ast_true(v->value); } else if (!strcasecmp(v->name, "cadence")) { /* setup to scan our argument */ int element_count, c[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; |