moved timeout settings from extenion to interface.conf
[lcr.git] / extension.c
index 470cf15..d8d17b4 100644 (file)
@@ -64,13 +64,6 @@ int read_extension(struct extension *ext, char *num)
        SCPY(ext->number, number);
 //     ********** NOTE: also change value in apppbx constructor
        ext->rights = 4; /* international */
-       ext->tout_setup = 120;
-       ext->tout_dialing = 120;
-       ext->tout_proceeding = 120;
-       ext->tout_alerting = 120;
-       ext->tout_disconnect = 120;
-//     ext->tout_hold = 900;
-//     ext->tout_park = 900;
        ext->cfnr_delay = 20;
        ext->vbox_codec = CODEC_MONO;
 
@@ -491,64 +484,6 @@ int read_extension(struct extension *ext, char *num)
 
                        PDEBUG(DEBUG_CONFIG, "transmit volume: %d\n",ext->txvol);
                } else
-               if (!strcmp(option,"tout_setup"))
-               {
-                       ext->tout_setup = atoi(param);
-                       if (ext->tout_setup < 0)
-                               ext->tout_setup = 0;
-
-                       PDEBUG(DEBUG_CONFIG, "timeout setup: %d\n",ext->tout_setup);
-               } else
-               if (!strcmp(option,"tout_dialing"))
-               {
-                       ext->tout_dialing = atoi(param);
-                       if (ext->tout_dialing < 0)
-                               ext->tout_dialing = 0;
-
-                       PDEBUG(DEBUG_CONFIG, "timeout dialing: %d\n",ext->tout_dialing);
-               } else
-               if (!strcmp(option,"tout_proceeding"))
-               {
-                       ext->tout_proceeding = atoi(param);
-                       if (ext->tout_proceeding < 0)
-                               ext->tout_proceeding = 0;
-
-                       PDEBUG(DEBUG_CONFIG, "timeout proceeding: %d\n",ext->tout_proceeding);
-               } else
-               if (!strcmp(option,"tout_alerting"))
-               {
-                       ext->tout_alerting = atoi(param);
-                       if (ext->tout_alerting < 0)
-                               ext->tout_alerting = 0;
-
-                       PDEBUG(DEBUG_CONFIG, "timeout alerting: %d\n",ext->tout_alerting);
-               } else
-               if (!strcmp(option,"tout_disconnect"))
-               {
-                       ext->tout_disconnect = atoi(param);
-                       if (ext->tout_disconnect < 0)
-                               ext->tout_disconnect = 0;
-
-                       PDEBUG(DEBUG_CONFIG, "timeout disconnect: %d\n",ext->tout_disconnect);
-               } else
-#if 0
-               if (!strcmp(option,"tout_hold"))
-               {
-                       ext->tout_hold = atoi(param);
-                       if (ext->tout_hold < 0)
-                               ext->tout_hold = 0;
-
-                       PDEBUG(DEBUG_CONFIG, "timeout hold: %d\n",ext->tout_hold);
-               } else
-               if (!strcmp(option,"tout_park"))
-               {
-                       ext->tout_park = atoi(param);
-                       if (ext->tout_park < 0)
-                               ext->tout_park = 0;
-
-                       PDEBUG(DEBUG_CONFIG, "timeout park: %d\n",ext->tout_park);
-               } else
-#endif
                if (!strcmp(option,"own_setup"))
                {
                        i=0;
@@ -1191,45 +1126,6 @@ int write_extension(struct extension *ext, char *number)
        fprintf(fp,"# (see txvol)\n");
        fprintf(fp,"rxvol           %d\n\n",ext->rxvol);
 
-       fprintf(fp,"# Timeout values\n# The keywords specify the following timeouts:\n");
-       fprintf(fp,"# tout_setup: after pickup before dialing anything. (default 60 seconds)\n");
-       fprintf(fp,"# tout_dialing: after dialing last digit of uncomplete number (default 15)\n");
-       fprintf(fp,"# tout_proceeding: after start proceeding (default 120)\n");
-       fprintf(fp,"# tout_alerting: after start ringing (default 120)\n");
-       fprintf(fp,"# tout_disconnect: after disconnect (default 120)\n");
-//     fprintf(fp,"# tout_hold: maximum time to hold a call (default 900)\n");
-//     fprintf(fp,"# tout_park: maximum time to park a call (default 900)\n");
-       fprintf(fp,"# All timeouts may be disabled by using keyword 'off' instead of seconds.\n");
-       fprintf(fp,"# All timeouts refer to internal ports only. External timeouts are controlled\n");
-       fprintf(fp,"# by external line.\n");
-       if (ext->tout_setup)
-               fprintf(fp,"tout_setup      %d\n",ext->tout_setup);
-       else
-               fprintf(fp,"tout_setup      off\n");
-       if (ext->tout_dialing)
-               fprintf(fp,"tout_dialing    %d\n",ext->tout_dialing);
-       else
-               fprintf(fp,"tout_dialing    off\n");
-       if (ext->tout_proceeding)
-               fprintf(fp,"tout_proceeding %d\n",ext->tout_proceeding);
-       else
-               fprintf(fp,"tout_proceeding off\n");
-       if (ext->tout_alerting)
-               fprintf(fp,"tout_alerting   %d\n",ext->tout_alerting);
-       else
-               fprintf(fp,"tout_alerting   off\n");
-       if (ext->tout_disconnect)
-               fprintf(fp,"tout_disconnect %d\n\n",ext->tout_disconnect);
-       else
-               fprintf(fp,"tout_disconnect off\n\n");
-//     if (ext->tout_hold)
-//             fprintf(fp,"tout_hold       %d\n",ext->tout_hold);
-//     else
-//             fprintf(fp,"tout_hold       off\n");
-//     if (ext->tout_park)
-//             fprintf(fp,"tout_park       %d\n\n",ext->tout_park);
-//     else
-//             fprintf(fp,"tout_park       off\n\n");
 
        fprintf(fp,"# Force to use tones and announcements generated by the pbx.\n");
        fprintf(fp,"# For internal calls always own tones are used. You may specify own tones for\n");