|
|
@ -642,7 +642,9 @@ static struct zt_pvt {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
struct zt_chan_conf {
|
|
|
|
struct zt_chan_conf {
|
|
|
|
struct zt_pvt chan;
|
|
|
|
struct zt_pvt chan;
|
|
|
|
|
|
|
|
#ifdef HAVE_PRI
|
|
|
|
struct zt_pri pri;
|
|
|
|
struct zt_pri pri;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
ZT_PARAMS timing;
|
|
|
|
ZT_PARAMS timing;
|
|
|
|
|
|
|
|
|
|
|
|
char smdi_port[SMDI_MAX_FILENAME_LEN];
|
|
|
|
char smdi_port[SMDI_MAX_FILENAME_LEN];
|
|
|
@ -654,8 +656,8 @@ static struct zt_chan_conf zt_chan_conf_default(void) {
|
|
|
|
* to 0 or equivalent
|
|
|
|
* to 0 or equivalent
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
struct zt_chan_conf conf = {
|
|
|
|
struct zt_chan_conf conf = {
|
|
|
|
.pri = {
|
|
|
|
|
|
|
|
#ifdef HAVE_PRI
|
|
|
|
#ifdef HAVE_PRI
|
|
|
|
|
|
|
|
.pri = {
|
|
|
|
.nsf = PRI_NSF_NONE,
|
|
|
|
.nsf = PRI_NSF_NONE,
|
|
|
|
.switchtype = PRI_SWITCH_NI2,
|
|
|
|
.switchtype = PRI_SWITCH_NI2,
|
|
|
|
.dialplan = PRI_NATIONAL_ISDN + 1,
|
|
|
|
.dialplan = PRI_NATIONAL_ISDN + 1,
|
|
|
@ -672,8 +674,8 @@ static struct zt_chan_conf zt_chan_conf_default(void) {
|
|
|
|
.unknownprefix = "",
|
|
|
|
.unknownprefix = "",
|
|
|
|
|
|
|
|
|
|
|
|
.resetinterval = 3600
|
|
|
|
.resetinterval = 3600
|
|
|
|
#endif
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
#endif
|
|
|
|
.chan = {
|
|
|
|
.chan = {
|
|
|
|
.context = "default",
|
|
|
|
.context = "default",
|
|
|
|
.cid_num = "",
|
|
|
|
.cid_num = "",
|
|
|
@ -12541,7 +12543,8 @@ static int setup_zap(int reload)
|
|
|
|
if (!ast_strlen_zero(chans)) {
|
|
|
|
if (!ast_strlen_zero(chans)) {
|
|
|
|
if (memcpy(&conf, &base_conf, sizeof(conf)) == NULL) {
|
|
|
|
if (memcpy(&conf, &base_conf, sizeof(conf)) == NULL) {
|
|
|
|
ast_log(LOG_ERROR, "Not enough memory for conf copy\n");
|
|
|
|
ast_log(LOG_ERROR, "Not enough memory for conf copy\n");
|
|
|
|
exit -1;
|
|
|
|
ast_config_destroy(cfg);
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
process_zap(&conf, ast_variable_browse(cfg, cat), reload, 0);
|
|
|
|
process_zap(&conf, ast_variable_browse(cfg, cat), reload, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|