[Home]

Summary:ASTERISK-07044: [patch] Missing indications for countries available from libtonezone
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2006-05-27 13:05:45Date Closed:2006-06-05 04:32:04
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_indications
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) indications_jp_il_in.txt
( 1) zone2indication.c
Description:zonedata.c/libtonezone from zaptel includes information that is basically an equivalent to the informationin indications.conf . However zaptel/zonedata.c and asterisk/configs/indictions.conf.sample are not totally in sync.

The following "patch" (just a config snippet) adds indication.conf information for Japan (jp), Israel (il) and India (in).

Also included is zones2indication.c: a simple program for libtonezone to format zone information as indications.conf

****** ADDITIONAL INFORMATION ******

Building zones2indications:
cc zones2indication.c -o zone2indication -ltonezone

use ./zones2indication -a to get all the zones.

Getting the list of countries from both sources:

./zones2indications -a | grep '^\[..\]

grep '^\[..\]' indications.conf.sample

The countries in libtonezone and not in indications.conf.sample:
./zone2indication -a | grep '^\[..\]' | tr -d -c '\na-z' \
| while read country; \
 do \
   if ! grep -q "^\[$country\]" indications.conf.sample; \
   then echo $country; \
   fi; \
 done

The countries in indications.conf and not in libtonezone:

grep '^\[..\]' indications.conf.sample | tr -d -c '\na-z' \
| while read country; \
 do \
   if ! ./zone2indication -c $country >/dev/null; \
   then echo $country; \
   fi; \
 done
Comments:By: Olle Johansson (oej) 2006-06-05 04:32:04

Committed to svn trunk with change of "tutter" to "stutter" in both files.