[SR-Users] pdb and carrier id zero in finnish LNP

Mikko Lehto mikko.lehto at setera.fi
Sun Sep 12 23:12:56 CEST 2010


Hi

I am exploring the applicability of pdb module in finnish number portability scheme.
Looks like carrier id 000 cannot be used as zero is already reserved for
"the number could not be found" result in pdb protocol.

(Queries seem to work after I changed MIN_PDB_CARRIERID in common.h to 0,
but unfortunately that configuration just does not make sense.)

Is there any way out of this other than using internally different
value for carrier 0?
I rather use correct ids if somehow possible to avoid mapping logic in
routing script.


Note about help text consistency:
When going through pdbt.c there is this comment above import_csv function:
/*
 Read a csv list from the given file and build a dtree structure.
 Format of lines in csv file: "<number prefix>;<carrier id>".
 Format of carrier id: "D[0-9][0-9][0-9]".
 Returns the number of lines imported or -1 on error.
*/
Isn't the third line incorrect?
Same thing also in help text output of pdbt -h.
docs/data_format.txt mentions letter D only in front of carrier name file.
What is the meaning of D anyway in this context?


Here is my awk pipe contribution to scripts/get_carrier_names_finland.sh:
curl -o - "http://www2.ficora.fi/numerointi/nure_numbering.asp?nums=tot&lang=en" | awk '/<tbody>/, /<\/tbody>/' | awk -F"</td" -v RS="</tr" '{ gsub(/.*>/,"",$1) gsub(/.*>/,"",$2); gsub(/&auml;/,"ä",$2); gsub(/&Aring;/,"Å",$2); gsub(/&ouml;/,"ö",$2); if ( $2 != "") { printf "D%.3d %s\n",$1,$2 } }'

-- 
Mikko Lehto



More information about the sr-users mailing list