#endif
#ifdef HAVE_ZAPTEL
- if (!(cfg = ast_config_load("zapata.conf"))) {
- ast_log(LOG_ERROR, "Unable to load zapata.conf\n");
- return 0;
- }
+ int load_from_zapata_conf = 1;
#else
- if (!(cfg = ast_config_load("chan_dahdi.conf"))) {
- ast_log(LOG_ERROR, "Unable to load chan_dahdi.conf\n");
- return 0;
- }
+ int load_from_zapata_conf = (dahdi_chan_mode == CHAN_ZAP_MODE);
#endif
+
+ if (load_from_zapata_conf) {
+ if (!(cfg = ast_config_load("zapata.conf"))) {
+ ast_log(LOG_ERROR, "Unable to load zapata.conf\n");
+ return 0;
+ }
+ } else {
+ if (!(cfg = ast_config_load("chan_dahdi.conf"))) {
+ ast_log(LOG_ERROR, "Unable to load chan_dahdi.conf\n");
+ return 0;
+ }
+ }
+
/* It's a little silly to lock it, but we mind as well just to be sure */
ast_mutex_lock(&iflock);
#ifdef HAVE_PRI
languageprefix = yes | no ; Should language code be last component of sound file name or first?
; when off, sound files are searched as <path>/<lang>/<file>
; when on, sound files are search as <lang>/<path>/<file>
- ; (only affects relative paths for sound files)
+ ; (only affects
+ relative paths for
+ sound files)
+dahdichanname = yes | no ; Should channels created by chan_dahdi be called 'DAHDI' or 'Zap';
+ ; defaults to 'DAHDI' if built against DAHDI, and 'Zap' if built
+ ; against Zaptel; also used by other applications so that they will
+ ; know what channel name to expect
[files]
; Changing the following lines may compromise your security