Index: enum.c =================================================================== RCS file: /usr/cvsroot/asterisk/enum.c,v retrieving revision 1.5 diff -u -r1.5 enum.c --- enum.c 12 Jun 2003 12:48:57 -0000 1.5 +++ enum.c 2 Jul 2003 22:27:11 -0000 @@ -158,23 +158,41 @@ ast_log(LOG_WARNING, "Failed to expand hostname\n"); return -1; } -#if 0 +#if 1 printf("Flags: %s\n", flags); printf("Services: %s\n", services); printf("Regexp: %s\n", regexp); printf("Repl: %s\n", repl); #endif if (!strncmp(regexp, "!^.*$!", 6)) { - if (!strncmp(services, "E2U+voice:", 10)) { + if (!strncasecmp(services, "E2U+voice:", 10)) { if (regexp[strlen(regexp) - 1] == '!') regexp[strlen(regexp) - 1] = '\0'; -#if 0 +#if 1 printf("Technology: %s\n", services + 10); printf("Destination: %s\n", regexp + 6); #endif strncpy(dst, regexp + 6, dstsize); strncpy(tech, services + 10, techsize); - } + } else if (!strncasecmp(services, "E2U+H323", 8)) { + if (regexp[strlen(regexp) - 1] == '!') + regexp[strlen(regexp) - 1] = '\0'; +#if 1 + printf("Technology: %s\n", services + 4); + printf("Destination: %s\n", regexp + 6); +#endif + strncpy(dst, regexp + 6, dstsize); + strncpy(tech, "H323", techsize); + } else if (!strncasecmp(services, "E2U+SIP", 7)) { + if (regexp[strlen(regexp) - 1] == '!') + regexp[strlen(regexp) - 1] = '\0'; +#if 1 + printf("Technology: %s\n", services + 4); + printf("Destination: %s\n", regexp + 6); +#endif + strncpy(dst, regexp + 6, dstsize); + strncpy(tech, "SIP", techsize); + } } else ast_log(LOG_WARNING, "Non-total substitution not yet supported\n"); return 0; @@ -295,7 +313,8 @@ if (version != enumver) { /* Ooh, a reload... */ s = toplevs; - } else { + version = enumver; + } else { s = s->next; } if (s) {